/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f0f11;
  --sidebar:   #161618;
  --surface:   #1e1e20;
  --surface-2: #252527;
  --surface-3: #2c2c2e;

  --red:       #e8192c;
  --red-bg:    #1f0608;
  --red-dim:   rgba(232,25,44,0.12);

  --text:      #f5f5f7;
  --text-2:    #98989f;
  --text-3:    #48484a;

  --border:    #222224;
  --border-2:  #2e2e30;
  --border-3:  #3a3a3c;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --t:         0.14s ease;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ===== LOGO ===== */
.logo-img {
  display: block;
  width: 192px;
  height: 46px;
  background-color: var(--red);
  -webkit-mask: url('/img/logo-hq.png') no-repeat center / contain;
  mask: url('/img/logo-hq.png') no-repeat center / contain;
  -webkit-mask-size: contain;
  mask-size: contain;
  flex-shrink: 0;
  image-rendering: auto;
}
.login-logo .logo-img {
  width: 220px;
  height: 52px;
}

.sidebar-logo { cursor: pointer; }

/* ===== SPINNER ===== */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.loading-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border-3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===========================
   LOGIN PAGE
   =========================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

.login-wrapper {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 40px 32px 32px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 20px 60px rgba(0,0,0,0.5);
  text-align: center;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
/* Login page logo */
.login-logo {
  flex-direction: column;
  gap: 8px;
}
.login-logo .logo-img {
  width: 180px;
  height: 42px;
}
.login-staff-only {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0.75;
}
.login-brand {
  font-size: 26px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.5px;
}

.login-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 5px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 28px;
}

.login-form { text-align: left; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 7px;
}
.form-group input {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-group input::placeholder { color: var(--text-3); }
.form-group input:focus, .form-group select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,25,44,0.14);
}
.form-group select {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}

.login-error {
  min-height: 17px;
  font-size: 12.5px;
  color: #ff6b6b;
  margin-bottom: 10px;
  font-weight: 500;
}

.btn-login {
  width: 100%;
  padding: 11px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  transition: opacity var(--t), transform var(--t);
  letter-spacing: 0.01em;
}
.btn-login:hover:not(:disabled) { opacity: 0.88; }
.btn-login:active:not(:disabled) { transform: scale(0.99); }
.btn-login:disabled { opacity: 0.45; cursor: not-allowed; }

.login-footer { font-size: 12px; color: var(--text-3); }

/* ===========================
   PORTAL LAYOUT
   =========================== */
.portal-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.portal-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ===========================
   SIDEBAR
   =========================== */
.portal-sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
}

/* Logo block */
.sidebar-logo {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: visible;
}
.sidebar-staff-only {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0.7;
}
.sidebar-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.4px;
  text-align: center;
}

/* Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  flex: 1;
  gap: 2px;
  overflow-y: auto;
}

.tab-btn {
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: background var(--t), color var(--t);
  letter-spacing: 0.01em;
}
.tab-btn svg { flex-shrink: 0; opacity: 0.6; transition: opacity var(--t); }
.tab-btn:hover { background: var(--surface-2); color: var(--text); }
.tab-btn:hover svg { opacity: 0.9; }
.tab-btn.active {
  background: var(--red-dim);
  color: var(--red);
  font-weight: 600;
}
.tab-btn.active svg { opacity: 1; }

/* Logout */
.btn-logout {
  margin: 10px 8px 16px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--t);
}
.btn-logout:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* ===========================
   MAIN CONTENT
   =========================== */
.portal-main {
  flex: 1;
  min-width: 0;
  padding: 32px 36px;
  overflow-y: auto;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Section header */
.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.tab-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}

.btn-open-sheet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--t);
}
.btn-open-sheet:hover { border-color: var(--red); color: var(--red); }
.btn-open-sheet[href="#"] { opacity: 0.3; pointer-events: none; }

/* ===== SCHEDULE ===== */
#tab-schedule { padding: 0; overflow: hidden; }

.sched-layout {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* City list panel */
.sched-cities-panel {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sidebar);
}
.sched-search-wrap {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.sched-search-wrap .search-box { width: 100%; min-width: 0; }
.sched-cities-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 8px;
}
.sched-city-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  border-radius: var(--radius-sm);
  line-height: 1.35;
  margin-bottom: 2px;
}
.sched-city-btn:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}
.sched-city-btn.active {
  background: rgba(232,25,44,0.13);
  color: var(--red);
  font-weight: 600;
}

/* Schedule view */
.sched-view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}
.sched-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  gap: 24px;
}
.sched-placeholder-icon {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: rgba(232,25,44,0.07);
  border: 1px solid rgba(232,25,44,0.15);
  color: rgba(232,25,44,0.6);
  flex-shrink: 0;
}
.sched-placeholder-icon svg {
  width: 40px;
  height: 40px;
}
.sched-placeholder-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sched-placeholder-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: rgba(255,255,255,0.7);
}
.sched-placeholder-hint {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

.sched-city-view { width: 100%; }
.sched-city-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
}

.sched-month-section { margin-bottom: 32px; }
.sched-month-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sched-month-name {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: capitalize;
}
.sched-month-name.current { color: var(--red); }

.sched-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sched-leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.sched-leg::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
}
.sched-leg.work::before     { background: rgba(48,209,88,0.85); }
.sched-leg.off::before      { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); }
.sched-leg.vacation::before { background: rgba(255,214,10,0.75); }
.sched-leg.sick::before     { background: rgba(255,149,0,0.75); }

/* Table */
.sched-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
}
.sched-table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 100%;
  white-space: nowrap;
}
.sched-th-name, .sched-td-name {
  position: sticky;
  left: 0;
  background: var(--surface-2);
  z-index: 2;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.sched-th-name {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: left;
  min-width: 170px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sched-td-name {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  min-width: 170px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: var(--surface);
}
tbody tr:hover .sched-td-name { background: var(--surface-2); }

.sched-th-day {
  padding: 10px 0;
  width: 28px;
  min-width: 28px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.07);
}
.sched-th-day.today {
  color: var(--red);
  background: rgba(232,25,44,0.1);
  font-weight: 800;
}

/* Count columns */
.sched-th-count {
  padding: 10px 6px;
  width: 36px;
  min-width: 36px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-left: 1px solid rgba(255,255,255,0.12);
}
.sched-td-count {
  width: 36px;
  min-width: 36px;
  text-align: center;
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-left: 1px solid rgba(255,255,255,0.1);
}
.sched-count-work { color: #30d158; }
.sched-count-off  { color: rgba(255,255,255,0.4); }

.sched-td {
  width: 28px;
  min-width: 28px;
  text-align: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-right: 1px solid rgba(255,255,255,0.07);
  font-size: 11px;
  font-weight: 700;
  transition: opacity 0.15s;
}
.sched-td.today { outline: 2px solid rgba(232,25,44,0.45); outline-offset: -2px; }
.sched-work     { background: rgba(48,209,88,0.15); color: #30d158; }
.sched-off      { background: transparent; color: transparent; }
.sched-vacation { background: rgba(255,214,10,0.14); color: #ffd60a; }
.sched-sick     { background: rgba(255,149,0,0.14); color: #ff9500; }

tbody tr:hover .sched-td { opacity: 0.8; }

@media (max-width: 680px) {
  /* Keep sidebar layout (left panel) — same as desktop */
  #tab-schedule { overflow: hidden !important; }
  .sched-layout {
    flex-direction: row;
    height: calc(100dvh - 130px);
    min-height: auto;
    overflow: hidden;
  }

  /* Narrow left sidebar */
  .sched-cities-panel {
    width: 115px;
    min-width: 90px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    border-bottom: none;
    height: 100%;
  }
  .sched-search-wrap {
    padding: 8px 6px;
  }
  .sched-search-wrap .search-box {
    height: 32px;
    font-size: 12px;
  }
  .sched-cities-list {
    display: block;
    padding: 4px 6px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
  }
  .sched-city-btn {
    display: block;
    width: 100%;
    padding: 7px 9px;
    font-size: 11.5px;
    border-radius: var(--radius-sm);
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
  }
  .sched-city-btn.active {
    background: rgba(232,25,44,0.13);
    color: var(--red);
    font-weight: 600;
  }

  /* Schedule view: horizontal scroll for wide table */
  .sched-view {
    padding: 10px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
  }
  .sched-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-xs);
  }

  /* Compact table cells */
  .sched-th-name, .sched-td-name {
    min-width: 90px;
    max-width: 90px;
    padding: 6px 6px;
    font-size: 10.5px;
  }
  .sched-th-day {
    width: 19px;
    min-width: 19px;
    padding: 7px 0;
    font-size: 9.5px;
  }
  .sched-td {
    width: 19px;
    min-width: 19px;
    padding: 6px 0;
    font-size: 9.5px;
  }
  .sched-th-count, .sched-td-count {
    width: 26px;
    min-width: 26px;
    padding: 6px 2px;
    font-size: 9.5px;
  }

  /* Header + legend */
  .sched-city-title { font-size: 15px; margin-bottom: 8px; }
  .sched-month-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 8px;
  }
  .sched-legend { gap: 5px; flex-wrap: wrap; }
  .sched-leg { font-size: 10px; }
}

/* ===== RESERVES & PZ / KONTROL ===== */
.btn-reserves-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
}
.btn-reserves-refresh:hover { border-color: var(--red); color: var(--red); }
.btn-reserves-refresh.spinning svg { animation: spin 0.7s linear infinite; }

.reserves-wrap,
.kontrol-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 93px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 4px 24px rgba(0,0,0,0.5),
    0 1px 4px rgba(0,0,0,0.4);
  /* 36px portal padding − 12px desired gap = -24px; bottom leaves 16px */
  margin: 0 -24px -16px;
}

.reserves-loading,
.kontrol-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 40px;
  color: var(--text-2);
  flex: 1;
}

.reserves-notice,
.kontrol-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 40px;
  color: var(--text-2);
  text-align: center;
  flex: 1;
}
.reserves-notice p,
.kontrol-notice p { font-size: 14px; color: var(--text-2); }
.btn-notice-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: var(--red);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--t);
  margin-top: 4px;
}
.btn-notice-open:hover { opacity: 0.85; }

.reserves-frame,
.kontrol-frame {
  width: 100%;
  height: calc(100vh - 93px);
  min-height: 520px;
  border: none;
  display: block;
  flex: 1;
}

/* Mobile CTA — shown instead of iframe on small screens */
.reserves-mobile-cta,
.kontrol-mobile-cta {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 40px;
  text-align: center;
  flex: 1;
  color: var(--text-2);
}
.reserves-mobile-cta p,
.kontrol-mobile-cta p {
  font-size: 14px;
  max-width: 260px;
  line-height: 1.55;
}

/* Tab header: less gap before the iframe card */
#tab-reserves .tab-header,
#tab-kontrol .tab-header {
  margin-bottom: 14px;
}

/* Tablet (≤900px): iframe too small for Google Sheets → show CTA */
@media (max-width: 900px) {
  .reserves-mobile-cta,
  .kontrol-mobile-cta { display: flex; }
  .reserves-loading, .reserves-notice, .reserves-frame,
  .kontrol-loading, .kontrol-notice, .kontrol-frame { display: none !important; }
  #tab-reserves .btn-reserves-refresh,
  #tab-kontrol .btn-reserves-refresh { display: none; }
  .reserves-wrap,
  .kontrol-wrap {
    margin: 0 -8px -8px;
    min-height: 360px;
    border-radius: var(--radius);
  }
}

/* Mobile (≤680px): minimal side padding → small margins */
@media (max-width: 680px) {
  .reserves-wrap,
  .kontrol-wrap {
    margin: 0 0 -8px;
    min-height: 280px;
    border-radius: var(--radius);
  }
}

/* ===== WIP (В разработке) ===== */
.kontrol-wip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 60px 40px;
  min-height: 400px;
}

.wip-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(232,25,44,0.08);
  border: 1px solid rgba(232,25,44,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
  animation: wip-float 3s ease-in-out infinite;
}

@keyframes wip-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.wip-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.wip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,25,44,0.1);
  border: 1px solid rgba(232,25,44,0.22);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}
.wip-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.wip-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.wip-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 320px;
}

.wip-dots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.wip-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.4;
  animation: wip-dot 1.4s ease-in-out infinite;
}
.wip-dots span:nth-child(2) { animation-delay: 0.2s; }
.wip-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wip-dot {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1.1); }
}

/* Layout: icon left, content right on desktop */
.kontrol-wip {
  gap: 32px;
  flex-direction: row;
}
@media (max-width: 680px) {
  .kontrol-wip {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    gap: 20px;
    min-height: 280px;
  }
  .wip-badge { align-self: center; }
  .wip-title { font-size: 19px; }
  .wip-desc { font-size: 13px; }
  .wip-dots { justify-content: center; }
}

/* ===== TRADE-IN ===== */
#tradeinSearchBox { min-width: 200px; }

.tradein-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.tradein-models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.ti-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--t);
}
.ti-card:hover { border-color: var(--border-2); }

.ti-card-header {
  padding: 11px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.ti-model-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.ti-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ti-table thead th {
  padding: 8px 10px;
  text-align: left;
  color: var(--text-2);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.th-mem {
  padding-left: 14px !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.ti-table thead th:not(.th-mem) {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.th-good { color: #30d158; }
.th-mid  { color: #ffd60a; }
.th-bad  { color: var(--red); }
.ti-table tbody tr { border-bottom: 1px solid var(--border); }
.ti-table tbody tr:last-child { border-bottom: none; }
.ti-table tbody tr:hover { background: var(--surface-2); }

.ti-mem {
  padding: 8px 10px 8px 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.ti-price {
  padding: 8px 10px;
  font-weight: 600;
  white-space: nowrap;
  font-size: 13px;
}
.ti-price.good    { color: #30d158; }
.ti-price.mid     { color: #ffd60a; }
.ti-price.grade-b { color: var(--red); }

/* Rules panel */
.ti-rules-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: sticky;
  top: 16px;
}
.ti-rules-title {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  letter-spacing: 0.02em;
}
.ti-rules-section {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.ti-rules-section:last-child { border-bottom: none; }
.ti-rules-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  opacity: 0.75;
  margin-bottom: 8px;
}
.ti-rule-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12px;
}
.ti-rule-row:last-child { margin-bottom: 0; }
.ti-rule-grade {
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.ti-rule-grade.a { background: rgba(48,209,88,0.14); color: #30d158; }
.ti-rule-key {
  color: var(--text-2);
  flex: 1;
  line-height: 1.35;
}
.ti-rule-val {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.ti-rule-val.deduct { color: var(--red); }
.ti-rule-note {
  font-size: 12px;
  color: var(--text-2);
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-xs);
  border-left: 2px solid var(--red);
  margin-bottom: 6px;
  line-height: 1.45;
}
.ti-rule-note:last-child { margin-bottom: 0; }

/* Trade-in rules: capitalize every word */
.ti-rules-card { text-transform: capitalize; }
/* Keep labels uppercase (overrides inherited capitalize) */
.ti-rules-label { text-transform: uppercase; }

@media (max-width: 900px) {
  .tradein-layout { grid-template-columns: 1fr; }
  .ti-rules-card { position: static; }
  .tradein-models { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 680px) {
  .tradein-layout { gap: 14px; }
  .tradein-models { grid-template-columns: 1fr; }
  #tradeinSearchBox { min-width: 0; flex: 1; }
  .ti-table { font-size: 12px; }
  .ti-table thead th { padding: 7px 8px; font-size: 11px; }
  .ti-mem { padding: 7px 8px 7px 10px; font-size: 12px; }
  .ti-price { padding: 7px 8px; font-size: 12px; }
}

/* Sheet container */
.sheet-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.sheet-frame {
  width: 100%;
  height: 660px;
  border: none;
}
.sheet-loading, .sheet-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px;
  color: var(--text-3);
  text-align: center;
}
.sheet-loading p, .sheet-placeholder p { color: var(--text-2); font-size: 14px; }
.placeholder-hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.placeholder-hint code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 11px;
  color: var(--text-2);
}

/* ===========================
   EMPLOYEES
   =========================== */
.employees-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  padding: 8px 13px;
  min-width: 280px;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-box:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,25,44,0.10);
}
.search-box svg { color: var(--text-3); flex-shrink: 0; }
.search-box input {
  border: none;
  outline: none;
  font-size: 13.5px;
  color: var(--text);
  background: transparent;
  width: 100%;
}
.search-box input::placeholder { color: var(--text-3); }

.btn-refresh {
  padding: 8px 11px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  transition: all var(--t);
}
.btn-refresh:hover { border-color: var(--red); color: var(--red); }
.btn-refresh.spinning svg { animation: spin 0.7s linear infinite; }

/* Category */
.emp-category { margin-bottom: 36px; }
.emp-category.hidden { display: none; }

.emp-category-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.emp-category-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #e8e8ed;
  flex: 1;
  letter-spacing: -0.2px;
}

.emp-category-badge {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.badge-1 { background: rgba(255,255,255,0.1); color: #fff; }
.badge-2 { background: rgba(232,25,44,0.2); color: #fff; }
.badge-3 { background: rgba(10,132,255,0.2); color: #fff; }
.badge-4 { background: rgba(48,209,88,0.16); color: #fff; }

.emp-count {
  background: rgba(255,255,255,0.07);
  color: #a0a0a8;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Grid */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 10px;
}

.emp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: background var(--t), border-color var(--t);
  cursor: default;
  position: relative;
}
.emp-card:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
}
.emp-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.emp-card:hover .emp-actions { opacity: 1; }
.emp-btn-edit, .emp-btn-del {
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.emp-btn-edit:hover { color: var(--text-1); border-color: var(--border-3); background: var(--surface-3); }
.emp-btn-del:hover  { color: var(--red); border-color: var(--red); background: rgba(232,25,44,0.06); }

.emp-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.cat-1 .emp-avatar { background: #3a3a3c; }
.cat-2 .emp-avatar { background: linear-gradient(135deg, #b5102a, #e8192c); }
.cat-3 .emp-avatar { background: linear-gradient(135deg, #0048b5, #0a84ff); }
.cat-4 .emp-avatar { background: linear-gradient(135deg, #1a7a34, #30d158); }

.emp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.emp-name {
  font-size: 13px;
  font-weight: 600;
  color: #e8e8ed;
  line-height: 1.35;
  word-break: break-word;
}
.emp-phone-inline {
  line-height: 1.3;
}
.emp-phone-inline a {
  font-size: 12px;
  color: #a0a0a8;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t);
}
.emp-phone-inline a:hover { color: var(--red); }
.emp-position {
  font-size: 12px;
  color: #88888f;
  line-height: 1.3;
  font-weight: 500;
}

/* States */
.emp-loading, .emp-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  gap: 14px;
  text-align: center;
  color: var(--text-2);
}
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
  gap: 10px;
  color: var(--text-3);
  text-align: center;
}
.highlight { background: rgba(232,25,44,0.18); border-radius: 2px; padding: 0 2px; }

/* ===========================
   NEWS TAB
   =========================== */
.btn-add-news {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
}
.btn-add-news:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.btn-add-news.btn-urgent {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-add-news.btn-urgent:hover { opacity: 0.85; color: #fff; }

.news-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
  line-height: 16px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 900px;
}

/* ── Base card ── */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  transition: border-color var(--t), background var(--t);
}
.news-card:hover { background: var(--surface-2); border-color: var(--border-2); }
.news-card.important {
  border-color: rgba(232,25,44,0.35);
  border-left: 3px solid var(--red);
}

/* ── Urgent / Task card ── */
.news-card.urgent {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.news-card.urgent:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.38);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.13);
}

/* Left accent bar */
.news-card.urgent::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
  border-radius: 12px 0 0 12px;
}

/* Done state */
.news-card.urgent.task-done {
  background: rgba(48,209,88,0.03);
  border-color: rgba(48,209,88,0.15);
}
.news-card.urgent.task-done::before { background: #30d158; }
.news-card.urgent.task-done:hover { box-shadow: 0 6px 28px rgba(48,209,88,0.08); }

/* Inner padding wrapper */
.task-inner {
  padding: 18px 20px 0 22px;
}

/* ── Task header row ── */
.task-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  padding-right: 140px;
}

.task-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 6px rgba(232,25,44,0.6);
  transition: background 0.2s, box-shadow 0.2s;
}
.task-done .task-status-dot {
  background: #30d158;
  box-shadow: 0 0 6px rgba(48,209,88,0.5);
}

.news-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #eeeef0;
  flex: 1;
  letter-spacing: -0.2px;
  line-height: 1.4;
}
.task-done .news-title {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}

/* ── Body ── */
.news-body {
  font-size: 13.5px;
  color: #98989f;
  line-height: 1.65;
  white-space: pre-wrap;
  margin-bottom: 2px;
}
.task-done .news-body { color: var(--text-3); }

/* ── Meta footer ── */
.news-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #6e6e73;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px 20px 10px 22px;
}
.news-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.news-meta span svg { opacity: 0.5; flex-shrink: 0; }
.btn-delete-news {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #48484a;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--t), background var(--t);
}
.btn-delete-news:hover { color: var(--red); background: rgba(232,25,44,0.1); }

/* Legacy */
.news-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding-right: 130px;
}
.news-important-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red-dim);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-urgent-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,149,0,0.12);
  color: #ff9500;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===========================
   MODAL
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.12s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  animation: slideUp 0.14s ease;
}
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.modal-close {
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }

.modal-body { padding: 18px 22px; }

.modal-body .form-group { margin-bottom: 14px; }
.modal-body textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color var(--t), box-shadow var(--t);
}
.modal-body textarea::placeholder { color: var(--text-3); }
.modal-body textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,25,44,0.12);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  user-select: none;
}
.checkbox-label input { display: none; }
.checkbox-custom {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-3);
  border-radius: 4px;
  background: var(--surface-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--red);
  border-color: var(--red);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.modal-error {
  min-height: 16px;
  font-size: 12.5px;
  color: #ff6b6b;
  margin-top: 10px;
  font-weight: 500;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 22px 20px;
}
.btn-cancel {
  padding: 9px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
}
.btn-cancel:hover { background: var(--surface-3); color: var(--text); }
.btn-publish {
  padding: 9px 20px;
  background: var(--red);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--t);
}
.btn-publish:hover { opacity: 0.85; }
.btn-publish:disabled { opacity: 0.45; cursor: not-allowed; }

/* File upload */
.file-drop-zone {
  border: 1.5px dashed var(--border-3);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color var(--t), background var(--t);
  margin-top: 8px;
}
.file-drop-zone:hover, .file-drop-zone.drag-over {
  border-color: var(--red);
  background: var(--red-bg);
}
.file-drop-zone p { font-size: 13px; color: var(--text-3); }
.file-link { color: var(--red); text-decoration: underline; cursor: pointer; }

.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-2);
}
.file-item-icon { font-size: 16px; flex-shrink: 0; }
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--text-3); white-space: nowrap; }
.file-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 2px; border-radius: 3px;
  display: flex; align-items: center;
  transition: color var(--t);
}
.file-item-remove:hover { color: var(--red); }

/* Attachments in cards */
.news-attachments { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.attach-img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--t);
}
.attach-img:hover { opacity: 0.85; }
.attach-video {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 4px;
}
.attach-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color var(--t), color var(--t);
}
.attach-file:hover { border-color: var(--red); color: var(--red); }

/* Complete button — absolute top-right of card */
.btn-complete {
  position: absolute;
  top: 16px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #7e7e85;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-complete:hover {
  border-color: rgba(48,209,88,0.5);
  color: #30d158;
  background: rgba(48,209,88,0.08);
}
.btn-complete.done {
  border-color: rgba(48,209,88,0.4);
  color: #30d158;
  background: rgba(48,209,88,0.1);
}
.btn-complete.done svg { stroke: #30d158; }
.done-count {
  background: #30d158;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 1px;
}
.badge-green { background: #30d158 !important; color: #000 !important; }

/* Completions list */
.completions-list { max-width: 700px; display: flex; flex-direction: column; gap: 8px; }
.completion-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: background var(--t);
}
.completion-row:hover { background: var(--surface-2); }
.completion-check {
  width: 28px; height: 28px;
  background: rgba(48,209,88,0.12);
  border: 1px solid rgba(48,209,88,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #30d158;
}
.completion-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.completion-user { font-size: 13.5px; font-weight: 600; color: var(--text); }
.completion-task { font-size: 12px; color: var(--text-3); }
.completion-time { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* Mobile-only elements: hidden on desktop */
.mobile-topbar { display: none; }
.mobile-overlay { display: none; }
.mobile-menu-btn { display: none; }
.mobile-logout-btn { display: none; }

/* ===========================
   RESPONSIVE
   =========================== */
/* ===== TABLET (≤900px) ===== */
@media (max-width: 900px) {
  .portal-sidebar { width: 210px; }
  .portal-main { padding: 24px 20px; }
  .emp-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MOBILE (≤680px) ===== */
@media (max-width: 680px) {

  /* Layout */
  .portal-layout {
    flex-direction: column;
    min-height: 100dvh;
  }

  /* Sidebar: hidden off-screen left, slides in */
  .portal-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100dvh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--border-2);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
  }
  .portal-sidebar.open {
    transform: translateX(0);
  }

  /* Overlay backdrop */
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .mobile-overlay.visible {
    display: block;
    opacity: 1;
  }

  /* Main: full width, no left offset */
  .portal-main {
    flex: 1;
    padding: 0 0 24px;
    overflow-y: auto;
    min-height: 100dvh;
  }

  /* Mobile top bar */
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--sidebar);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
  }
  .mobile-topbar .logo-img {
    width: 120px;
    height: 28px;
    flex-shrink: 0;
  }

  /* Hamburger button */
  .mobile-menu-btn {
    width: 38px; height: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xs);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background var(--t), border-color var(--t);
  }
  .mobile-menu-btn:hover { background: var(--surface-3); border-color: var(--border-3); }
  .mobile-menu-btn span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease, width 0.22s ease;
  }
  .mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-btn.open span:nth-child(2) { opacity: 0; width: 0; }
  .mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Logout button mobile (icon only) */
  .mobile-logout-btn {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xs);
    color: var(--text-3);
    cursor: pointer;
    transition: color var(--t), border-color var(--t);
    flex-shrink: 0;
  }
  .mobile-logout-btn:hover { color: var(--red); border-color: var(--red); }

  /* Tab content area padding */
  .tab-content.active { padding: 16px 14px; }

  /* Tab header */
  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }
  .tab-header h2 { font-size: 20px; }
  .btn-add-news { width: 100%; justify-content: center; }

  /* Tab header controls row: full-width, wrap */
  .tab-header > div {
    width: 100%;
    flex-wrap: wrap;
  }
  .tab-header > div .btn-open-sheet,
  .tab-header > div .btn-reserves-refresh {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }
  /* Trade-in search box: full width on mobile */
  #tab-tradein .tab-header > div {
    flex-direction: column;
    gap: 8px;
  }
  #tradeinSearchBox { min-width: 0; width: 100%; }

  /* Task cards */
  .news-card.urgent { transform: none !important; }
  .task-inner { padding: 14px 14px 0 16px; }
  .task-header { padding-right: 110px; }
  .btn-complete { top: 12px; right: 12px; padding: 5px 10px; font-size: 11px; }
  .news-title { font-size: 14px; }
  .news-body  { font-size: 13px; }
  .news-meta  { flex-wrap: wrap; gap: 8px; font-size: 11.5px; padding: 8px 14px 8px 16px; }

  /* Attachments */
  .attach-img { width: 72px; height: 72px; }
  .news-attachments { gap: 6px; }

  /* Employees */
  .emp-grid { grid-template-columns: 1fr; gap: 8px; }
  .emp-card { padding: 12px 14px; gap: 10px; }
  .employees-controls { flex-direction: column; gap: 8px; width: 100%; }
  .search-box { width: 100%; min-width: 0; }
  .emp-category-header h3 { font-size: 14px; }

  /* Sheets */
  .sheet-container { height: calc(100dvh - 140px); }
  .sheet-frame { height: 100%; }

  /* Modal slides up from bottom */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%; max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
    overflow-y: auto;
    animation: modal-slide-up 0.28s cubic-bezier(0.34,1.1,0.64,1) both;
  }
  @keyframes modal-slide-up {
    from { transform: translateY(100%); opacity: 0.8; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .modal-body   { padding: 0 18px 16px; }
  .modal-header { padding: 18px 18px 14px; }
  .modal-footer { padding: 12px 18px 24px; }

  /* Login */
  .login-body { padding: 40px 16px 24px; align-items: flex-start; }
  .login-card { padding: 28px 20px 24px; border-radius: 14px; }

  /* Lightbox */
  #lightboxPrev { left: 8px; }
  #lightboxNext { right: 8px; }
  #lightboxImg  { max-width: 96vw; max-height: 80vh; }

  .file-drop-zone { padding: 14px; }
}

/* ===== SMALL PHONES (≤380px) ===== */
@media (max-width: 380px) {
  .portal-main { padding-bottom: 16px; }
  .tab-content.active { padding: 12px 10px; }
}

/* ===================================================
   GLOBAL ANIMATIONS & VISUAL POLISH
   =================================================== */

/* --- Keyframes --- */
@keyframes tab-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,25,44,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(232,25,44,0); }
}
@keyframes btnShine {
  0%        { left: -80%; }
  35%, 100% { left: 130%; }
}
@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(18px, -22px) scale(1.04); }
  66%      { transform: translate(-12px, 14px) scale(0.97); }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* --- Tab content entrance --- */
.tab-content.active {
  animation: tab-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Tab header h2 accent --- */
.tab-header h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tab-header h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 20px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}

/* --- Sidebar active item: left border + glow --- */
.tab-btn {
  border-left: 2px solid transparent;
}
.tab-btn:hover:not(.active) {
  transform: translateX(2px);
}
.tab-btn.active {
  border-left-color: var(--red);
  box-shadow: inset 4px 0 20px rgba(232,25,44,0.07);
}

/* --- Sidebar ambient glow at bottom --- */
/* --- Login page --- */
.login-body {
  position: relative;
}
.login-card {
  animation: scaleIn 0.32s cubic-bezier(0.22,1,0.36,1) both;
}
.login-logo .logo-img {
  filter: drop-shadow(0 0 14px rgba(232,25,44,0.22));
}

/* --- Primary button shine sweep --- */
.btn-login, .btn-add-news.btn-urgent, .btn-publish {
  position: relative;
  overflow: hidden;
}
.btn-login::after, .btn-add-news.btn-urgent::after, .btn-publish::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: btnShine 4s ease-in-out infinite;
  pointer-events: none;
}

/* --- News badge pulse ring --- */
.news-badge {
  animation: pulseDot 2.2s ease-in-out infinite;
}

/* --- Card hover lift --- */
.emp-card {
  transition: background var(--t), border-color var(--t), box-shadow 0.2s ease, transform 0.2s ease;
}
.emp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
  border-color: var(--border-3);
}

.news-card {
  transition: border-color var(--t), background var(--t), box-shadow 0.2s ease, transform 0.2s ease;
}
.news-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.38);
}

.ti-card {
  transition: border-color var(--t), box-shadow 0.2s ease, transform 0.2s ease;
}
.ti-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.32);
  border-color: var(--border-3);
}

/* --- Employee avatar ring glow on hover --- */
.emp-card:hover .cat-2 .emp-avatar { box-shadow: 0 0 0 2px rgba(232,25,44,0.35); }
.emp-card:hover .cat-3 .emp-avatar { box-shadow: 0 0 0 2px rgba(10,132,255,0.35); }
.emp-card:hover .cat-4 .emp-avatar { box-shadow: 0 0 0 2px rgba(48,209,88,0.35); }

/* --- Stagger grid cards on load --- */
.emp-grid.anim-in .emp-card:nth-child(1)  { animation: fadeInUp 0.2s 0.00s ease both; }
.emp-grid.anim-in .emp-card:nth-child(2)  { animation: fadeInUp 0.2s 0.03s ease both; }
.emp-grid.anim-in .emp-card:nth-child(3)  { animation: fadeInUp 0.2s 0.06s ease both; }
.emp-grid.anim-in .emp-card:nth-child(4)  { animation: fadeInUp 0.2s 0.09s ease both; }
.emp-grid.anim-in .emp-card:nth-child(5)  { animation: fadeInUp 0.2s 0.11s ease both; }
.emp-grid.anim-in .emp-card:nth-child(6)  { animation: fadeInUp 0.2s 0.13s ease both; }
.emp-grid.anim-in .emp-card:nth-child(n+7){ animation: fadeInUp 0.2s 0.15s ease both; }

/* --- News cards stagger --- */
.news-list .news-card:nth-child(1) { animation: fadeInUp 0.22s 0.00s ease both; }
.news-list .news-card:nth-child(2) { animation: fadeInUp 0.22s 0.05s ease both; }
.news-list .news-card:nth-child(3) { animation: fadeInUp 0.22s 0.09s ease both; }
.news-list .news-card:nth-child(n+4){ animation: fadeInUp 0.22s 0.12s ease both; }

/* ===== EMPLOYEE STATS BAR ===== */
.emp-stats-bar {
  display: grid;
  grid-template-columns: 1fr repeat(4, auto);
  gap: 10px;
  margin-bottom: 26px;
  align-items: stretch;
}

.emp-stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.emp-stat-tile:hover {
  border-color: var(--border-3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.emp-stat-tile.stat-total {
  border-color: rgba(232,25,44,0.18);
  grid-column: 1;
}

.emp-stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.emp-stat-icon.si-total { background: rgba(232,25,44,0.15); color: #fff; }
.emp-stat-icon.si-1     { background: rgba(255,255,255,0.1); color: #fff; }
.emp-stat-icon.si-2     { background: rgba(232,25,44,0.18); color: #fff; }
.emp-stat-icon.si-3     { background: rgba(10,132,255,0.18); color: #fff; }
.emp-stat-icon.si-4     { background: rgba(48,209,88,0.15); color: #fff; }

.emp-stat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.emp-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}
.emp-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat-total .emp-stat-num { color: var(--red); }

/* Mini bar inside total tile */
.emp-stat-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 80px;
}
.emp-stat-bar-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.emp-stat-bar-track {
  flex: 1;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.emp-stat-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}
.bar-ук { background: var(--text-3); }
.bar-ру { background: var(--red); }
.bar-ср { background: #3b9eff; }
.bar-см { background: #30d158; }
.emp-stat-bar-lbl { width: 20px; flex-shrink: 0; }

@media (max-width: 900px) {
  .emp-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .emp-stat-tile.stat-total { grid-column: 1 / -1; }
  .emp-stat-bar-wrap { display: none; }
}
@media (max-width: 680px) {
  .emp-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .emp-stat-tile { padding: 12px 14px; }
  .emp-stat-num { font-size: 22px; }
  .stat-total .emp-stat-num { font-size: 24px; }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface-2) 25%,
    var(--surface-3) 50%,
    var(--surface-2) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-xs);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 40px; height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border-3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  z-index: 90;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease, background var(--t), color var(--t);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--red); }

/* Input focus glow enhanced */
.form-group input:focus,
.form-group select:focus,
.modal-body textarea:focus {
  box-shadow: 0 0 0 3px rgba(232,25,44,0.15), 0 1px 4px rgba(0,0,0,0.3);
}
.search-box:focus-within {
  box-shadow: 0 0 0 3px rgba(232,25,44,0.12), 0 2px 8px rgba(0,0,0,0.25);
}

/* Logo subtle entry */
.sidebar-logo .logo-img {
  filter: drop-shadow(0 0 10px rgba(232,25,44,0.18));
}

/* Card entrance */
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.news-card {
  animation: card-in 0.28s ease both;
}
.news-list .news-card:nth-child(1) { animation-delay: 0.02s; }
.news-list .news-card:nth-child(2) { animation-delay: 0.07s; }
.news-list .news-card:nth-child(3) { animation-delay: 0.12s; }
.news-list .news-card:nth-child(4) { animation-delay: 0.17s; }
.news-list .news-card:nth-child(5) { animation-delay: 0.22s; }
.news-list .news-card:nth-child(n+6) { animation-delay: 0.25s; }

/* Employee card entrance */
@keyframes emp-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.emp-card {
  animation: emp-in 0.25s ease both;
}

/* Modal appear */
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(-12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal {
  animation: modal-in 0.2s cubic-bezier(0.34,1.2,0.64,1) both;
}

/* Badge pop */
@keyframes badge-pop {
  0%   { transform: scale(0.5); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.news-badge {
  animation: badge-pop 0.3s cubic-bezier(0.34,1.4,0.64,1) both;
}

/* Button press */
.btn-complete:active,
.btn-add-news:active,
.btn-publish:active,
.btn-logout:active {
  transform: scale(0.95);
}

/* Tab button active indicator */
.tab-btn { transition: background var(--t), color var(--t), transform 0.1s ease; }
.tab-btn:active { transform: scale(0.97); }

/* Sidebar nav smooth hover */
.tab-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px; height: 60%;
  background: var(--red);
  border-radius: 0 2px 2px 0;
  transition: transform 0.15s ease;
}
.tab-btn.active::before,
.tab-btn:hover::before {
  transform: translateY(-50%) scaleY(1);
}

/* Smooth task-done color transition */
.news-card.urgent {
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

/* Complete button bounce */
@keyframes done-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.btn-complete.done {
  animation: done-bounce 0.35s cubic-bezier(0.34,1.4,0.64,1) both;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightboxBg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}
#lightboxImg {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: lb-in 0.2s cubic-bezier(0.34,1.1,0.64,1) both;
  user-select: none;
}
@keyframes lb-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
#lightboxClose {
  position: fixed;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 1001;
  transition: background 0.15s;
}
#lightboxClose:hover { background: rgba(255,255,255,0.16); }
#lightboxPrev, #lightboxNext {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 1001;
  transition: background 0.15s, opacity 0.15s;
}
#lightboxPrev { left: 20px; }
#lightboxNext { right: 20px; }
#lightboxPrev:hover, #lightboxNext:hover { background: rgba(255,255,255,0.16); }
#lightboxPrev[disabled], #lightboxNext[disabled] { opacity: 0.2; pointer-events: none; }
#lightboxCounter {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  z-index: 1001;
}

