@font-face {
  font-family: 'Neuropol';
  src: url('../fonts/NEUROPOL.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── Reset & Temel ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:    #0f1629;
  --navy2:   #1a2340;
  --navy3:   #243058;
  --blue:    #00aeef;
  --blue2:   #0090c8;
  --orange:  #f7a800;
  --green:   #22c55e;
  --red:     #ef4444;
  --yellow:  #eab308;
  --gray-50: #d8e2ed;
  --gray-100:#cdd8e6;
  --gray-200:#b8c8da;
  --gray-400:#94a3b8;
  --gray-600:#475569;
  --gray-800:#1e293b;
  --white:   #ffffff;
  --shadow:  0 2px 8px rgba(0,0,0,.12);
  --shadow-lg:0 8px 30px rgba(0,0,0,.18);
  --radius:  10px;
  --tr:      .2s ease;
}
html { font-size: 15px; }
body {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue2); }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
img { max-width: 100%; }

/* ── Login ─────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { height: 52px; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 6px; }
.login-sub   { font-size: .9rem; color: var(--gray-400); text-align: center; margin-bottom: 28px; }

/* ── Form ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .83rem; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: .9rem; transition: var(--tr);
  background: var(--white); color: var(--gray-800);
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,174,239,.12); }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { appearance: none; 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 d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 8px; font-size: .88rem; font-weight: 600;
  transition: var(--tr); cursor: pointer; border: none;
}
.btn-primary  { background: var(--blue);   color: #fff; }
.btn-primary:hover  { background: var(--blue2); }
.btn-success  { background: var(--green);  color: #fff; }
.btn-success:hover  { background: #16a34a; }
.btn-danger   { background: var(--red);    color: #fff; }
.btn-danger:hover   { background: #dc2626; }
.btn-warning  { background: var(--orange); color: #fff; }
.btn-warning:hover  { background: #d97706; }
.btn-outline  { background: transparent; border: 1.5px solid var(--gray-200); color: var(--gray-600); }
.btn-outline:hover  { border-color: var(--blue); color: var(--blue); }
.btn-navy     { background: var(--navy); color: #fff; }
.btn-navy:hover     { background: var(--navy3); }
.btn-sm { padding: 6px 13px; font-size: .8rem; border-radius: 6px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ── Layout: sidebar + main ────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Main Topbar ────────────────────────────────────────────── */
.main-topbar {
  height: 81px;
  background: var(--navy);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-topbar-title {
  font-size: 1.47rem;
  font-weight: 500;
  color: var(--blue);
}

/* ── Inventory Tile Grid ────────────────────────────────────── */
.inv-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  padding: 20px 28px 0;
}
@media(max-width:560px){ .inv-tile-grid { padding: 12px 16px 0; } }

/* ── App Tiles (dashboard & inventory) ─────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  padding: 28px;
}
.app-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 28px 16px; border-radius: 20px; cursor: pointer;
  background: #fff; border: 1px solid #f1f5f9;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
  text-decoration: none; position: relative; overflow: hidden;
}
.app-tile:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.app-tile:active { transform: translateY(0); }
.app-tile.active-filter { outline: 2px solid var(--blue); outline-offset: -2px; }
.app-tile-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.app-tile-icon svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; }
.app-tile-label { font-size: .82rem; font-weight: 700; color: #334155; text-align: center; line-height: 1.3; }
.app-tile-count {
  position: absolute; top: 12px; right: 12px;
  background: var(--blue); color: #fff;
  font-size: .68rem; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.app-tile-count.hidden { display: none; }

.sidebar {
  width: 240px; min-width: 240px;
  background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo img { height: 44px; }
.sidebar-user {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-user-name { font-size: .88rem; font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: .75rem; color: rgba(255,255,255,.45); margin-top: 2px; }
.sidebar-user-company { font-size: .75rem; color: rgba(255,255,255,.35); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.3); padding: 14px 20px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: .87rem; font-weight: 500;
  color: rgba(255,255,255,.6); cursor: pointer;
  transition: var(--tr); text-decoration: none; border-left: 3px solid transparent;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: var(--blue); background: rgba(0,174,239,.1); border-left-color: var(--blue); }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ── Main içerik ───────────────────────────────────────────── */
.main-content {
  margin-left: 240px;
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 28px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.page-body { padding: 28px; flex: 1; }

/* ── Stat kartları ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
  border-left: 4px solid transparent;
}
.stat-card.open       { border-left-color: var(--orange); }
.stat-card.in_progress{ border-left-color: var(--blue); }
.stat-card.pending    { border-left-color: var(--red); }
.stat-card.completed  { border-left-color: var(--green); }
.stat-card.total      { border-left-color: var(--gray-400); }
.stat-label { font-size: .78rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing:.05em; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; }

/* ── Tablo / Liste ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.card-title { font-size: .95rem; font-weight: 700; color: var(--navy); }
.card-body  { padding: 22px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
thead th {
  text-align: left; padding: 10px 14px;
  font-size: .73rem; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--tr); }
tbody tr:hover { background: var(--gray-50); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 12px 14px; color: var(--gray-800); vertical-align: middle; }
.td-link { cursor: pointer; color: var(--navy); font-weight: 600; }
.td-link:hover { color: var(--blue); }

/* ── Badge / Durum ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: .73rem; font-weight: 700; white-space: nowrap;
}
.badge-open        { background: #fff3e0; color: #e65100; }
.badge-in_progress { background: #e0f2fe; color: #0369a1; }
.badge-pending     { background: #fef2f2; color: #b91c1c; }
.badge-completed   { background: #f0fdf4; color: #15803d; }
.badge-low         { background: #f1f5f9; color: #64748b; }
.badge-normal      { background: #eff6ff; color: #1d4ed8; }
.badge-high        { background: #fff7ed; color: #c2410c; }
.badge-critical    { background: #fef2f2; color: #b91c1c; }

/* ── Talep durum satır renkleri ─────────────────────────────── */
.data-table tbody tr.row-open { background: #ffedd5; font-weight: 600; }
.data-table tbody tr.row-open:hover { background: #fed7aa; }
.data-table tbody tr.row-completed { background: #f0fdf4; }
.data-table tbody tr.row-completed:hover { background: #dcfce7; }

/* ── Filtre satırı ─────────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px; align-items: center;
}
.filter-bar .form-input { max-width: 200px; padding: 7px 12px; font-size: .83rem; }
.filter-bar .form-input.search { max-width: 260px; }

/* ── Talep Detay ───────────────────────────────────────────── */
.ticket-detail-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 22px;
}
@media (max-width: 900px) { .ticket-detail-grid { grid-template-columns: 1fr; } }

.ticket-info-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.ticket-header    { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.ticket-title     { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.ticket-meta      { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--gray-400); }
.ticket-meta span { display: flex; align-items: center; gap: 4px; }

.notes-list { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; max-height: 480px; overflow-y: auto; }
.note-item {
  display: flex; gap: 12px;
}
.note-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff;
}
.note-avatar.customer { background: var(--blue2); }
.note-avatar.staff    { background: var(--navy3); }
.note-body   { flex: 1; }
.note-name   { font-size: .78rem; font-weight: 600; color: var(--gray-600); }
.note-text   { font-size: .87rem; color: var(--gray-800); margin-top: 2px; line-height: 1.5; }
.note-time   { font-size: .72rem; color: var(--gray-400); margin-top: 3px; }
.note-item.internal .note-body { background: #fffbeb; border-radius: 8px; padding: 8px 12px; border-left: 3px solid var(--orange); }

.note-form   { padding: 16px 24px; border-top: 1px solid var(--gray-200); }
.note-form textarea { font-size: .87rem; }

/* ── Sağ panel ─────────────────────────────────────────────── */
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; }
.detail-panel {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.detail-panel-title { font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray-400); margin-bottom: 14px; }
.detail-row { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--gray-100); font-size: .84rem; }
.detail-row:last-child { border-bottom: none; }
.detail-row-label { color: var(--gray-400); font-weight: 500; white-space: nowrap; }
.detail-row-val   { color: var(--gray-800); font-weight: 600; text-align: right; }

/* ── Ekler ─────────────────────────────────────────────────── */
.attachments-list { display: flex; flex-direction: column; gap: 8px; }
.attachment-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--gray-50); border-radius: 7px; font-size: .82rem;
}
.attachment-item a { color: var(--blue); font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { color: var(--gray-400); white-space: nowrap; }

/* ── Upload alanı ──────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--gray-200); border-radius: 8px;
  padding: 20px; text-align: center; cursor: pointer;
  transition: var(--tr); color: var(--gray-400); font-size: .84rem;
}
.upload-area:hover { border-color: var(--blue); color: var(--blue); }
.upload-area input { display: none; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: var(--blue); color: #fff; border-radius: 99px; font-size: .77rem; font-weight: 600;
}
.file-chip button { background: none; color: #fff; font-size: 1rem; line-height: 1; padding: 0; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--white); border-radius: 14px;
  padding: 28px; width: 100%; max-width: 500px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ── Toast bildirimi ───────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--gray-800); color: #fff;
  padding: 12px 18px; border-radius: 9px; font-size: .86rem; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toastIn .3s ease;
  display: flex; align-items: center; gap: 10px; min-width: 240px;
}
.toast.success { background: #166534; }
.toast.error   { background: #991b1b; }
.toast.warning { background: #92400e; }
@keyframes toastIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Boş durum ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--gray-400);
}
.empty-state svg { width: 52px; height: 52px; margin: 0 auto 16px; opacity: .35; display: block; }
.empty-state p   { font-size: .9rem; }

/* ── Yükleniyor ────────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-page { display: flex; align-items: center; justify-content: center; min-height: 300px; }

/* ── Sayfalama ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination button {
  width: 34px; height: 34px; border-radius: 7px; font-size: .83rem; font-weight: 600;
  background: var(--white); color: var(--gray-600); border: 1.5px solid var(--gray-200);
  transition: var(--tr);
}
.pagination button:hover  { border-color: var(--blue); color: var(--blue); }
.pagination button.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .page-body { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar .form-input { max-width: 100%; }
  .hamburger { display: flex !important; }
}
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--gray-600); border-radius: 2px; }

/* ── Sidebar link (alias) ─────────────────────────────────── */
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: .87rem; font-weight: 500;
  color: rgba(255,255,255,.6); text-decoration: none;
  transition: var(--tr); border-left: 3px solid transparent;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-link.active { color: var(--blue); background: rgba(0,174,239,.1); border-left-color: var(--blue); }
.sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo span { color: #fff; font-weight: 700; font-size: .95rem; }

/* ── User info (sidebar footer) ───────────────────────────── */
.user-info  { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
}
.user-name { font-size: .88rem; font-weight: 600; color: #fff; }
.user-role { font-size: .75rem; color: rgba(255,255,255,.45); }

/* ── Page header ──────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 28px 28px 0;
}
.page-title    { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.page-subtitle { font-size: .84rem; color: var(--gray-400); margin-top: 2px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.back-link { font-size: .8rem; color: var(--blue); display: block; margin-bottom: 4px; }

/* ── Filter bar extended ──────────────────────────────────── */
.filter-bar {
  padding: 0 28px;
  margin-top: 20px;
}
.filter-search { max-width: 280px !important; }
.filter-select { max-width: 180px !important; }

/* ── Stats grid (page-level padding) ─────────────────────── */
.stats-grid { padding: 20px 28px 0; margin-bottom: 0; }

/* ── Table wrapper ────────────────────────────────────────── */
.table-wrapper {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow-x: auto;
  margin: 20px 28px 0;
}
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table thead th {
  text-align: left; padding: 10px 14px;
  font-size: .73rem; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table thead th.sortable:hover { color: var(--primary); background: var(--gray-100); }
.data-table thead th.sort-active { color: var(--primary); }
.data-table thead th .sort-icon { font-size: .8em; opacity: .6; margin-left: 2px; }
.data-table thead th.sort-active .sort-icon { opacity: 1; }
.data-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--tr); }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody td { padding: 11px 14px; color: var(--gray-800); vertical-align: middle; }
.table-empty { text-align: center; padding: 40px !important; color: var(--gray-400); font-size: .9rem; }
.ticket-no { font-size: .78rem; background: var(--gray-100); padding: 2px 7px; border-radius: 5px; color: var(--navy); font-weight: 700; }
.ticket-title-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 20px 28px; }
.page-info  { font-size: .84rem; color: var(--gray-400); padding: 0 8px; }

/* ── Ticket detail layout ─────────────────────────────────── */
.ticket-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 20px;
  padding: 20px 28px;
}
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }
.ticket-main    { display: flex; flex-direction: column; gap: 20px; }
.ticket-sidebar { display: flex; flex-direction: column; gap: 16px; }

.card { margin: 0; }
.card + .card { margin-top: 0; }
.card-header h3 { font-size: .92rem; font-weight: 700; color: var(--navy); }
.ticket-description { font-size: .9rem; line-height: 1.7; white-space: pre-wrap; color: var(--gray-800); }

/* ── Meta rows (ticket sidebar) ───────────────────────────── */
.meta-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--gray-100); font-size: .83rem; }
.meta-row:last-child { border-bottom: none; }
.meta-label { color: var(--gray-400); font-weight: 500; white-space: nowrap; }

/* ── Notes ────────────────────────────────────────────────── */
.notes-list { display: flex; flex-direction: column; gap: 16px; }
.note-item { background: var(--gray-50); border-radius: 8px; padding: 14px; border-left: 3px solid var(--gray-200); }
.note-item.note-internal { background: #fffbeb; border-left-color: var(--orange); }
.note-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.note-author { display: flex; align-items: center; gap: 8px; }
.note-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy2); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.note-time   { font-size: .75rem; color: var(--gray-400); white-space: nowrap; }
.note-body   { font-size: .87rem; color: var(--gray-800); line-height: 1.6; white-space: pre-wrap; }
.note-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.attachment-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 5px; font-size: .75rem; color: var(--blue); font-weight: 600;
}

/* ── Attachments grid ─────────────────────────────────────── */
.attachments-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 7px; font-size: .82rem; color: var(--blue); font-weight: 600;
  text-decoration: none;
}
.attachment-item:hover { border-color: var(--blue); background: #e0f2fe; }

/* ── Form extras ──────────────────────────────────────────── */
.form-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 8px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }
.form-hint { font-size: .78rem; color: var(--gray-400); margin-top: 4px; display: block; }
.checkbox-label { display: flex; align-items: center; gap: 7px; font-size: .84rem; cursor: pointer; color: var(--gray-600); }
.checkbox-label input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--blue); }

/* ── Badge extras ─────────────────────────────────────────── */
.badge-success { background: #f0fdf4; color: #15803d; }
.badge-warning { background: #fff7ed; color: #c2410c; }
.badge-danger  { background: #fef2f2; color: #b91c1c; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }

/* ── Stat card extras ─────────────────────────────────────── */
.stat-card--warning { border-left: 4px solid var(--orange); }
.stat-card--info    { border-left: 4px solid var(--yellow); }
.stat-card--success { border-left: 4px solid var(--green); }
.stat-card--danger  { border-left: 4px solid #ef4444; }
.stat-card--danger .stat-value { color: #ef4444; }

/* ── Toast container ──────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}

/* ── Modal extras ─────────────────────────────────────────── */
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.modal-close { background: none; color: var(--gray-400); font-size: 1.1rem; padding: 4px; border-radius: 4px; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }
.modal-sm { max-width: 380px !important; }

/* ── Action buttons ───────────────────────────────────────── */
.action-buttons { display: flex; flex-direction: column; gap: 8px; }

/* ── Util ─────────────────────────────────────────────────── */
.text-muted { color: var(--gray-400); font-size: .82rem; }
code.ticket-no { font-family: inherit; }
a.ticket-no-link { text-decoration: none; }
a.ticket-no-link:hover code.ticket-no { background: var(--blue); color: #fff; }
a.ticket-title-link { color: var(--navy); text-decoration: none; font-weight: 600; }
a.ticket-title-link:hover { color: var(--blue); text-decoration: underline; }
