
:root {
  --primary: #0f172a;           /* Updated: Deep Slate */
  --accent-green: #10b981;      /* Updated: Emerald Green */
  --accent-yellow: #f59e0b;     /* Updated: Amber */
  --bg-light: #f1f5f9;          /* Updated: Slate 50 */
  --border-light: #e2e8f0;      /* Slate 200: For subtle outlines */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --text-dark: #1e293b;         /* Updated: Slate 800 */
  --highlight-orange: #059669;  /* Updated: Indigo Blue (#2563eb Premium SaaS feel) */
  --error-red: #dc2626;
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    --content-gutter: 1.5rem;    /* Updated for better mobile breathing room */
    --max-content-width: 1400px;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; /* Modernized font stack */
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh; 
  padding: 0; 
  overflow-x: hidden;
}

/* ==== Dark Mode === */
body.dark {
  background-color: #020617; /* Deeper Navy-Black */
  color: #f1f5f9;
}

body.dark .card,
body.dark .modal {
  background-color: #0f172a; /* Slate 900 */
  color: #f1f1f1;
  border: 1px solid #1e293b;
}

body.dark .modal input,
body.dark .modal select,
body.dark .modal textarea {
  background-color: #1e293b;
  color: #fff;
  border: 1px solid #334155;
}

body.dark .transaction-table th {
  background-color: #1e293b;
  color: #94a3b8;
}

body.dark .transaction-table td {
  background-color: transparent;
  color: black;
  border-bottom: 1px solid #1e293b;
}

body.dark .filter-bar input,
body.dark .filter-bar select,
body.dark .filter-bar button,
body.dark .pagination-controls button {
  background-color: #1e293b;
  color: #fff;
  border: 1px solid #334155;
}

body.dark .page-header button,
body.dark .modal button {
  background-color: var(--highlight-orange);
  color: #ffffff;
}

body.dark h1,
body.dark h2, 
body.dark h3 {
  color: white;
}

body.dark .card p {
  color: var(--accent-green);
}

body.dark .employee-card,
body.dark .summary-box,
body.dark #accountList .card,
body.dark .payslip-preview {
  background-color: #0f172a;
  color: #f1f1f1;
  border: 1px solid #1e293b;
}

body.dark .transaction-table th {
  background-color: #1e293b;
}

/* ------------------------------------
   App Disabled Overlay & Activation Form
   ------------------------------------ */

#app-disabled-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(2, 6, 23, 0.98); /* Deeper navy blur */
  backdrop-filter: blur(12px);
  z-index: 9999;
  color: white;
  padding: 2rem;
  text-align: center;
}

#app-disabled-overlay > div {
  padding: 3rem;
  background-color: #0f172a;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid #1e293b;
  width: 100%;
  max-width: 32rem;
  margin: 0 1rem;
  animation: fadeIn 0.5s ease-out forwards;
}

#app-disabled-overlay h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #fca5a5;
}

#app-disabled-overlay p {
  font-size: 1.125rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

#app-disabled-overlay p.text-gray-400 {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}

#activation-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#activation-form input {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#activation-form input:focus {
  outline: none;
  border-color: var(--highlight-orange);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

#activation-form button {
  padding: 1rem 1.5rem;
  background-color: var(--error-red);
  color: white;
  font-weight: 700;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3);
  transition: all 0.2s;
  transform: scale(1);
  border: none;
}

#activation-form button:hover {
  background-color: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.4);
}

#activation-form button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.5);
}

#activation-status-message {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 1rem;
}

@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } 
}

.animate-fade-in-up { 
  animation: fadeIn 0.5s ease-out forwards; 
}

header {
  background-color: var(--primary);
  color: white;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 1px solid #1e293b;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.header-title-container {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}

#license-expiry-display {
  margin-top: 0;
  color: var(--accent-green);
  font-weight: 600;
  font-size: 0.9rem;
}

/* 1. Reset and Unified Container */
.nav-left, .nav-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 2. Unified "Button & Summary" Style (The Capsule Look) */
header nav button, 
nav .nav-left summary, 
.nav-right button {
  background: rgba(255, 255, 255, 0.08); /* Unified transparency */
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px; /* Unified padding */
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px; /* Force identical height */
  list-style: none; /* Removes summary arrow */
}

/* Remove default summary markers */
nav summary::-webkit-details-marker,
nav summary::marker {
  display: none;
}

/* 3. Unified Hover State */
header nav button:hover, 
nav .nav-left summary:hover, 
.nav-right button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* 4. The "Link" Style (Only for the actual navigation menu links) */
/* Use a specific class like .nav-link if you want these to look like text links */
nav button.nav-link {
  background: transparent;
  border: none;
  border-radius: 0;
  height: auto;
  padding: 4px 0;
  color: #94a3b8;
  border-bottom: 2px solid transparent;
}

nav button.nav-link.active {
  color: white;
  border-bottom-color: var(--accent-green);
}

/* 5. Cleaned Dropdown Positioning */
nav .nav-left details {
  position: relative;
}

nav .nav-left .dropdown {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  position: absolute;
  top: calc(100% + 8px); /* Anchors dropdown exactly below button */
  left: 0;
  z-index: 1000;
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Buttons INSIDE the dropdown should NOT look like the buttons outside */
nav .nav-left .dropdown button {
  width: 100%;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 10px 12px;
  text-align: left;
  height: auto;
  font-weight: 500;
  justify-content: flex-start;
}

nav .nav-left .dropdown button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.content-wrapper {
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--content-gutter);
}

main {
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--content-gutter);
}

/* ==== Auth Tabs ==== */
#authTabs button {
  margin-right: 1rem;
}


.user-info-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 10px;
    line-height: 1.4;
}
.user-info-badge p {
    margin: 0;
    font-size: 12px;
    color: #334155;
}


/* ==== Page Header ==== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.025em;
}

.page-header button {
  background-color: var(--highlight-orange);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
  transition: all 0.2s;
}

.page-header button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* Layout for the banner */
#trial-marketing-banner {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.banner-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #f1f5f9;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
}

.banner-close-btn:hover {
    color: #e74c3c;
}

/* Mobile: Hide image when screen is narrow */
@media (max-width: 600px) {
    #trial-marketing-banner .image-container {
        display: none;
    }
}

/* Add this to your CSS to handle the spacing between alerts */
#closed-period-alert:not(:empty) {
    margin-bottom: 15px;
}

/* Optional: Add a smooth fade-in for the banner */
#trial-marketing-banner {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* AI Insight Card Base */
#ai-insights-card {
    transition: all 0.5s ease;
    border: none !important;
    color: white !important;
}

/* Healthy - Vibrant Emerald Gradient (Aligned with your new Green) */
.status-healthy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    color: white !important;
}

/* Warning - Refined Amber (More "Premium" than standard yellow) */
.status-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    color: white !important; /* Changed to white for a cleaner SaaS look */
}

/* Critical - Deep Crimson (High Contrast) */
.status-critical {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    animation: pulse-red-intensity 2s infinite;
    color: white !important;
}


/* Force text colors to be readable on dark backgrounds */
.status-healthy h2, .status-healthy h6, .status-healthy p,
.status-critical h2, .status-critical h6, .status-critical p {
    color: white !important;
}

.status-healthy .text-muted, .status-critical .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

/* Intensity Pulse for Critical State */
@keyframes pulse-red-intensity {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 4px 25px rgba(239, 68, 68, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
}

.status-healthy .fa-robot, .status-critical .fa-robot {
    color: white !important;
}

/* 3. Smooth transition for status changes */
#ai-insights-card .badge {
    transition: all 0.5s ease;
}

#runway-value {
    line-height: 1.2;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#runway-value small {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Standardized Buttons */
.budget-actions button,
.report-actions button,
.settings-section button,
.filter-bar button,
.tb-controls button,
.btn-primary,
.btn-secondary {
  background-color: #059669; 
  color: #fff;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.budget-actions button:hover, .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ==== Filter Bar ==== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
}

/* ==== Table Controls ==== */
/* === FIXED: Transactions Page Layout === */
.transactions-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 0;
}

.transactions-wrapper h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin: 0 0 1rem 0;
  padding-left: 0.5rem;
}

.transaction-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.transaction-controls input[type="date"],
.transaction-controls input[type="text"] {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.transaction-controls button {
  background-color: var(--highlight-orange);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.transaction-controls button:hover {
  background-color: #e68f00;
}

#transactionsTable {
  width: 100%;
  padding-left: 0.5rem;
}

#paginationControls {
  padding-left: 0.5rem;
}

.pagination {
  margin-top: 1rem;
  text-align: center;
}

.pagination button {
  margin: 0 5px;
  padding: 6px 12px;
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-controls button {
  background-color: #d9d9d9;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* ==== Transaction Table ==== */
.transaction-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.transaction-table th {
  background: var(--primary); /* Slate 900 */
  color: #f1f5f9;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 14px;
}

.transaction-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.transaction-table tr:hover {
  background-color: #f8fafc !important;
}

.transaction-table td {
  cursor: pointer;
}

/* ==== Dashboard Grid ==== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  padding: 0.5rem;
}

/* ==== Card Styles ==== */
.card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem;
  /* Use the new Medium shadow for a clean lift */
  box-shadow: var(--shadow-md);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1; /* Darkens border slightly on hover */
}

.card h3 {
  font-size: 1rem;
  color: #102A43;
  margin-bottom: 0.5rem;
}
.card p {
  font-size: 1.25rem;
  color: #000;
}
.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.card-actions button {
  padding: 4px 10px;
  font-size: 0.8rem;
  background-color: #d9d9d9;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ==== Summary Card ==== */
.summary-card {
  background: #059669; !important;
  border: none !important;
  /* Add a colored shadow so the yellow "glows" slightly */
  box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
  color: #0f172a !important;
  font-weight: bold;
  text-align: center;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(245, 158, 11, 0.4);
}

/* ==== Chart Card ==== */
.chart-card canvas {
  max-width: 100%;
  height: 200px;
}

/* ==== List Card ==== */
.list-card ul {
  list-style: none;
  padding-left: 0;
  font-size: 0.95rem;
}
.list-card li {
  margin-bottom: 0.5em;
}

/* ==== Modal System (Standardized) ==== */
.modal-overlay {
  position: fixed; /* CRITICAL: Keeps overlay pinned to screen */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7); /* Your new slate color */
  backdrop-filter: blur(4px);
  display: flex; /* Centers the modal */
  justify-content: center;
  align-items: center;
  z-index: 2000; /* High z-index to stay on top */
}

.modal {
  background-color: white;
  color: var(--text-dark);
  width: 95%; /* Responsive width */
  max-width: 550px; /* Standard width */
  max-height: 90vh; /* CRITICAL: Prevents modal from leaving screen */
  overflow-y: auto; /* CRITICAL: Enables scrolling for long forms */
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #f1f5f9;
  position: relative;
  animation: fadeIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.modal h2 {
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
  margin-top: 0;
}

.modal h5 {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease-out forwards;
  animation-delay: 0.3s;  
  font-style: italic;
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.modal form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%; /* Ensures inputs don't shrink */
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box; /* Prevents padding from adding to width */
}

.modal button {
  background-color: var(--highlight-orange);
  color: white;
  padding: 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.modal .close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  z-index: 10;
}

.modal .close-btn:hover {
  color: #000;
}

.modal.hidden,
.modal-overlay.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.modal.wide {
  max-width: 900px; /* Increased from 700 to fit your new table layouts */
}

.modal ul {
  list-style: none;
  padding: 0;
}

.modal li {
  margin-bottom: 8px;
}


#clientForm input {
  width: 100%;
  padding: 10px;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

#clientForm button {
  background-color: var(--highlight-orange);
  color: #ccc;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

#vendorList .card h3 {
  margin-bottom: 0.4rem;
}

textarea {
  width: 100%;
  min-height: 60px;
  font-family: inherit;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}

nav {
  display: flex;
  flex: 1;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-left: 2rem;
}

.nav-left button,
.nav-right button {
  margin-right: 0.5rem;
}

.line-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.line-item input, .line-item select {
  flex: 1;
}

.recon-form {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 1.25rem;
}

.recon-form label {
  font-weight: bold;
  color: var(--text-dark);
}

.recon-form input,
.recon-form select {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.recon-form button {
  background-color: var(--highlight-orange);
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

@media print {
    /* Hide everything by default */
    body * {
        visibility: hidden;
    }

    /* Show only the report container and its children */
    #reconReportContainer, #reconReportContainer * {
        visibility: visible;
    }

    /* Position the report at the very top of the printed page */
    #reconReportContainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Hide the action buttons (Print, Reverse, Back) on the physical paper */
    .no-print, 
    #printReportBtn, 
    #reverseReconciliationBtn, 
    #backToReconciliationsBtn {
        display: none !important;
    }

    /* Remove any background gray colors to save user ink/toner */
    .bg-gray-50, .bg-gray-100 {
        background-color: transparent !important;
        border: 1px solid #eee;
    }
}


/* ===== EMPLOYEE & PAYROLL PAGE STYLES ===== */
.employee-card {
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-left: 6px solid var(--accent-green);
  padding: 1.5rem;
  border-radius: 12px;
}

#employeeList {
  margin: 1rem 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.export-buttons button {
  background-color: var(--highlight-orange);
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.export-buttons button:hover {
  background-color: #e68f00;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  align-items: center;
}

.filter-bar label {
  font-weight: bold;
  color: var(--primary);
  display: flex;
  flex-direction: column;
}

.filter-bar input[type="month"] {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* ===== TRANSACTION TABLE ===== */
.transaction-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
}
.transaction-table th,
.transaction-table td {
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 0.95rem;
  text-align: left;
}

.transaction-table th {
  background-color: var(--primary);
  color: white;
}

.transaction-table td button {
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.transaction-table td button:hover {
  background-color: #fcd24d;
}

/* ===== MODAL FORM FIELDS ===== */
.modal form label {
  font-weight: bold;
  color: var(--primary);
}
.modal form label input,
.modal form label select {
  margin-top: 4px;
}

/* ===== COA PAGE ===== */
#accountList {
  margin-top: 1.5rem;
}

#accountList .card {
  background: white;
  padding: 1.25rem;
  border-left: 4px solid var(--accent-green);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  transition: transform 0.2s;
}

#accountList .card:hover {
  transform: translateX(4px);
}

#accountList .card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===== SUMMARY BOXES ===== */
.summary-box {
  background: linear-gradient(135deg, var(--accent-green) 0%, #065f46 100%);
  color: white;
  padding: 1.5rem;
  text-align: center;
  border-radius: 14px;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
}

/* ===== PAYSLIP PREVIEW (Optional if displaying in browser before PDF) ===== */
.payslip-preview {
  background: white;
  padding: 3rem;
  margin: 2rem auto;
  max-width: 700px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  color: var(--text-dark);
}

.payslip-preview h2 {
  text-align: center;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1rem;
}

.payslip-preview p {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}
.payslip-preview .amount {
  font-weight: bold;
  font-size: 1.1rem;
}

.icon-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn i {
  font-size: 16px;
  color: var(--primary);
}

.icon-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.icon-btn.danger i { color: #dc2626; }
.icon-btn.danger:hover { background: #fee2e2; border-color: #fca5a5; }

.icon-btn.info i { color: var(--highlight-orange); }
.icon-btn.info:hover { background: #eff6ff; border-color: #bfdbfe; }


/* ==== Dropdown Navigation Fixes ==== */
nav .nav-left details {
  position: relative;
}

nav .nav-left summary {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

nav .nav-left summary::marker {
  display: none;
}

nav .nav-left summary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Keep header height fixed even when dropdown opens */
header {
  position: relative;
  z-index: 999;
}

nav .nav-left .dropdown {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}

nav .nav-left .dropdown button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}

nav .nav-left .dropdown button:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Optional: adjust spacing */
.nav-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-left,
.nav-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.nav-left details,
.nav-left button,
.nav-right button {
  margin: 0;
}

/* ==== Journal Page Layout ==== */
.journal-wrapper {
  padding: 1.5rem 0;
}

.journal-wrapper h1 {
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--primary);
}

.journal-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  width: 100%;
}

.journal-controls button {
  background-color: var(--highlight-orange);
  color: white;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.journal-controls button:hover {
  background-color: #e68f00;
}

#journalTable {
  width: 100%;
  padding-left: 0.5rem;
}

.modal.journal-modal {
  max-width: 900px;
  width: 95%;
}

.journal-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.journal-lines .line-item {
  display: grid;
  grid-template-columns: 1.2fr 2.5fr 1fr 1fr auto;
  gap: 10px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 8px;
}

.journal-lines .line-item input,
.journal-lines .line-item select {
  background: white;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 6px;
}

.journal-lines .line-item button {
  background-color: #ff4d4d;
  border: none;
  border-radius: 6px;
  color: white;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.journal-lines .line-item button:hover {
  background-color: #e03333;
}

.journal-totals {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  margin-top: 1rem;
  font-weight: bold;
  color: var(--primary);
}

.wide-modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-row label {
  flex: 1 1 200px;
}
.invoice-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.invoice-item input {
  flex: 1;
}
.invoice-item button {
  background: #ccc;
  border: none;
  padding: 0.3rem;
  cursor: pointer;
}

.wide-modal {
  width: 95vw;
  max-width: 1000px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
}

.invoice-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.invoice-logo {
  height: 50px;
  margin-bottom: 0.5rem;
}

.invoice-addresses {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.invoice-summary p {
  margin: 0.25rem 0;
  text-align: right;
}

.invoice-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

form#systemAccountsForm {
  max-width: 400px;
  margin-top: 20px;
}

form#systemAccountsForm label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

form#systemAccountsForm select {
  width: 100%;
  padding: 5px;
  margin-bottom: 10px;
}

.highlight-system {
  background-color: #f9f9f9;
}

.auth-modal {
  max-width: 400px;
  text-align: center;
}

.auth-form input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.auth-form button {
  width: 100%;
  padding: 10px;
  background: var(--highlight-orange);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: bold;
}

.auth-form button:hover {
  background: var(--primary);
}

.tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: #f5f5f5;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.subheading {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* ==== TRIAL BALANCE & TABLES ==== */
#trialBalanceTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

#trialBalanceTable th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
}

#trialBalanceTable th, 
#trialBalanceTable td {
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 16px;
}

#trialBalanceTable th:first-child, 
#trialBalanceTable td:first-child {
    text-align: left;
}

#trialBalanceTable a {
    color: var(--highlight-orange);
    text-decoration: none;
    font-weight: 600;
}

/* Table container */
.invoice-table-container {
  margin: 20px auto;
  max-width: 1200px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Table styles */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 14px;
  color: #333;
}

/* Header */
.invoice-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #e3e6ea;
}

.invoice-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Rows */
.invoice-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.invoice-table tbody tr:hover {
  background-color: #f1f3f5;
}

/* Cells */
.invoice-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

/* Status badge */
.invoice-status {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.invoice-status.paid { background: #dcfce7; color: #166534; }
.invoice-status.unpaid { background: #fef9c3; color: #854d0e; }
.invoice-status.overdue { background: #fee2e2; color: #991b1b; }

/* Action buttons */
.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions button {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

/* ==== Updated Table Actions with Emerald Green ==== */

/* View Button - Now Emerald Green */
.view-btn {
  background-color: #f1f5f9 !important; /* Forces the change */
  color: #475569; !important;           /* White text for contrast */
  border: none;
}

.view-btn:hover {
  background-color: #047857 !important; /* Slightly darker green on hover */
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.4);
  color: #ccc;
}

/* Edit Button - Neutral Slate */
.edit-btn {
  background-color: #f1f5f9 !important;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.edit-btn:hover {
  background-color: #047857 !important; /* Slightly darker green on hover */
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.4);
  color: #ccc;
}

/* Delete Button - Soft Red */
.delete-btn {
  background-color: #f1f5f9 !important;
  color: #475569;
}

.delete-btn:hover {
  background-color: #047857 !important; /* Slightly darker green on hover */
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.4);
  color: #ccc;
}

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

/* ===========================
   Banking Forms
   =========================== */
form#receivePaymentForm,
form#payVendorForm,
#invoiceForm,
#billForm {
  max-width: 850px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

form#receivePaymentForm h1,
form#payVendorForm h1,
#invoiceForm h3,
#billForm h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.025em;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1rem;
}

form#receivePaymentForm h1,
form#payVendorForm h1 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #333;
}

/* Group spacing */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

/* Labels */
.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #475569;
}

/* Inputs, Selects, Textareas */
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  font-size: 1rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background-color: #fff;
  border-color: var(--highlight-orange);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Document lists (Invoices, Bills, Notes) */
#clientDocumentList,
#vendorDocumentList {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
}

#clientDocumentList div,
#vendorDocumentList div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#clientDocumentList label,
#vendorDocumentList label {
  font-size: 0.9rem;
  color: #333;
  margin-right: 10px;
  flex: 1;
}

.partial-payment-input {
  width: 130px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

/* Buttons inside forms */
form#receivePaymentForm button[type="submit"],
form#payVendorForm button[type="submit"] {
  margin-top: 15px;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}

/* ===========================
   Invoice / Credit Note Forms
   =========================== */

#invoiceForm {
  max-width: 800px;         /* keeps form from stretching too wide */
  margin: 20px 0 20px 40px; /* left-aligned with some indent */
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#invoiceForm h3 {
  margin-top: 20px;
  font-size: 1.2em;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

/* Form groups */
#invoiceForm .form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

#invoiceForm .form-group label {
  font-weight: 600;
  margin-bottom: 5px;
}

#invoiceForm input[type="text"],
#invoiceForm input[type="number"],
#invoiceForm input[type="date"],
#invoiceForm select,
#invoiceForm textarea {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

#invoiceForm textarea {
  resize: vertical;
}

/* Invoice Items */
#invoiceItemsContainer {
  margin-top: 10px;
}

.invoice-item-row {
  display: grid;
  grid-template-columns: 2.5fr 0.5fr 1fr 1fr 0.6fr 0.3fr;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
  background: #f8fafc;
  padding: 10px;
  border-radius: 12px;
}

.invoice-item-row input {
  padding: 6px 8px;
}

.invoice-item-row .btn-danger {
  align-self: center;
  height: 36px;
  padding: 0 12px;
  color: red;
}

/* Summary section */
#invoiceForm .summary {
  margin: 15px 0;
  font-weight: 600;
}

/* Checkbox group */
#invoiceForm .checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Button group */
#invoiceForm .button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ===========================
   Bill / Debit Note Forms
   =========================== */

#billForm {
  max-width: 800px;         /* keeps form from stretching too wide */
  margin: 20px 0 20px 40px; /* left-aligned with some indent */
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#billForm h3 {
  margin-top: 20px;
  font-size: 1.2em;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

/* Form groups */
#billForm .form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

#billForm .form-group label {
  font-weight: 600;
  margin-bottom: 5px;
}

#billForm input[type="text"],
#billForm input[type="number"],
#billForm input[type="date"],
#billForm select,
#billForm textarea {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

#billForm textarea {
  resize: vertical;
}

/* Bill Items */
#invoiceItemsContainer {
  margin-top: 10px;
}

.bill-item-row {
  display: grid;
  grid-template-columns: 2.5fr 0.5fr 1fr 1fr 0.6fr 0.3fr;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
  background: #f8fafc;
  padding: 10px;
  border-radius: 12px;
}

.bill-item-row input {
  padding: 6px 8px;
}

.bill-item-row .btn-danger {
  align-self: center;
  height: 36px;
  padding: 0 12px;
  color: red;
}

/* Summary section */
#billForm .summary {
  margin: 15px 0;
  font-weight: 600;
}

/* Checkbox group */
#billForm .checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Button group */
#billForm .button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* invoice-styles.css */
/* This stylesheet provides a clean, professional look for invoices,
   specifically designed for PDF and print exports. */

.invoice-pdf-container {
    font-family: 'Inter', system-ui, sans-serif;
    padding: 3rem;
    color: #1e293b;
    line-height: 1.5;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 3px solid #f1f5f9;
    padding-bottom: 1.5rem;
}

.invoice-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
}

.invoice-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

.invoice-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.invoice-info div {
    flex-basis: 48%;
}

.invoice-info strong {
    color: #1e293b;
    font-weight: 600;
}

.invoice-info pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.invoice-table th,
.invoice-table td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    text-align: left;
}

.invoice-table th {
    background-color: #f1f5f9;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #475569;
    border: none;
}

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

.invoice-summary {
    margin-top: 2rem;
    text-align: right;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    font-size: 1.1rem;
}

.invoice-summary p {
    margin: 0.5rem 0;
}

.invoice-summary .grand-total {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    background: var(--primary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.invoice-notes {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.invoice-notes strong {
    color: #334155;
}

/* Print-specific adjustments */
@media print {
    body {
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
    }
    .invoice-pdf-container {
        box-shadow: none;
    }
}

#balanceOutput {
  max-width: 900px;
  margin: 0;
  padding-left: 0.5rem; /* optional: adjust as needed */
}

/* ===========================
   YAPBooks – Help & Tutorials
=========================== */

/* Reset */
* {
  box-sizing: border-box;
}

.help-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

/* ===== Header ===== */
.help-header {
  background: var(--primary);
  padding: 2rem;
  border-bottom: 1px solid #334155;
}

.help-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.help-header p {
  font-size: 13px;
  margin: 4px 0 10px;
  opacity: 0.85;
}

.help-header input {
  max-width: 600px;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 14px 20px;
}

/* ===== Layout ===== */
.help-layout {
  border-radius: 16px;
  margin: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

/* ===== Video List (Playlist) ===== */
.video-list {
  width: 280px;
  background: #f8fafc;
  overflow-y: auto;
  border-right: 1px solid #ddd;
}

/* Playlist rows */
.video-item {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s;
}

.video-item.active {
  background: white;
  border-left: 4px solid var(--accent-green);
}

.video-item:hover {
  background: #eef1ff;
}

.video-item h4 {
  font-size: 14px;
  margin: 0;
}

.video-item p {
  font-size: 12px;
  margin-top: 4px;
  color: #666;
}

/* ===== Video Player ===== */
.video-player {
  flex: 1;
  padding: 12px;
  background: white;
  display: flex;
  flex-direction: column;
}

.video-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: none;
  background: black;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.video-player h3 {
  font-size: 16px;
  margin: 12px 0 4px;
}

.video-player p {
  font-size: 13px;
  color: #555;
}

/* ===== Mobile Playlist Drawer ===== */
.video-toggle {
  background: var(--primary);
  font-weight: 700;
  display: none;
}

/* =======================
   MOBILE
======================= */
@media (max-width: 900px) {
  .help-layout {
    flex-direction: column;
  }

  /* Hide playlist by default */
  .video-list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    background: #fafbff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 100;
    border-top: 1px solid #ddd;
    overflow-y: auto;
  }

  .video-list.open {
    transform: translateY(0);
  }

  /* Floating playlist button */
  .video-toggle {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background: #101935;
    color: white;
    border: none;
    font-size: 16px;
    z-index: 200;
  }

  .video-player {
    padding-bottom: 60px;
  }

