/* ============================================
   SUPPORTDESK — GLOBAL STYLES
   Theme: Deep Navy + Electric Blue + White
   Font: Inter (body) + Poppins (display)
   ============================================ */

:root {
  --navy:        #0D1B3E;
  --blue:        #1565C0;
  --blue-mid:    #1976D2;
  --blue-light:  #E3F0FC;
  --accent:      #00B0FF;
  --white:       #FFFFFF;
  --bg:          #F0F4FA;
  --card:        #FFFFFF;
  --border:      #D6E4F7;
  --text-dark:   #0D1B3E;
  --text-mid:    #3D5275;
  --text-light:  #7A92B0;

  --high:        #D32F2F;
  --high-bg:     #FFEBEE;
  --medium:      #F57F17;
  --medium-bg:   #FFF8E1;
  --low:         #2E7D32;
  --low-bg:      #E8F5E9;

  --open:        #E65100;
  --open-bg:     #FFF3E0;
  --inprogress:  #1565C0;
  --inprogress-bg: #E3F0FC;
  --resolved:    #2E7D32;
  --resolved-bg: #E8F5E9;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(13,27,62,0.08);
  --shadow-md:   0 8px 40px rgba(13,27,62,0.13);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ NAVBAR ============ */
.navbar {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}

.nav-logo {
  font-size: 1.4rem;
  background: var(--accent);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links { display: flex; gap: 8px; }

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-link.active { color: var(--white); background: var(--blue-mid); }

/* ============ HERO (Employee Page) ============ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1A3A6E 60%, #1565C0 100%);
  padding: 52px 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  max-width: 480px;
}

.hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 220px;
  flex-shrink: 0;
}

.badge-icon { font-size: 2rem; }
.badge-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.badge-value { font-size: 1.1rem; font-weight: 700; color: var(--accent); }

/* ============ AGENT HERO ============ */
.agent-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1A3A6E 60%, #1565C0 100%);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.stat-cards { display: flex; gap: 16px; }

.stat-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 20px 28px;
  text-align: center;
  min-width: 110px;
}

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-open .stat-number   { color: #FFB74D; }
.stat-inprogress .stat-number { color: var(--accent); }
.stat-resolved .stat-number   { color: #81C784; }

/* ============ PAGE WRAPPER ============ */
.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  flex: 1;
  width: 100%;
}

/* ============ FORM SECTIONS ============ */
.ticket-form { display: flex; flex-direction: column; gap: 28px; }

.form-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--blue-light);
}

.section-icon {
  font-size: 1.6rem;
  background: var(--blue-light);
  border-radius: 10px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.section-desc { font-size: 0.88rem; color: var(--text-light); }

/* ============ FORM GRID ============ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.2px;
}

.required { color: #D32F2F; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #FAFCFF;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ============ REASON CARDS ============ */
.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.reason-card { cursor: pointer; }
.reason-card input[type="radio"] { display: none; }

.reason-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #FAFCFF;
  transition: all 0.2s;
}

.reason-card:hover .reason-body {
  border-color: var(--blue-mid);
  background: var(--blue-light);
}

.reason-card input:checked + .reason-body {
  border-color: var(--blue-mid);
  background: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.15);
}

.reason-emoji  { font-size: 1.8rem; }
.reason-label  { font-size: 0.82rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.reason-hint   { font-size: 0.73rem; color: var(--text-light); line-height: 1.4; }

/* ============ SUBMIT BUTTON ============ */
.submit-btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 15px 36px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(21,101,192,0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21,101,192,0.4);
}

.submit-btn:active { transform: translateY(0); }
.btn-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.submit-btn:hover .btn-arrow { transform: translateX(4px); }

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.filter-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 0.85rem; font-weight: 600; color: var(--text-mid); }

.filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-mid);
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.search-box input {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  width: 260px;
  color: var(--text-dark);
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}

/* ============ TICKET TABLE ============ */
.table-wrapper {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.ticket-table thead tr {
  background: var(--navy);
}

.ticket-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.ticket-table td {
  padding: 16px;
  font-size: 0.88rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.ticket-table tbody tr:hover { background: #F7FAFF; }

/* Ticket ID */
.ticket-id {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue-mid);
  background: var(--blue-light);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Employee Cell */
.emp-cell { display: flex; align-items: center; gap: 10px; }

.emp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--accent) 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-name  { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.emp-spec  { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }

/* Dept tag */
.dept-tag {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 4px;
}

/* Reason tag */
.reason-tag {
  background: #F3F0FF;
  color: #5C35C5;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Issue */
.issue-title { font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.issue-desc  { font-size: 0.75rem; color: var(--text-light); max-width: 200px; }

/* Priority Badge */
.priority-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
  white-space: nowrap;
}
.priority-badge.high   { background: var(--high-bg);   color: var(--high);   }
.priority-badge.medium { background: var(--medium-bg); color: var(--medium); }
.priority-badge.low    { background: var(--low-bg);    color: var(--low);    }

/* Status Badge */
.status-badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
  white-space: nowrap;
}
.status-badge.open       { background: var(--open-bg);       color: var(--open);       }
.status-badge.inprogress { background: var(--inprogress-bg); color: var(--inprogress); }
.status-badge.resolved   { background: var(--resolved-bg);   color: var(--resolved);   }

/* Action Buttons */
.action-btns { display: flex; flex-direction: column; gap: 6px; }

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.action-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.progress-btn { background: var(--inprogress-bg); color: var(--inprogress); }
.progress-btn:hover:not(:disabled) { background: var(--inprogress); color: white; }

.resolve-btn { background: var(--low-bg); color: var(--low); }
.resolve-btn:hover:not(:disabled) { background: var(--low); color: white; }

.delete-btn { background: var(--high-bg); color: var(--high); }
.delete-btn:hover:not(:disabled) { background: var(--high); color: white; }

/* ============ EMPTY STATE ============ */
.empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.empty-state p  { font-size: 0.9rem; color: var(--text-light); }

/* ============ FOOTER ============ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 18px;
  font-size: 0.8rem;
  margin-top: auto;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero, .agent-hero { flex-direction: column; padding: 32px 20px; }
  .hero-badge { width: 100%; }
  .stat-cards { width: 100%; justify-content: center; }
  .form-section { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .reason-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 16px; }
  .hero-title { font-size: 1.6rem; }
  .search-box input { width: 100%; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
}

/* ============ PORTAL LABEL (replaces nav links) ============ */
.nav-portal-label {
  background: rgba(255,255,255,0.15);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid rgba(0,176,255,0.4);
}

/* ============ THANK YOU OVERLAY ============ */
.thankyou-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,62,0.7);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.thankyou-card {
  background: var(--white);
  border-radius: 20px;
  padding: 52px 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(13,27,62,0.25);
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.thankyou-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.thankyou-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.thankyou-msg {
  font-size: 0.97rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 24px;
}

.thankyou-ticket-id {
  background: var(--blue-light);
  color: var(--blue);
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 2px dashed var(--blue-mid);
}

.thankyou-note {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

.thankyou-btn {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 13px 32px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(21,101,192,0.3);
}

.thankyou-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21,101,192,0.4);
}

/* ============ LOADING STATE ============ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  gap: 14px;
  color: var(--text-mid);
  font-size: 0.95rem;
}

.loading-spinner { font-size: 2.5rem; animation: spin 1.5s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ============ REFRESH BUTTON ============ */
.filter-right-group { display: flex; align-items: center; gap: 12px; }

.refresh-btn {
  padding: 9px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-mid);
  transition: all 0.2s;
  white-space: nowrap;
}

.refresh-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
