/* ========================================================
   WHM INDIA — AUTHENTIC WHMCS ADMIN THEME (V8 / BLEND HYBRID)
   ======================================================== */

:root {
  --whmcs-navy-dark: #15273b;
  --whmcs-navy: #1e395b;
  --whmcs-navy-light: #2c4d75;
  --whmcs-navy-hover: #162c47;
  --whmcs-bg: #edf0f5;
  --whmcs-border: #dbe1e8;
  --whmcs-card-bg: #ffffff;
  --whmcs-text-main: #2b3a4a;
  --whmcs-text-muted: #6c7a89;
  --whmcs-blue: #337ab7;
  --whmcs-blue-hover: #286090;
  --whmcs-green: #5cb85c;
  --whmcs-green-hover: #449d44;
  --whmcs-red: #d9534f;
  --whmcs-red-hover: #c9302c;
  --whmcs-amber: #f0ad4e;
  --whmcs-amber-hover: #ec971f;
  --whmcs-cyan: #5bc0de;
  --whmcs-cyan-hover: #31b0d5;
}

* {
  box-sizing: border-box;
}

body.whmcs-admin-body {
  margin: 0;
  padding: 0;
  background-color: var(--whmcs-bg);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--whmcs-text-main);
  line-height: 1.5;
}

/* ========================================================
   TOP HEADER BAR
   ======================================================== */
.whmcs-topbar {
  background-color: var(--whmcs-navy-dark);
  color: #ecf0f1;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.whmcs-brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.whmcs-brand-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.whmcs-version-pill {
  background: rgba(255,255,255,0.15);
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.whmcs-global-search {
  position: relative;
  width: 380px;
  max-width: 100%;
}

.whmcs-global-search input {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 7px 12px 7px 34px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: all 0.2s;
}

.whmcs-global-search input:focus {
  background: #ffffff;
  color: #1e293b;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}

.whmcs-global-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
}

.whmcs-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: #cbd5e1;
  pointer-events: none;
}

.whmcs-topbar-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.whmcs-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.whmcs-badge-pill:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.whmcs-badge-pill .count {
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}

.count-amber { background: var(--whmcs-amber); color: #000; }
.count-red { background: var(--whmcs-red); color: #fff; }
.count-green { background: var(--whmcs-green); color: #fff; }
.count-blue { background: var(--whmcs-blue); color: #fff; }

.whmcs-user-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #ffffff;
}

.whmcs-user-dropdown:hover {
  background: rgba(255,255,255,0.1);
}

.whmcs-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

/* ========================================================
   PRIMARY MENU BAR (MEGA WHMCS DROPDOWNS)
   ======================================================== */
.whmcs-nav-bar {
  background-color: var(--whmcs-navy);
  border-bottom: 2px solid #14273d;
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
  z-index: 999;
}

.whmcs-menu-item {
  position: relative;
}

.whmcs-menu-btn {
  background: transparent;
  border: none;
  color: #dbe4ee;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  text-decoration: none;
}

.whmcs-menu-btn i.arrow {
  font-size: 9px;
  color: #94a3b8;
  transition: transform 0.15s;
}

.whmcs-menu-item:hover .whmcs-menu-btn,
.whmcs-menu-item.active .whmcs-menu-btn {
  background: var(--whmcs-navy-hover);
  color: #ffffff;
}

.whmcs-menu-item:hover .whmcs-menu-btn i.arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.whmcs-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 2px solid var(--whmcs-blue);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-radius: 0 0 6px 6px;
  padding: 6px 0;
  z-index: 1001;
}

.whmcs-menu-item:hover .whmcs-dropdown {
  display: block;
}

.whmcs-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: #334155;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.whmcs-dropdown a:hover {
  background: #f1f5f9;
  color: var(--whmcs-blue);
  padding-left: 19px;
}

.whmcs-dropdown a i {
  width: 14px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.whmcs-dropdown .divider {
  height: 1px;
  background: #e2e8f0;
  margin: 5px 0;
}

.whmcs-dropdown .heading {
  padding: 6px 16px 2px 16px;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ========================================================
   SUB-BAR / BREADCRUMBS & QUICK ACTIONS
   ======================================================== */
.whmcs-subbar {
  background: #ffffff;
  border-bottom: 1px solid var(--whmcs-border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.whmcs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--whmcs-text-muted);
}

.whmcs-breadcrumb a {
  color: var(--whmcs-blue);
  text-decoration: none;
  font-weight: 600;
}

.whmcs-breadcrumb a:hover {
  text-decoration: underline;
}

.whmcs-breadcrumb .sep {
  color: #cbd5e1;
  font-size: 10px;
}

.whmcs-breadcrumb .current {
  color: #0f172a;
  font-weight: 700;
}

.whmcs-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================================
   BUTTONS (WHMCS SYSTEM BUTTONS)
   ======================================================== */
.whmcs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  line-height: 1.4;
}

.whmcs-btn-sm {
  padding: 4px 9px;
  font-size: 11px;
}

.whmcs-btn-lg {
  padding: 10px 18px;
  font-size: 14px;
}

.whmcs-btn-default {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}
.whmcs-btn-default:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.whmcs-btn-primary {
  background: var(--whmcs-blue);
  color: #ffffff;
  border-color: #2e6da4;
}
.whmcs-btn-primary:hover {
  background: var(--whmcs-blue-hover);
}

.whmcs-btn-success {
  background: var(--whmcs-green);
  color: #ffffff;
  border-color: #4cae4c;
}
.whmcs-btn-success:hover {
  background: var(--whmcs-green-hover);
}

.whmcs-btn-danger {
  background: var(--whmcs-red);
  color: #ffffff;
  border-color: #d43f3a;
}
.whmcs-btn-danger:hover {
  background: var(--whmcs-red-hover);
}

.whmcs-btn-warning {
  background: var(--whmcs-amber);
  color: #ffffff;
  border-color: #eea236;
}
.whmcs-btn-warning:hover {
  background: var(--whmcs-amber-hover);
}

.whmcs-btn-info {
  background: var(--whmcs-cyan);
  color: #ffffff;
  border-color: #46b8da;
}
.whmcs-btn-info:hover {
  background: var(--whmcs-cyan-hover);
}

/* Iconic WHMCS Module Command Buttons Bar */
.whmcs-module-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.whmcs-module-label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

/* ========================================================
   MAIN CONTENT AREA
   ======================================================== */
.whmcs-container {
  padding: 20px 24px;
  max-width: 1540px;
  margin: 0 auto;
}

.whmcs-view-section {
  display: none;
}
.whmcs-view-section.active {
  display: block;
}

/* Notice / Attention Bar */
.whmcs-alert-banner {
  background: #fff8e6;
  border-left: 4px solid #f59e0b;
  border-top: 1px solid #fde68a;
  border-right: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
}

.whmcs-alert-banner strong {
  color: #92400e;
}

/* Badges Bar Row */
.whmcs-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.whmcs-stat-box {
  background: #ffffff;
  border: 1px solid var(--whmcs-border);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.15s, box-shadow 0.15s;
}

.whmcs-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.whmcs-stat-info .stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.whmcs-stat-info .stat-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.whmcs-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-green { background: #ecfdf5; color: #059669; }
.icon-red { background: #fef2f2; color: #dc2626; }
.icon-purple { background: #f5f3ff; color: #7c3aed; }

/* Panels / Widgets */
.whmcs-panel {
  background: #ffffff;
  border: 1px solid var(--whmcs-border);
  border-radius: 6px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.whmcs-panel-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--whmcs-border);
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.whmcs-panel-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.whmcs-panel-title i {
  color: var(--whmcs-blue);
  font-size: 13px;
}

.whmcs-panel-body {
  padding: 16px;
}

/* Grid Layout for Dashboard */
.whmcs-grid-2col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}

@media (max-width: 1080px) {
  .whmcs-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   WHMCS DATA TABLES
   ======================================================== */
.whmcs-table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.whmcs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #ffffff;
}

table.whmcs-table th {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid #cbd5e1;
  padding: 9px 12px;
  font-weight: 700;
  color: #334155;
  text-align: left;
  white-space: nowrap;
}

table.whmcs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  color: #334155;
}

table.whmcs-table tbody tr:hover {
  background: #f8fafc;
}

table.whmcs-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

/* Status Badges */
.whmcs-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.status-active, .status-paid { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.status-pending, .status-unpaid { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.status-suspended, .status-overdue { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.status-terminated, .status-cancelled { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.status-progress { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* ========================================================
   WHMCS CLIENT PROFILE / SUMMARY VIEW
   ======================================================== */
.whmcs-client-hero {
  background: #ffffff;
  border: 1px solid var(--whmcs-border);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.whmcs-client-hero-title h2 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.whmcs-client-hero-title p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

/* WHMCS Tabs */
.whmcs-nav-tabs {
  display: flex;
  border-bottom: 1px solid #cbd5e1;
  margin-bottom: 20px;
  gap: 4px;
  overflow-x: auto;
}

.whmcs-nav-tabs button {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.whmcs-nav-tabs button:hover {
  background: #ffffff;
  color: var(--whmcs-blue);
}

.whmcs-nav-tabs button.active {
  background: #ffffff;
  color: var(--whmcs-blue);
  border-top: 3px solid var(--whmcs-blue);
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
}

.whmcs-tab-pane {
  display: none;
}
.whmcs-tab-pane.active {
  display: block;
}

/* ========================================================
   MODALS
   ======================================================== */
.whmcs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.whmcs-modal-overlay.active {
  display: flex;
}

.whmcs-modal {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 580px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  animation: whmcsModalIn 0.2s ease-out;
}

.whmcs-modal-lg {
  max-width: 820px;
}

@keyframes whmcsModalIn {
  from { opacity: 0; transform: translateY(-15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.whmcs-modal-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.whmcs-modal-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.whmcs-modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.whmcs-modal-close:hover {
  color: #0f172a;
}

.whmcs-modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
}

.whmcs-modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Forms */
.whmcs-form-group {
  margin-bottom: 14px;
}

.whmcs-form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}

.whmcs-form-group input,
.whmcs-form-group select,
.whmcs-form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 12.5px;
  color: #1e293b;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.whmcs-form-group input:focus,
.whmcs-form-group select:focus,
.whmcs-form-group textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.whmcs-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Terminal Log Box */
.whmcs-terminal {
  background: #0f172a;
  color: #38bdf8;
  padding: 16px;
  border-radius: 6px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 11.5px;
  line-height: 1.6;
  height: 260px;
  overflow-y: auto;
  border: 1px solid #1e293b;
}

/* Footer Copyright */
.whmcs-admin-footer {
  text-align: center;
  padding: 24px;
  font-size: 11.5px;
  color: #64748b;
  border-top: 1px solid var(--whmcs-border);
  margin-top: 40px;
  background: #f8fafc;
}

.whmcs-admin-footer a {
  color: var(--whmcs-blue);
  text-decoration: none;
  font-weight: 600;
}

.whmcs-admin-footer a:hover {
  text-decoration: underline;
}

/* ========================================================
   OFFICIAL GST TAX INVOICE STYLING & PRINT MEDIA
   ======================================================== */
.gst-invoice-doc {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 26px 28px;
  color: #1e293b;
  font-size: 12px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.gst-tax-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  border: 1px solid #cbd5e1;
}

.gst-tax-table th {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 10px 14px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  border: none !important;
}

.gst-tax-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  color: #1e293b;
  vertical-align: top;
}

.gst-tax-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.gst-status-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.gst-status-stamp.paid {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #86efac;
}

.gst-status-stamp.unpaid {
  background: #fee2e2;
  color: #b91c1c;
  border: 1.5px solid #fca5a5;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .whmcs-topbar,
  .whmcs-nav,
  .whmcs-admin-footer,
  .whmcs-btn,
  .whmcs-modal-close,
  .whmcs-modal-header button,
  .whmcs-view-section,
  #modal-whmcs-search,
  #modal-add-client,
  #modal-create-invoice,
  #modal-create-ticket,
  #modal-add-service,
  #modal-edit-product {
    display: none !important;
  }
  .whmcs-modal-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .whmcs-modal {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    overflow: visible !important;
  }
  .whmcs-modal-header {
    display: none !important;
  }
  .whmcs-modal-body {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .gst-invoice-doc {
    border: 1px solid #94a3b8 !important;
    padding: 20px !important;
    page-break-inside: avoid;
  }
}
