/* ===== navone — Shared Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --nav-bg: #0f172a;
  --nav-hover: #1e293b;
  --nav-active: #1d4ed8;
  --accent: #f59e0b;
  --accent-soft: #fffbeb;
  --primary: #1d4ed8;
  --primary-soft: #eff6ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --sidebar-w: 240px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Sora', sans-serif; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.text-sm { font-size: 0.85rem; }

/* ===== Layout ===== */
.layout-wrapper { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--nav-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid #1e293b;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
}
.brand-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700; font-size: 1.2rem;
  color: #fff; letter-spacing: -0.03em;
}

.sidebar-nav { flex: 1; padding: 14px 12px; }
.nav-section-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  color: #475569; padding: 4px 8px 6px; margin-top: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; margin-bottom: 2px;
  color: #94a3b8; text-decoration: none;
  font-weight: 500; font-size: 0.875rem;
  transition: all 0.16s;
}
.nav-item:hover { background: var(--nav-hover); color: #e2e8f0; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item i { font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  color: #fff; font-weight: 700; font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { color: #f1f5f9; font-size: 0.82rem; font-weight: 600; }
.user-role { color: #64748b; font-size: 0.7rem; }

/* ===== Main Content ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.page-title { font-family:'Sora',sans-serif; font-weight:700; font-size:1.1rem; }
.page-sub { font-size: 0.78rem; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.sidebar-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

.content-area { padding: 24px 28px; flex: 1; }

/* ===== Cards ===== */
.card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat-value { font-family: 'Sora', sans-serif; font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 0.76rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.stat-icon { margin-bottom: 6px; }

/* ===== Priority / Status Badges ===== */
.badge { font-family: 'DM Sans', sans-serif; }
.priority-critical { background: #fef2f2; color: #dc2626; }
.priority-high { background: #fffbeb; color: #d97706; }
.priority-medium { background: #eff6ff; color: #2563eb; }
.priority-low { background: #f0fdf4; color: #16a34a; }

/* ===== Step Form ===== */
.step-indicator {
  display: flex; align-items: center;
  padding: 0;
  margin-bottom: 32px;
}
.step-item {
  display: flex; align-items: center; flex: 1;
}
.step-circle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: 'Sora', sans-serif;
  font-size: 0.9rem; transition: all 0.3s;
  background: var(--surface); color: var(--text-muted);
  flex-shrink: 0; position: relative; z-index: 1;
}
.step-circle.active { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(29,78,216,0.15); }
.step-circle.done { border-color: #10b981; background: #10b981; color: #fff; }
.step-label { margin-left: 10px; }
.step-label .s-title { font-weight: 600; font-size: 0.82rem; }
.step-label .s-sub { font-size: 0.72rem; color: var(--text-muted); }
.step-connector { flex: 1; height: 2px; background: var(--border); margin: 0 12px; transition: background 0.3s; }
.step-connector.done { background: #10b981; }

.form-step { display: none; animation: fadeSlide 0.3s ease; }
.form-step.active { display: block; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.form-label { font-weight: 600; font-size: 0.82rem; color: #374151; margin-bottom: 6px; }
.form-control, .form-select {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 9px 14px; font-size: 0.875rem; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
  outline: none;
}

/* ===== File Upload ===== */
.upload-zone {
  border: 2px dashed #cbd5e1; border-radius: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: #f8fafc;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone i { font-size: 2rem; color: #94a3b8; }
.upload-zone.dragover i { color: var(--primary); }

.attachment-card {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: var(--surface);
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 8px; transition: box-shadow 0.15s;
}
.attachment-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.att-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items:center; justify-content:center; font-size: 1.1rem; flex-shrink:0; }
.att-meta { flex: 1; min-width: 0; }
.att-name { font-weight: 600; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-size { font-size: 0.72rem; color: var(--text-muted); }
.btn-att-action { background: none; border: none; padding: 4px 6px; border-radius: 6px; cursor: pointer; color: var(--text-muted); transition: all 0.15s; }
.btn-att-action:hover.delete { color: #ef4444; background: #fef2f2; }
.btn-att-action:hover.view { color: var(--primary); background: var(--primary-soft); }

/* ===== Notes / Tags ===== */
.note-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f1f5f9; border-radius: 20px;
  padding: 4px 12px; font-size: 0.78rem; font-weight: 500;
}
.note-tag .remove { cursor: pointer; color: var(--text-muted); }
.note-tag .remove:hover { color: #ef4444; }

/* ===== User Chip ===== */
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); border: 1px solid #bfdbfe;
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.78rem; font-weight: 500; color: var(--primary);
}
.user-chip .avatar-xs {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Ticket List ===== */
.ticket-row {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  margin-bottom: 10px; cursor: pointer;
  transition: all 0.18s;
}
.ticket-row:hover { border-color: #93c5fd; box-shadow: 0 4px 16px rgba(29,78,216,0.09); transform: translateY(-1px); }

/* ===== Modal ===== */
.modal-content { border-radius: 18px; border: none; }
.modal-header { border-bottom: 1px solid var(--border); padding: 20px 24px; }
.modal-body { padding: 24px; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-area { padding: 16px; }
}

/* ===== SLA Badge ===== */
.sla-badge { display:inline-flex; align-items:center; gap:5px; font-size:0.74rem; font-weight:600; padding: 3px 10px; border-radius: 20px; }
.sla-ok { background:#f0fdf4; color:#16a34a; }
.sla-warn { background:#fffbeb; color:#d97706; }
.sla-breach { background:#fef2f2; color:#dc2626; }

/* ===== Hierarchy Picker ===== */
.hierarchy-box {
  border: 1.5px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.hierarchy-header {
  background: #f8fafc; padding: 10px 14px;
  font-weight: 600; font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.hierarchy-body { padding: 12px; max-height: 220px; overflow-y: auto; }
.hierarchy-body::-webkit-scrollbar { width: 4px; }
.hierarchy-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.hier-dept { margin-bottom: 8px; }
.hier-dept-label {
  font-weight: 600; font-size: 0.78rem;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 4px 0;
  color: var(--text-main);
}
.hier-users { padding-left: 20px; }
.hier-user-item {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0; font-size: 0.8rem;
}
.hier-user-item label { cursor: pointer; display:flex; align-items:center; gap:6px; margin:0; }

/* Print & misc */
.divider-label {
  display: flex; align-items: center; gap: 10px; color: var(--text-muted);
  font-size: 0.76rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; margin: 18px 0 14px;
}
.divider-label::before, .divider-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
