/*
:root {
    --primary-blue: #123456;
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;
    --input-focus: #123456;
    --link-color: #123456; 
    --link-hover: #0056b3;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #dc3545;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --excel-border: #444444;
    --bg-surface: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #0b1118;
    --card-bg: #1a242f;
    --text-main: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: #3d4d5d;
    --link-color: #8ab4f8;
    --link-hover: #aecbfa;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --excel-border: #dddddd;
    --bg-surface: #222222;
} */

/* ==========================================================================
   LIGHT THEME (Default)
   ========================================================================== */
:root {
  --bg-color: #f4f7f6;        /* Soft teal-tinted light gray */
  --card-bg: #ffffff;         /* Pure white for containers */
  --text-main: #1a2e2a;       /* Dark teal-gray for high contrast readability */
  --text-muted: #5a6e6b;      /* Muted gray-teal for secondary text */
  --border-color: #dde4e2;    /* Subtle divider color */
  --link-color: #006d5b;      /* Your exact brand color */
  --link-hover: #005446;      /* Slightly darker brand color for hover states */
  
  /* Box shadow with a very soft opacity so it doesn't look harsh */
  --shadow: 0 4px 6px -1px rgba(0, 109, 91, 0.05), 0 2px 4px -1px rgba(0, 109, 91, 0.03);
  
  /* Half-transparent version of your brand color for a clean focus ring */
  --input-focus: rgba(0, 109, 91, 0.4);

  --primary-blue: rgb(2 56 11 / 87%);;
    --excel-border: #444444;
    --bg-surface: #ffffff;
    --success: #0c9f42;
    --warning: #f59e0b;
    --danger: #dc3545;
}

/* ==========================================================================
   DARK THEME 
   ========================================================================== */
[data-theme="dark"] {
  --bg-color: #0b1311;        /* Deep, near-black teal background */
  --card-bg: #162220;         /* Slightly lighter dark tone for depth */
  --text-main: #e6edec;       /* Soft off-white to prevent eye glare */
  --text-muted: #93a6a3;      /* Mid-tone gray-teal for secondary text */
  --border-color: #263734;    /* Dark, subtle divider color */
  --link-color: #016958;      /* Brightened teal so it pops against dark backgrounds */
  --link-hover: #048d76;      /* Extra vibrant teal for dark mode hover states */
  
  /* Dark mode shadow uses deep black with slightly higher opacity to remain visible */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  
  /* Brighter transparent focus ring tailored for dark mode visibility */
  --input-focus: rgba(0, 143, 119, 0.5);
    --excel-border: #dddddd;
    --bg-surface: #222222;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background 0.3s ease;
    color: var(--text-main);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 4em;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-main);
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.avatar { width: 40px; height: 40px; background: #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem; margin-right: 5px; }

.hidden { display: none !important; }

/* index login area */

.input-group {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-main);
}

.input-group textarea:focus,
.input-group input:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group i:last-child ,
.input-group i:last-child {
    right: 10px;
}
.input-group i:first-child ,
.input-group i:first-child {
    left: 4px;
}
.input-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group-custom {
    display: flex;
    width: 100%;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden; /* Ensures corners match the group border */
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    transition: box-shadow 0.2s;
}

.input-group-custom:focus-within {
    /* border-color: var(--primary-blue); */
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(18, 52, 86, 0.1);
}

.group-input {
    flex: 1; /* Takes up remaining space */
    border: none !important; /* Remove individual borders */
    background: transparent;
    padding: 12px 15px;
    color: var(--text-main);
    outline: none;
}

.group-btn {
    /* background-color: var(--primary-blue); */
    background-color: var(--link-color);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.group-btn:hover {
    background-color: #0d263f; /* Slightly darker shade */
}

.input-group button,
.toggle-password {
    left: auto !important;
    right: 15px;
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 25px;
    color: var(--text-muted);
}

.close-modal,
.btn-link,
.btn-main,
.btn-secondary,
.btn-warning,
.btn-outline,
.btn-icon-small {
    margin-top: 5px;
    width: 100%;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-link:disabled,
.btn-main:disabled,
.btn-secondary:disabled,
.btn-warning:disabled,
.btn-outline:disabled,
.btn-icon-small:disabled{
    cursor: not-allowed;
}
.btn-link {
    background: none;
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: var(--link-color);
    border: none;
}

.btn-link:hover {
    text-decoration-color: var(--link-hover);
    color: var(--link-hover);
}

.btn-main {
    /* background-color: var(--primary-blue); */
    background-color: var(--link-color);
    color: var(--text-main);
    border: none;
}

.btn-secondary,
.btn-warning, .btn-outline {
    background: transparent;
}

.btn-outline {
    color: var(--link-color);
    /* color: var(--primary-blue); */
    border: 1px solid var(--link-color);
    /* border: 1px solid var(--primary-blue); */
}

.btn-warning {
    color: var(--warning);
    border: 1px solid var(--warning);
}

.btn-secondary {
    color: var(--success);
    border: 1px solid var(--success);
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 1rem;
    font-size: x-large;
}

.btn-icon-small {
    background: none;
    border: none;
    color: var(--link-color);
    margin-left: 8px;
    padding: 2px;
}

.separator {
    text-align: center;
    margin: 25px 0;
    border-bottom: 1px solid var(--border-color);
    line-height: 0.1em;
}

.separator span {
    background: var(--card-bg);
    padding: 0 10px;
    color: var(--text-muted);
}

.form-footer a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.form-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-footer a { color: var(--text-muted); text-decoration: none; }

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-row .input-group {
    flex: 1;
    margin-bottom: 0; /* Override default margin inside row */
}

/* Reusable class for standard inputs, textareas, and selects */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select option,
select,
textarea {
    width: 100%;
    padding: 12px 25px;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    background-color: var(--input-bg) !important;
    color: var(--text-main) !important;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none !important;
    display: block; /* Ensures they don't sit side-by-side unless inside a grid */
}

/* Hover & Focus States for all inputs */
input:hover, select:hover {
    border-color: #abb5be !important;
}

input:focus, select:focus {
    /* border-color: var(--primary-blue) !important; */
    border-color: var(--link-color) !important;
    box-shadow: 0 0 0 3px rgba(18, 52, 86, 0.1) !important; /* Subtle glow using your primary blue */
}

[data-theme="dark"] input:focus, select:focus {
    /* border-color: var(--primary-blue) !important; */
    border-color: var(--link-color) !important;
    box-shadow: 0 0 0 3px rgba(10, 244, 244, 0.1) !important; /* Subtle glow using your primary blue */
}

/* Special fix for the Date Picker icon in Dark Mode */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Turns the black calendar icon white for visibility */
    cursor: pointer;
}

/* Placeholder Styling */
::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* ==========================================
   1. MODERN CHROME, EDGE, SAFARI (WEBKIT)
   ========================================== */

/* Configure the width/height profile of the scrollbar track lane */
::-webkit-scrollbar {
    width: 10px;  /* Vertical scrollbar thickness */
    height: 10px; /* Horizontal scrollbar thickness */
}

/* Style the background track line layout behind the thumb */
::-webkit-scrollbar-track {
    background: var(--bg-surface, #f1f1f1); 
    border-radius: 10px;
}

/* Style the moving drag handle bar box element */
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--text-primary, #888888) 30%, transparent);
    border-radius: 10px;
    border: 2px solid var(--bg-surface, #f1f1f1); /* Creates a clean padding padding border illusion */
    transition: background 0.2s ease;
}

/* Add a 30% transparency change when hovering over the scrollbar handle */
::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--text-primary, #555555) 60%, transparent);
}


/* ==========================================
   2. MODERN FIREFOX STANDARDS (W3C SPEC)
   ========================================== */
html, body, div, iframe {
    /* Format: scrollbar-color: [Thumb Color] [Track Color] */
    scrollbar-color: color-mix(in srgb, var(--text-primary, #888888) 30%, transparent) var(--bg-surface, #f1f1f1);
    scrollbar-width: thin; /* Options: auto, thin, none */
}

/* Target only your custom file view box layout elements */
#previewContainer::-webkit-scrollbar {
    width: 8px;
}

#previewContainer::-webkit-scrollbar-track {
    background: var(--bg-surface, #ffffff);
}

#previewContainer::-webkit-scrollbar-thumb {
    background: var(--excel-border, #cccccc);
    border-radius: 4px;
}


/* select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
    appearance: none; /* Removes default arrow to customize if needed */
/* } */ 

.toggle-text {
    margin-top: 20px;
    text-align: center;
    color: var(--text-muted);
}

.toggle-text a {
    color: var(--link-color);
    font-weight: 600;
    text-decoration: none;
}

.toggle-text a:hover { text-decoration: underline; }

/* Placeholder Styling */
::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Margin helper for standalone inputs */
.m-b-15 { margin-bottom: 15px; }
.m-b-10 { margin-bottom: 10px; }

#crm-alert-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crm-alert {
    background: var(--card-bg);
    color: var(--text-main);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 400px;
    /* border-left: 5px solid var(--primary-blue); */
    border-left: 5px solid var(--link-color);
    animation: slideIn 0.4s ease-out;
    transition: 0.4s;
}

/* .crm-alert.success { border-left-color: #28a745; } */
.crm-alert.success { border-left-color: var(--success); }
.crm-alert.info { border-left-color: var(--warning); }
.crm-alert.warning { border-left-color: var(--warning); }
.crm-alert.error { border-left-color: var(--danger); }

.alert-icon { margin-right: 15px; font-size: 1.2rem; }
.crm-alert.success .alert-icon { color: var(--success); }
.crm-alert.info .alert-icon { color: var(--warning); }
.crm-alert.warning .alert-icon { color: var(--warning); }
.crm-alert.error .alert-icon { color: var(--danger); }

.alert-body strong { display: block; font-size: 0.95rem; }
.alert-body p { font-size: 0.85rem; margin-top: 2px; }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/*  */

.content-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    /* background: var(--primary-blue); */
    background: var(--card-bg);
    /* color: white; */
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    transition: all 0.3s;
    /*  */
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.sidebar-logo { 
    /* padding: 0 25px 30px;  */
    padding: 0 25px; 
    /* background-image: url("./TnT_logo.png"); */
    background-image: url("./GrowthGrounds.png");
    height: 2rem;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color: rgba(155, 151, 151, 0.1);;
    font-size: 1.2rem; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
/*  */
.logo-bg-wrapper {
    /*background: #ffffff;  Always white to protect logo colors */
    background: var(--primary-blue); 
    padding: 5px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); Adds a little pop */
    box-shadow: var(--shadow); /* Adds a little pop */
}

.mobile-logo .logo-bg-wrapper {
    box-shadow: none;
}

.main-logo_,
.main-logo {
    max-width: 80%;
    height: 3rem;
}
.main-logo_ {
    display: none;
}
.main-logo {
    display: block;
}
/*  */

.nav-links { list-style: none; /* flex: 1; */ }
.nav-links li { padding: 5px 20px; }
.nav-icon-label {
    /* color: rgba(255,255,255,0.7);  */
    color: var(--link-color); 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border-radius: 8px;
    justify-content: start;
}
.nav-links a { 
    /* color: rgba(255,255,255,0.7);  */
    color: var(--link-color); 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 12px 15px;
    border-radius: 8px;
    justify-content: start;
}
[data-theme="dark"] .nav-links li.active a, .nav-links a:hover {
    background: rgba(255,255,255,0.1);
}
.nav-links li.active a, .nav-links a:hover {
    background: rgb(29 184 56 / 34%);;
    /* color: white; */
    color: var(--link-hover);
}

/* Main Content Area */
.main-content { flex: 1; padding: 30px; background: var(--bg-color); overflow-y: auto; }
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

/* Mobile Sidebar & Hamburger */
.mobile-top-bar {
    display: none;
    /* justify-content: space-between; */
    align-items: center;
    padding: 15px 20px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

#hamburger-menu {
    padding: 6px 12px;
    font-size: 1.3em;
    background: transparent;
    /* color: var(--primary-blue); */
    color: var(--text-main);
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    /* border: 1px solid var(--primary-blue); */
}

#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}
.sidebar-item {
    width: 100%;
    font-family: 'Inter', sans-serif;
}
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    /* background: rgba(0, 0, 0, 0.02); Subtle depth */
}
.nav-link.dropdown-toggle.open,
.submenu {
    background: rgba(0, 0, 0, 0.09); /* Subtle depth */
}
.nav-link.dropdown-toggle.open + .submenu {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    /* border-bottom: 1px solid #0056b3; */
    /* border-bottom: 1px solid #3b82f6; */
    border-bottom: 1px solid #3bf6b8;
}

/* Arrow Rotation */
.arrow-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-link.open .arrow-icon {
    transform: rotate(180deg);
}

.nav-link.open + .submenu {
    max-height: 250px; /* Accommodates 4 items */
    padding-bottom: 8px;
}

.sub-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px 12px 48px; /* Indented for hierarchy */
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.sub-link i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.sub-link:hover {
    /* color: var(--primary-blue); */
    color: var(--link-hover);
    background: rgba(0, 51, 102, 0.05);
}



/* Badges */
.badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef9c3; color: #854d0e; }


/* --- MODAL SYSTEM --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dimmed background */
    z-index: 9999; /* Ensure it stays above the sidebar and header */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* Modern frosted glass effect */
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Clips the embed/image to the border radius */
    border: 1px solid var(--border-color);
}

.modal-footer,
.modal-header {
    display: flex;
    align-items: center;
    padding: 15px 25px;
}

.modal-header {
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.modal-body {
    padding: 10px; /* No padding so PDFs/Images can fill the space */
    overflow-y: auto;
    background: #ebebeb; /* Slight contrast for the document background */
    color: var(--text-main);
}

.modal button {
    width: 30%;
}

/* --- LOADING & ERROR --- */
.spinner-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    /* color: var(--primary-blue); */
    color: var(--text-main);
    gap: 15px;
}

.spinner-center i {
    font-size: 3rem;
}

.error-notice {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-main);
}

.error-notice i {
    font-size: 3rem;
    color: #e53e3e; /* Standard error red */
    margin-bottom: 15px;
}

.close-btn {
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    /* color: var(--primary-blue); */
    color: var(--link-hover);
}

/* card */
.card {
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}
.card-header {
    padding: 10px 22px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.card-content { padding: 24px; flex-grow: 1; }
.card-footer { background: rgba(0,0,0,0.02); padding: 16px; border-top: 1px solid var(--border); }

/* Full element container centering overlay mask */
.gateway-loader,
.preview-loader {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    font-family: sans-serif;
    width: 100%;
}

/* Spinner Core Ring Shape Configuration */
.gateway-loader .spinner,
.preview-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff; /* Color match theme primary accent */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0px auto;
    margin-bottom: 10px;
}

/* Text message prompt below spinner ring */
.gateway-loader p,
.preview-loader p {
    color: #555;
    font-size: 14px;
    margin: 0;
}

/* Infinite Rotation Animation Keyframes loop */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Dark mode */

[data-theme="dark"] .group-btn {
    color: #3b82f6; /* Brighter blue for contrast on dark */
    outline: #3b82f6; 
    border: 1px solid #3b82f6; 
    background-color: transparent;
}

/* [data-theme="dark"] .btn-outline {
    border-color: #60a5fa;
    color: #60a5fa;
} */

[data-theme="dark"] .separator {
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .separator span {
    background: var(--card-bg); /* Matches the dark card background */
}

[data-theme="dark"] select option,
[data-theme="dark"] select {
    background-color: var(--card-bg)  !important;
}

[data-theme="dark"] .avatar { color: #2c3e50; }

/* Special fix for the Date Picker icon in Dark Mode */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Turns the black calendar icon white for visibility */
    cursor: pointer;
}

[data-theme="dark"] .modal-body {
    background: #0f172a;
}

[data-theme="dark"] .nav-link.dropdown-toggle.open,
[data-theme="dark"] .submenu {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] #hamburger-menu {
    background: var(--text-main);
}
[data-theme="dark"] .sub-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {

    .sidebar { 
        width: 90px; 
    }
    .main-logo {
        display: none;
    }
    .main-logo_ {
        display: block;
    }
    .sidebar span, .sidebar-logo span { 
        display: none; 
    }
}

/* Mobile Tweak: Hide text on small screens to keep the button compact */
@media (max-width: 480px) {
    .group-btn span {
        display: none;
    }
    .group-btn {
        padding: 0 15px;
    }
    
    .drop-zone {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .drop-text {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .input-row {
        flex-direction: column;
    }
    .sidebar.open {
        width: 55%;
    }
    .sidebar span {
        display: block;
    }
    .main-logo {
        display: block;
    }
    .main-logo_ {
        display: none;
    }
}

@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        height: 100%; /* Fill screen on mobile */
        max-height: 100%;
        border-radius: 0; /* Full screen feels more native on mobile */
    }

    .modal-body embed {
        height: 80vh; /* Adjust height for mobile viewport */
    }

    .text-md {
        display: none;
    }

    .theme-toggle {
        right: 1em;
    }

    /* Make the address fields (City/State/ZIP) stack on very small phones */
    .address-grid {
        grid-template-columns: 1fr; 
    }

    .btn-submit-intake {
        font-size: 1rem;
        padding: 12px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
        display: flex;
    }
    .main-content { padding: 15px; }
    .mobile-top-bar { display: flex; z-index: 999; }
    [data-theme="dark"] .mobile-top-bar { color: #fff; }
    .sidebar { 
        display: none; 
    } /* On mobile, you might want a hamburger menu instead */
    .sidebar {
        position: fixed;
        left: -260px; /* Hide sidebar */
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s ease;
    }
    .sidebar.open { left: 0; display: block; }
    .sidebar.open + #sidebar-overlay { display: block; }
    .mobile-logo {margin: 0 auto; width: 80%;}
    .login-container { flex-direction: column; min-height: 550px; width: 90%; }
    .welcome-section { width: 100%; text-align: left; justify-content: flex-start; }
}
