/* ============================================================
   Variables
   ============================================================ */

:root {
  --primary:       #F0C000;
  --primary-dark:  #FFCD00;
  --primary-light: #FFFBDB;
  --success:       #16a34a;
  --success-light: #f0fdf4;
  --error:         #dc2626;
  --error-light:   #fef2f2;
  --text:          #111827;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f1f5f9;
  --card:          #ffffff;
  --radius:        10px;
  --shadow:        0 2px 12px rgba(0,0,0,0.08);
}

/* ============================================================
   Reset & Base
   ============================================================ */

[v-cloak] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ============================================================
   Layout
   ============================================================ */

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: #1a1a1a;
  color: #fff;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.main-content {
  flex: 1;
  padding: 1.5rem 1rem 3rem;
  max-width: 768px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   Logo & header brand
   ============================================================ */

.header-logo-badge {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo {
  height: 46px;
  width: auto;
  display: block;
}

.header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-brand-org {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
}

.header-brand-app {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.header-brand-sub {
  font-size: 0.82rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}

.login-logo {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 auto 1rem;
}

/* ============================================================
   Card
   ============================================================ */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ============================================================
   Intro text
   ============================================================ */

.intro-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #7a5200;
  line-height: 1.6;
}

.intro-box-divider {
  border: none;
  border-top: 1px solid #e2c84a;
  margin: 0.65rem 0;
  opacity: 0.6;
}

.intro-box a {
  color: #4a3200;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.intro-box a:hover {
  color: #1a1a1a;
}

/* ============================================================
   Form
   ============================================================ */

.form-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.form-section-title:first-child { margin-top: 0; }

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.field label .req {
  color: var(--error);
  margin-left: 0.2rem;
}

.field label .opt {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.78rem;
  margin-left: 0.35rem;
}

input[type="checkbox"] {
  accent-color: var(--primary);
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,205,0,0.4);
}

input[type="text"].invalid,
input[type="password"].invalid,
select.invalid,
textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.field-label-sm {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.field-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 0.3rem;
}

/* custom room input that slides in */
.custom-room-wrap {
  margin-top: 0.5rem;
}

/* ============================================================
   Submit button
   ============================================================ */

.btn-submit {
  display: block;
  width: 100%;
  padding: 0.8rem;
  background: var(--primary);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 1.5rem;
}

.btn-submit:hover  { background: var(--primary-dark); }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled {
  background: #FFE87C;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   Success state
   ============================================================ */

.success-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.success-icon svg { color: var(--success); }

.success-card h2 {
  font-size: 1.3rem;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.success-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.btn-new {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--primary);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-new:hover { background: var(--primary-dark); }

/* ============================================================
   Loading / error states
   ============================================================ */

.loading-msg, .load-error {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.load-error { color: var(--error); }

/* ============================================================
   Login page
   ============================================================ */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 380px;
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.login-card .login-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.login-error {
  background: var(--error-light);
  color: var(--error);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-dev {
  display: block;
  margin-top: 0.3rem;
}

.footer-dev-logo {
  height: 13px;
  vertical-align: middle;
  margin: 0 0.2rem;
}

@media (min-width: 640px) {
  .footer-dev {
    display: inline;
    margin-top: 0;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--text-muted);
  }
}

/* ============================================================
   Mobile hamburger button
   ============================================================ */

.btn-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  line-height: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-hamburger:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   Desktop nav items wrapper (hidden on mobile)
   ============================================================ */

.desktop-nav-items {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   Mobile nav drawer
   ============================================================ */

.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.nav-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 270px;
  height: 100dvh;
  background: #161616;
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
  box-shadow: -6px 0 28px rgba(0,0,0,0.45);
}
.nav-drawer.open { right: 0; }

.nav-drawer-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.nav-drawer-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  line-height: 0;
  transition: color 0.15s, background 0.15s;
}
.nav-drawer-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0 1.5rem;
}

.nav-drawer-user {
  padding: 1rem 1.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-drawer-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0.35rem 0;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #d1d5db;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  font-family: inherit;
}
.nav-drawer-link:hover { background: rgba(255,255,255,0.06); color: #fff; }

.nav-drawer-link.primary {
  color: var(--primary);
  font-weight: 600;
}
.nav-drawer-link.primary:hover { background: rgba(240,192,0,0.08); }

.nav-drawer-link.active {
  color: var(--primary);
  background: rgba(240,192,0,0.06);
}

.nav-drawer-link.danger { color: #f87171; }
.nav-drawer-link.danger:hover { background: rgba(248,113,113,0.08); }

/* ============================================================
   Responsive — hamburger / drawer
   ============================================================ */

@media (max-width: 768px) {
  .desktop-nav-items { display: none; }
  .btn-hamburger { display: flex; }

  .ticket-meta-row {
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .status-badge, .priority-badge {
    font-size: 0.65rem;
    padding: 0.12rem 0.4rem;
    white-space: nowrap;
  }

  .ticket-date {
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .filter-tabs {
    flex-direction: column;
    flex: 0 0 100%;
  }

  .filter-row {
    display: flex;
    gap: 0.35rem;
  }

  .filter-tab {
    flex: 1;
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .nav-drawer,
  .nav-drawer-overlay { display: none !important; }

  .filter-row { display: contents; }
}

/* ============================================================
   Admin header
   ============================================================ */

.admin-header {
  justify-content: space-between;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-user {
  font-size: 0.82rem;
  color: #9ca3af;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #9ca3af;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   Admin content
   ============================================================ */

.admin-content {
  max-width: 860px;
}

/* ============================================================
   Toolbar
   ============================================================ */

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}


.filter-tab {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.15s;
}

.filter-tab:hover { border-color: var(--primary); color: #7a5200; }

.filter-tab.active {
  background: var(--primary-light);
  border-color: #e9d44a;
  border-bottom: 2px solid var(--primary);
  color: var(--text);
  font-weight: 600;
}

.tab-count {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.filter-tab.active .tab-count {
  background: var(--primary);
  color: #1a1a1a;
}

.filter-tabs-full .filter-tab {
  flex: 1;
  justify-content: center;
}

.btn-new-ticket {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background: var(--primary);
  color: #1a1a1a;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  cursor: pointer;
}

.btn-new-ticket:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.sort-select {
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  background: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  appearance: none;
  cursor: pointer;
}

/* ============================================================
   Empty / loading
   ============================================================ */

.empty-msg {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================================
   Ticket cards
   ============================================================ */

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ticket-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.ticket-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

/* Priority-based left border */
.ticket-card.priority-border-low      { border-left-color: #3b82f6; }
.ticket-card.priority-border-medium   { border-left-color: var(--primary); }
.ticket-card.priority-border-high     { border-left-color: #f97316; }
.ticket-card.priority-border-critical { border-left-color: #ef4444; }
.ticket-card.priority-border-none     { border-left-color: var(--border); }

.ticket-card-header {
  padding: 0.9rem 1rem;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.ticket-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.ticket-id {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.ticket-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
  padding-right: 1.5rem;
}

.ticket-summary-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.ticket-reporter { font-weight: 600; }
.ticket-dot { color: var(--text-muted); }
.ticket-location, .ticket-hw { color: var(--text-muted); }

.ticket-preview {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}

.ticket-expand-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* ============================================================
   Status & priority badges
   ============================================================ */

.status-badge, .priority-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.status-open        { background: #dbeafe; color: #1d4ed8; }
.status-badge.status-in_progress { background: #fef3c7; color: #b45309; }
.status-badge.status-done        { background: #dcfce7; color: #15803d; }

.priority-badge.priority-low      { background: #f3f4f6; color: #6b7280; }
.priority-badge.priority-medium   { background: #FFF0A0; color: #7a5200; }
.priority-badge.priority-high     { background: #ffedd5; color: #c2410c; }
.priority-badge.priority-critical { background: #fee2e2; color: #b91c1c; }

/* ============================================================
   Ticket detail (expanded)
   ============================================================ */

.ticket-detail {
  border-top: 1px solid var(--border);
  padding: 1rem;
  background: #fafbfc;
}

.detail-section {
  margin-bottom: 0.85rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.detail-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.detail-controls {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.control-group-full { flex: 1 1 100%; }

.control-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.control-select {
  padding: 0.45rem 2rem 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  appearance: none;
  min-width: 140px;
}

.control-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,205,0,0.4);
}

.control-textarea {
  width: 100%;
  min-height: 70px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  background: #fff;
}

.control-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,205,0,0.4);
}

.control-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 100%;
  justify-content: flex-end;
}

.btn-save {
  background: var(--primary);
  color: #1a1a1a;
  border: none;
  border-radius: 7px;
  padding: 0.5rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-save:hover    { background: var(--primary-dark); }
.btn-save:disabled { background: #FFE87C; cursor: not-allowed; }

.save-msg  { font-size: 0.85rem; }
.save-ok   { color: var(--success); }
.save-error{ color: var(--error); }

/* ============================================================
   Responsive — desktop
   ============================================================ */

@media (min-width: 600px) {
  .site-header { padding: 1.1rem 2rem; }
  .site-header h1 { font-size: 1.35rem; }
  .main-content { padding: 2rem 1.5rem 4rem; }
  .card { padding: 2rem; }

  .fields-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 1rem;
  }
}

@media (min-width: 900px) {
  .main-content { padding: 2.5rem 1rem 4rem; }
}

/* ============================================================
   Settings toggle button
   ============================================================ */

.btn-settings-toggle {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: transparent;
  color: #9ca3af;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-settings-toggle:hover { border-color: var(--primary); color: var(--primary); }

.btn-settings-toggle.active {
  background: var(--primary);
  color: #1a1a1a;
  border-color: var(--primary);
  font-weight: 700;
}

/* ============================================================
   Settings panel
   ============================================================ */

.settings-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.settings-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}

.settings-card-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 1.4rem 1.5rem;
}
.settings-card-title:hover { color: var(--text); }

.settings-chevron {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s;
}
.settings-chevron.open { transform: rotate(180deg); }

.settings-card-body {
  padding: 1rem 1.5rem 1.4rem;
  border-top: 1px solid var(--border);
}

.settings-section-sub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 1rem 0 0.6rem;
}

.settings-intro-textarea {
  min-height: 100px;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* ============================================================
   Item list (rooms / hardware types)
   ============================================================ */

.item-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: grab;
}
.item-row:active { cursor: grabbing; }

.drag-handle {
  color: var(--text-muted);
  font-size: 1rem;
  cursor: grab;
  padding: 0 0.2rem;
  user-select: none;
  line-height: 1;
}
.drag-handle:active { cursor: grabbing; }

.item-row.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.item-name {
  flex: 1;
  font-size: 0.88rem;
}

.item-edit-input {
  flex: 1;
  font-size: 0.88rem;
  padding: 0.2rem 0.4rem;
  border: 1.5px solid var(--primary);
  border-radius: 4px;
  outline: none;
  background: #fff;
  cursor: text;
}
.item-edit-input::-webkit-search-cancel-button,
.item-edit-input::-webkit-search-decoration { display: none; }

.btn-item-edit {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.btn-item-edit:hover { background: #f3f4f6; color: var(--text); }

.btn-item-confirm {
  background: none;
  border: none;
  color: var(--success);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.btn-item-confirm:hover { background: var(--success-light); }

.btn-item-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.btn-item-delete:hover {
  background: var(--error-light);
  color: var(--error);
}

.item-add-row {
  display: flex;
  gap: 0.5rem;
}

.item-add-row input {
  flex: 1;
}

.btn-add {
  background: var(--primary);
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-add:hover { background: var(--primary-dark); }

/* ============================================================
   Toggle switch
   ============================================================ */

label.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 12px;
  transition: background 0.2s;
}

.toggle-switch input:checked + .toggle-track { background: var(--primary); }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* ============================================================
   Delete button
   ============================================================ */

.btn-delete {
  padding: 0.45rem 1rem;
  background: transparent;
  color: var(--error);
  border: 1.5px solid var(--error);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-delete:hover { background: var(--error); color: #fff; }

/* ============================================================
   Confirmation modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 2rem;
  max-width: 420px;
  width: 90%;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-body strong { color: var(--text); }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-modal-cancel {
  padding: 0.45rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-modal-cancel:hover { border-color: var(--text-muted); color: var(--text); }

.btn-modal-delete {
  padding: 0.45rem 1rem;
  background: var(--error);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-modal-delete:hover { opacity: 0.88; }
.btn-modal-delete:disabled,
.btn-modal-cancel:disabled { opacity: 0.5; cursor: not-allowed; }

.toggle-switch input:checked + .toggle-track .toggle-thumb { left: 21px; }

/* ============================================================
   Inventory — shared
   ============================================================ */

.inv-section-card {
  margin-bottom: 1.1rem;
}

.inv-view-fields {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.inv-field-row {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.inv-field-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 195px;
  flex-shrink: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.inv-field-value {
  color: var(--text);
  flex: 1;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.inv-empty-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.inv-updated-at {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.inv-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ============================================================
   Inventory — storage list
   ============================================================ */

.inv-storage-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.inv-storage-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.inv-storage-row input {
  flex: 1;
}

.btn-add-small {
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: inline-block;
  margin-top: 0.1rem;
}
.btn-add-small:hover { border-color: var(--primary); color: #7a5200; }
.btn-add-small:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   Inventory — field grid rows
   ============================================================ */

.inv-fields-row {
  margin-bottom: 0.85rem;
}

.inv-fields-2col .inv-edit-field,
.inv-fields-3col .inv-edit-field {
  margin-bottom: 0;
}

.inv-fields-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.inv-fields-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.inv-fields-1col {
  display: block;
}

@media (max-width: 599px) {
  .inv-fields-2col,
  .inv-fields-3col {
    grid-template-columns: 1fr;
  }

  .inv-field-row {
    flex-direction: column;
    gap: 0.15rem;
    align-items: stretch;
  }

  .inv-field-label {
    min-width: 0;
  }

  .inv-field-value {
    text-align: right;
  }
}

/* ============================================================
   Inventory — config badge on room header
   ============================================================ */

.inv-room-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.inv-config-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem 0.1rem 0.55rem;
  border-radius: 10px;
  background: var(--primary-light);
  color: #7a5200;
  border: 1px solid #e9d44a;
  white-space: nowrap;
  cursor: default;
  letter-spacing: 0.02em;
}

.inv-config-badge-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  font-family: inherit;
}
.inv-config-badge-clear:hover { opacity: 1; }

/* ============================================================
   Inventory — edit fields
   ============================================================ */

.inv-config-select-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.inv-cfg-select {
  min-width: 200px;
  width: auto;
}

.inv-cable-select {
  min-width: 180px;
  width: auto;
}

.inv-edit-field {
  margin-bottom: 0.85rem;
}

.inv-edit-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.inv-edit-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-na-toggle {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
.btn-na-toggle:hover { border-color: var(--primary); color: #7a5200; }
.btn-na-toggle.active {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: var(--text-muted);
}

.inv-edit-field.field-na .inv-edit-label {
  opacity: 0.4;
}
.inv-edit-field.field-na input,
.inv-edit-field.field-na select,
.inv-edit-field.field-na textarea,
.inv-edit-field.field-na .btn-add-small {
  opacity: 0.4;
  pointer-events: none;
  background: #f3f4f6;
}

/* ============================================================
   Inventory — config templates
   ============================================================ */

.inv-config-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.inv-config-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.inv-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  background: var(--bg);
  user-select: none;
}
.inv-config-header:hover { background: #e9edf2; }

.inv-config-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.inv-config-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

.inv-config-new {
  padding: 1rem;
  background: #fff;
  border: 1px dashed var(--primary);
}

.inv-config-new-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* ============================================================
   Inventory — room cards
   ============================================================ */

.inv-room-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.inv-room-card--open {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .inv-room-list {
    grid-template-columns: 1fr;
  }

  .inv-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .inv-actions button {
    width: 100%;
    text-align: center;
  }

  .inv-reserve-item-row {
    flex-wrap: wrap;
    padding: 0.5rem 0;
  }

  .inv-reserve-item-name {
    flex-basis: calc(100% - 3rem);
  }

  .inv-reserve-item-btns {
    width: 100%;
    justify-content: flex-end;
  }
}

.inv-room-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.inv-room-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

.inv-room-header {
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.inv-room-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.inv-room-body {
  border-top: 1px solid var(--border);
  padding: 1rem;
  background: #fafbfc;
}

/* ============================================================
   Inventory — Skladište (reserve)
   ============================================================ */

.inv-reserve-item-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.inv-reserve-item-row:last-child { border-bottom: none; }

.inv-reserve-item-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.inv-reserve-item-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}

.inv-reserve-qty {
  min-width: 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.btn-qty {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 1.8rem;
  height: 1.8rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.btn-qty:hover:not(:disabled) { background: var(--primary-light); border-color: var(--primary); }
.btn-qty:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-icon-edit,
.btn-icon-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  transition: background 0.12s;
  color: var(--text-muted);
}
.btn-icon-edit:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-icon-del:hover  { background: #fdecea; color: var(--error); }

.inv-reserve-item-edit,
.inv-reserve-new-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem 0;
}

.inv-reserve-input {
  flex: 1;
  min-width: 8rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.inv-reserve-input-sm {
  width: 6rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.inv-reserve-select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: #fff;
}

.inv-reserve-qty-input {
  width: 4rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  text-align: center;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

/* ============================================================
   Help page (/help)
   ============================================================ */

.help-intro-text {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

/* Table of contents */
.help-toc {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
}

.help-toc-title {
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.help-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.help-toc-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.15s, color 0.15s;
}

.help-toc-list a:hover {
  background: var(--bg);
  color: #7a5200;
}

.help-toc-num {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.help-toc-label {
  flex: 1;
}

.help-toc-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
  opacity: 0.5;
}

/* Collapsible sections */
.help-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 0.875rem;
}

.help-section > summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  user-select: none;
}

.help-section > summary::-webkit-details-marker { display: none; }

.help-section[open] > summary {
  border-bottom: 1px solid var(--border);
}

.help-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.help-section[open] .help-chevron {
  transform: rotate(90deg);
}

.help-section-body {
  padding: 1.25rem;
}

/* Sub-sections within a section */
.help-subsection {
  margin-bottom: 1.5rem;
}

.help-subsection:last-child {
  margin-bottom: 0;
}

.help-subsection h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

/* Numbered steps */
.help-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.help-step-num {
  background: var(--primary);
  color: #111;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.help-step-body {
  flex: 1;
  min-width: 0;
}

.help-step-body h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.help-step-body h5 {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Callout boxes */
.help-callout {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.help-callout-warning {
  background: #fff7ed;
  border-color: #f97316;
}

/* Keyboard shortcuts */
kbd {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-bottom: 3px solid #9ca3af;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Cable grid */
.cable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.625rem;
  margin: 0.75rem 0;
}

.cable-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  background: #f8fafc;
}

.cable-card-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.cable-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Win+P projection modes */
.projection-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.625rem;
  margin: 0.75rem 0;
}

.proj-mode {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  background: #f8fafc;
}

.proj-mode-highlight {
  border-color: var(--primary);
  background: var(--primary-light);
}

.proj-mode-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.proj-mode-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Dock table */
.dock-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.dock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.dock-table th {
  background: #f3f4f6;
  padding: 0.5rem 0.875rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.dock-table td {
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.dock-table tr:last-child td {
  border-bottom: none;
}

.dock-row-warn td {
  background: #fff7ed;
  color: #9a3412;
}

/* Help images */
.help-img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
  cursor: zoom-in;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  margin: 0.75rem 0;
}

.help-img-sm  { max-width: 160px; }
.help-img-md  { max-width: 300px; }

.help-img-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
  align-items: flex-start;
}

.help-img-row .help-img {
  flex: 1;
  min-width: 120px;
  max-width: calc(50% - 0.5rem);
  margin: 0;
}

.cable-card img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

/* Help page CTA button */
.help-btn-link {
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
}

/* ============================================================
   Info page (info.os-zutibrijeg.hr)
   ============================================================ */

/* Editor badge in header */
.info-editor-badge {
  background: var(--primary);
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Add-category row */
.info-add-cat-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.info-add-cat-input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s;
}
.info-add-cat-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Empty state */
.info-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 1rem;
  font-size: 0.9375rem;
}

/* Category card */
.info-cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.info-cat-card.pinned {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(240,192,0,0.18);
}
.info-cat-card.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Category header */
.info-cat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  user-select: none;
  min-height: 3rem;
}
.info-cat-header:hover {
  background: #fafafa;
  border-radius: var(--radius);
}

/* Drag handle */
.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1rem;
  flex-shrink: 0;
  padding: 0 0.2rem;
  opacity: 0.5;
}
.drag-handle:hover { opacity: 1; }

/* Pin icon */
.info-pin-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
}

/* Category name */
.info-cat-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9375rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* File count */
.info-file-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Category action buttons */
.info-cat-btn {
  flex-shrink: 0;
}

/* Inline category edit input */
.info-cat-edit-input {
  flex: 1;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--card);
  color: var(--text);
  min-width: 0;
}
.info-cat-edit-input:focus { outline: none; }

/* Chevron */
.info-cat-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}
.info-cat-chevron.open { transform: rotate(180deg); }

/* Category body */
.info-cat-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

/* No files message */
.info-no-files {
  padding: 0.75rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* File row */
.info-file-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.info-file-row:last-of-type {
  border-bottom: none;
}

/* File type badge */
.info-file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #e5e7eb;
  color: #374151;
  flex-shrink: 0;
  min-width: 2.6rem;
  text-align: center;
}
.badge-pdf  { background: #fee2e2; color: #991b1b; }
.badge-doc,
.badge-docx { background: #dbeafe; color: #1e40af; }
.badge-xls,
.badge-xlsx { background: #dcfce7; color: #166534; }
.badge-ppt,
.badge-pptx { background: #ffedd5; color: #9a3412; }
.badge-jpg,
.badge-jpeg,
.badge-png,
.badge-gif,
.badge-webp { background: #f3e8ff; color: #6b21a8; }

/* File name */
.info-file-name {
  flex: 1;
  font-size: 0.9rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* File size */
.info-file-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Download button */
.btn-download-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-download-file:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #7a5200;
}

/* Inline file name edit input */
.info-file-edit-input {
  flex: 1;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
  min-width: 0;
}
.info-file-edit-input:focus { outline: none; }

/* Upload drop zone */
.info-upload-zone {
  margin-top: 0.75rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.info-upload-zone:hover,
.info-upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  color: #7a5200;
}
.info-upload-zone.uploading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}
