/* General Reset - Modernized */
:root {
    /* Define CSS Variables for Theming */
    --color-primary: #ff9900; /* Construction Orange */
    --color-primary-dark: #e68a00;
    --color-secondary: #007bff;
    --color-danger: red;
    --color-background-dark: rgba(0, 0, 0, 0.85);
    --color-text-light: white;
    --color-text-dark: black;
    --blur-intensity: 10px;
    --card-bg-opacity: 0.15;
    --header-height: 70px; /* Slightly taller header for better touch targets */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: url('construct.png') no-repeat center center/cover;
    color: var(--color-text-light);
    min-height: 100vh; /* Use min-height for content that might exceed viewport */
    overflow-x: hidden; /* Only prevent horizontal scroll */
    position: relative; /* For the potential overlay */
}

/* Dashboard Body with better overlay */
body.dashboard-body {
    background-size: cover;
    padding-top: var(--header-height); /* Add top padding to account for fixed header */
    padding-bottom: 20px;
    overflow-y: auto;
    position: relative;
    color: #fff; /* Ensure text color is white/light */
}

body.dashboard-body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Fixed Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px; /* Increased horizontal padding */
    height: var(--header-height);
    background: var(--color-background-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* Logo */
.logo {
    font-size: 28px; /* Slightly larger */
    font-weight: 700; /* Bolder */
    letter-spacing: 1px;
    color: var(--color-primary); /* Use primary color for accent */
}

/* Menu */
/* === SIDE MENU LAYOUT REFACTOR === */

/* Sidebar container */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 240px;
    height: calc(100vh - var(--header-height));
    background: var(--color-background-dark);
    padding-top: 20px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 900;
}

/* Side Menu Items */
.side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-menu li {
    width: 100%;
}

.side-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, transform 0.1s;
}

.side-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    transform: translateX(4px);
}

/* Submenu (for Settings) */
.submenu {
    margin-top: 10px;
}

/* Title that toggles the submenu */
.submenu-title {
    padding: 12px 20px;
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
}

.submenu-title:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    transform: translateX(4px);
}

/* Collapsible submenu list - use max-height for smooth transitions */
.submenu-list {
    list-style: none;
    padding: 0 10px;
    margin: 0;
    overflow: hidden;
    max-height: 0;                 /* collapsed by default */
    transition: max-height 0.28s ease, padding 0.28s ease;
}

/* submenu-list items */
.submenu-list li a {
    display: block;
    padding: 8px 20px;
    font-size: 18px;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s, transform 0.08s;
}
.submenu-list li a:hover {
    color: var(--color-primary);
    transform: translateX(4px);
}

/* When the submenu container gets .expanded -> allow it to open */
.submenu.expanded .submenu-list {
    /* choose a generous max-height that covers all children */
    max-height: 500px;
    padding-bottom: 8px;
}

/* === Desktop collapsible sidebar === */
body.sidebar-collapsed .sidebar {
  width: 70px;
}

body.sidebar-collapsed main {
  left: 70px;
  width: calc(100% - 70px);
}

body.sidebar-collapsed .side-menu a {
  justify-content: center;
  padding: 12px 0;
  font-size: 20px;
}

body.sidebar-collapsed .side-menu a span,
body.sidebar-collapsed .submenu-title,
body.sidebar-collapsed .submenu-list {
  display: none;
}

/* Adjust Main Layout to account for sidebar */
main {
    position: fixed;
    top: var(--header-height);
    left: 240px;
    width: calc(100% - 240px);
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    background: transparent;
}

/* Header cleanup */
header {
    justify-content: space-between;
    padding: 0 30px;
    background: var(--color-background-dark);
    height: var(--header-height);
}

/* Keep only logo + avatar menu */
header .my-menu {
    margin-left: auto;
}

/* Responsive Sidebar */
@media (max-width: 992px) {
    .menu-icon { display: block; }

    .sidebar {
        left: -260px; /* hide off-screen */
        width: 240px;
        transition: left 0.28s ease;
    }

    .sidebar.active {
        left: 0;
    }

    main {
        left: 0;
        width: 100%;
    }
}

/* Buttons */
.btn {
    display: inline-flex; /* Use flex to better align content if icons are added */
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-text-light);
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px; /* Slightly more rounded */
    border: 2px solid transparent;
    transition: all 0.3s ease-in-out;
    margin: 5px;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px); /* Consistent hover effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-text-light);
}

/* Profile Avatar Container */
.my-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-left: 20px; /* Consistent spacing */
    width: auto; /* Let content dictate width */
}

/* Avatar and Username Alignment */
.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Avatar Styling */
.avatar {
    width: 35px; /* Larger avatar */
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--color-primary); /* Accent border */
    object-fit: cover;
    transition: transform 0.2s ease-in-out, box-shadow 0.3s;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--color-primary);
}

/* Username Styling */
.username {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 3px;
    font-weight: 400;
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 55px; /* Adjusted position */
    right: 0;
    background: var(--color-text-light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    display: none;
    min-width: 180px;
    z-index: 1000;
    overflow: hidden; /* Clean up sharp edges */
    transform-origin: top right;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown li {
    list-style: none;
}

.dropdown li a {
    display: flex; /* Use flex for potential icon alignment */
    align-items: center;
    padding: 12px 18px;
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.3s ease-in-out, color 0.3s;
}

.dropdown li a:hover {
    background: var(--color-primary);
    color: var(--color-text-light);
}

/* Show Dropdown */
.my-menu.active .dropdown {
    display: block;
}

/* Iframe for Content */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent; /* Allow body background to show through */
}

/* Hero Section */
.hero {
    /*height: calc(100vh - var(--header-height));  Adjusted for fixed header */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
    /* background: rgba(255, 255, 255, var(--card-bg-opacity)); */
    color: var(--color-text-light);
    padding-top: var(--header-height); /* Ensure content isn't under the header */
}

.hero-content {
    max-width: 700px; /* Wider content area */
    animation: fadeIn 1s ease-in-out;
    padding: 20px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 60px); /* Responsive font sizing */
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Features Section */
.features {
    display: grid; /* Use grid for more flexible layout */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; /* Modern gap */
    padding: 60px 30px;
    background: var(--color-text-light);
    text-align: center;
    color: var(--color-text-dark); /* Ensure text is dark on light background */
}

.feature-box {
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--color-primary); /* Accent border */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.feature-box h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

/* Fade-In Animation (Kept as is) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- */

/* Mobile Navigation (Responsive) */
@media (max-width: 992px) { /* Larger breakpoint for mobile menu activation */
    header {
        padding: 10px 20px;
    }

    .menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        right: -100%;
        background: var(--color-background-dark);
        width: 100%;
        min-height: calc(100vh - var(--header-height));
        transition: right 0.4s cubic-bezier(0.8, 0, 0.2, 1); /* Smoother transition */
        padding: 20px 0;
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.5);
    }

    .menu li {
        text-align: center;
        margin: 15px 0;
    }

    .menu li a {
        font-size: 20px;
        padding: 10px 0;
        display: inline-block;
    }

    .menu-icon {
        display: block; /* 👈 always visible now */
        font-size: 30px;
        cursor: pointer;
        color: var(--color-primary);
        margin-right: 12px;
    }

    /* Active menu */
    .menu.active {
        right: 0;
    }

    .my-menu {
        margin-left: auto; /* Push to the right */
        margin-right: 20px;
        width: auto;
    }

    .dropdown {
        top: 45px; /* Adjust dropdown position for mobile avatar */
        right: -20px;
    }

    .charts-activity {
        grid-template-columns: 1fr;
    }

    .management-container, .register-container {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 16px;
    }
    
    .kpi-cards {
        grid-template-columns: 1fr;
    }
}

/* --- */

/* Shared Form/Auth Styles (Login, Register, Find Client, Password) */

/* General Auth Body Styling */
.login-body, .find-client-body, .password-body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden; /* Ensure full page centering without scroll */
}

/* Unified Dark Overlay */
.login-body::before, .find-client-body::before, .password-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, var(--card-bg-opacity));
    z-index: 1;
}

/* Unified Glassmorphism Container */
.login-container, .find-client-container, .password-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(var(--blur-intensity));
    padding: 30px;
    border-radius: 15px; /* More modern rounding */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* Stronger shadow */
    text-align: center;
    max-width: 450px; /* Increased max-width for better look */
    width: 90%;
    color: var(--color-text-light);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border for definition */
}

.login-container h2, .find-client-container h2, .password-container h2 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary); /* Accent color for titles */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Unified Input Group Styles */
.input-group, .form-group {
    margin-bottom: 20px; /* More space between fields */
    text-align: left;
}

.input-group label, .form-group label {
    font-size: 15px;
    display: block;
    color: var(--color-text-light);
    margin-bottom: 5px;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.input-group input, .input-group select, .form-group input, .form-group select, .project-row input, .project-row select {
    width: 100%;
    padding: 12px; /* Increased padding */
    border-radius: 8px;
    border: 1px solid transparent;
    outline: none;
    font-size: 16px;
    margin-top: 5px;
    /* background: rgba(255, 255, 255, 0.25); */
    /* color: var(--color-text-light); */
    transition: all 0.3s;
}

.input-group input:focus, .input-group select:focus, .form-group input:focus, .form-group select:focus, .project-row input:focus, .project-row select:focus {
    background: rgba(255, 255, 255, 0.4);
    border-color: var(--color-primary);
    box-shadow: 0 0 5px var(--color-primary);
}

.input-group input::placeholder, .project-row input::placeholder {
    color: rgba(0, 0, 0, 1.0);
}

/* Dropdown options styling */
.input-group select option, .form-group select option, .project-row select option {
    background: var(--color-text-light);
    color: var(--color-text-dark);
}

/* Login Specific */
.remember-forgot, .remember-forgot a {
    font-size: 15px;
    margin: 15px 0;
    color: var(--color-text-light);
}

.btn-login {
    /* Merged with .btn styles for consistency, adjusted below */
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--color-primary);
    color: var(--color-text-light);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.btn-login:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.signup-link {
    margin-top: 20px;
    font-size: 15px;
}

.signup-link a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Register Specific */
.btn-register {
    /* Merged with .btn styles for consistency, adjusted below */
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--color-primary);
    color: var(--color-text-light);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    margin-top: 10px;
}

.btn-register:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Find Client Specific */
.btn-search {
    /* Merged with .btn styles for consistency, adjusted below */
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--color-primary);
    color: var(--color-text-light);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.btn-search:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Client Info Display */
#client-info {
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.5); /* Darker background for contrast */
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid var(--color-primary);
    display: none;
    text-align: left;
}

#client-info h3 {
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--color-primary);
}

#client-info p {
    font-size: 16px;
    margin: 8px 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column; /* Horizontal layout for better desktop feel */
    gap: 15px;
    margin-top: 20px;
}

.btn-action {
    flex: 1; /* Distribute space evenly */
    padding: 12px;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-text-light);
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s ease-in-out;
}

.btn-action:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .action-buttons {
        flex-direction: column; /* Stack buttons on small screens */
    }
}

/* --- */

/* Project Management Page */
.project-body {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align content to the top */
    padding-top: calc(var(--header-height) + 20px); /* Account for fixed header */
}

.project-container {
    background: rgba(255, 255, 255, var(--card-bg-opacity));
    backdrop-filter: blur(var(--blur-intensity));
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 1400px; /* Wider container */
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
}

/* Client Info (1 LINE) */
.client-info {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* SCROLLABLE PROJECTS SECTION */
.scrollable-section {
    max-height: 70vh; /* Increased max height */
    overflow-y: auto;
    padding-right: 15px; /* Space for scrollbar */
    /* Custom scrollbar for webkit browsers */
    &::-webkit-scrollbar {
        width: 8px;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--color-primary);
        border-radius: 10px;
    }

    &::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* PROJECT SECTIONS */
.project-section {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--color-primary);
}

.project-section label {
    min-width: 100px; 
}

/* TWO-ROW LAYOUT FOR PROJECTS */
.project-row {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive grid */
    gap: 15px;
    margin-bottom: 15px;
}

.currency {
    width: 100%; /* Ensure it takes up full grid space */
}

/* ACTION BUTTONS */
.project-actions {
    display: flex;
    justify-content: flex-end; /* Align to the right */
    gap: 10px;
    margin-top: 15px;
}

.project-actions button {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-update {
    background: var(--color-primary);
    color: white;
}

.btn-update:hover {
    background: var(--color-primary-dark);
}

.btn-remove {
    background: var(--color-danger);
    color: white;
}

.btn-remove:hover {
    background: darkred;
}

/* DOCUMENT UPLOAD */
.document-upload {
    display: grid;
    grid-template-columns: 1fr 1fr auto; /* Select, Input, Button */
    gap: 10px;
    margin-top: 15px;
}

.document-upload select, .document-upload input {
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.2);
}

.document-upload button {
    background: var(--color-secondary);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.document-upload button:hover {
    background: #0056b3;
}

/* UPLOADED DOCUMENTS */
.uploaded-docs {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.uploaded-docs h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--color-text-light);
}

.uploaded-docs ul {
    list-style: disc; /* Use discs for better readability */
    padding-left: 20px;
}

.uploaded-docs li {
    font-size: 14px;
    margin-bottom: 5px;
}

.uploaded-docs a {
    color: #4dc3ff; /* Lighter blue for links */
    text-decoration: none;
    transition: color 0.3s;
}

.uploaded-docs a:hover {
    color: #80dfff;
    text-decoration: underline;
}

/* Notifications */
.notify {
    display: none;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.notify.success {
    background: #28a745;
    color: white;
    display: block;
}

.notify.error {
    background: #dc3545;
    color: white;
    display: block;
}

.notify.warning {
    background: #ffc107;
    color: black;
    display: block;
}

/* Responsive Project Management */
@media (max-width: 768px) {
    .project-row {
        grid-template-columns: 1fr; /* Stack inputs on smaller screens */
        gap: 10px;
    }

    .document-upload {
        grid-template-columns: 1fr; /* Stack upload elements */
    }

    .project-body {
        padding: 10px;
    }

    .project-container {
        padding: 20px;
    }
}

/* --- */

/* User Management Page Styles */
.management-body, .register-body {
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: calc(var(--header-height) + 20px);
}

.management-container, .register-container {
    background: rgba(255, 255, 255, var(--card-bg-opacity));
    backdrop-filter: blur(var(--blur-intensity));
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 95%; /* Increased width */
    max-width: 1200px;
    color: var(--color-text-light);
}

/* Card Style for Each Section */
.card {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid var(--color-primary);
}

.card h2 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

/* Form Group Styles already unified */

/* Button Styling already unified */

/* Records Table Styles */
#records-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    overflow-x: auto; /* Enable horizontal scroll for table on small screens */
    display: block;
}

#records-table th, #records-table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 15px; /* Increased padding */
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
}

#records-table th  {
    background: rgba(0, 0, 0, 0.6);
    font-weight: 600;
    color: var(--color-primary);
}

#records-table a  {
    font-weight: 600;
    color: var(--color-text-light);
}

.toggle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.toggle-label {
    display: inline-block;
    padding: 10px 18px;
    font-size: 15px;
    border: 2px solid var(--color-primary);
    background: rgba(255, 255, 255, 0.2); /* Light glass background */
    color: var(--color-text-light);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.textbox {
    width: 100%;
    resize: vertical;
    font-size: 20px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    /* background: rgba(255, 255, 255, 0.3);
    color: whitesmoke; */
    min-height: 100px;
}

/* Standard syntax */
/* .textbox::placeholder {
    color: rgba(255, 255, 255, 0.7); 
    opacity: 1;
} */

/* Older Firefox syntax */
/* .textbox:-moz-placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
} */

/* Older Internet Explorer syntax */
/* .textbox:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7);
} */

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked + .toggle-label {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 0 5px var(--color-primary);
}

/* --- */

/* Change Password Page Styles (Unified) */
/* .password-body, .password-container styles are unified above */

.error-message {
    color: var(--color-text-light);
    margin-top: 15px;
    font-size: 15px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* --- */

/* Custom alert notification */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay */
    justify-content: center;
    align-items: center;
    z-index: 2000; /* High z-index */
}

/* Modal Box */
.modal {
    background: var(--color-text-light);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.4);
    color: var(--color-text-dark);
    transform: scale(1);
    animation: scaleIn 0.3s ease-out;
}

/* Modal Title */
.modal h2 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #333;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.modal button {
    margin: 0;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn-yes {
    background: #28a745;
    color: white;
}

.btn-yes:hover {
    background: #1e7e34;
    transform: translateY(-1px);
}

.btn-no {
    background: #dc3545;
    color: white;
}

.btn-no:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* --- */

/* Dashboard Styles */

/* Dashboard container */
.dashboard-container {
    max-width: 1500px; /* Wider container for dashboard */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* KPI Cards Row */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Larger minimum size */
    gap: 20px;
}

.dashboard-card, .kpi-card, .chart-card {
    background: rgba(255, 255, 255, var(--card-bg-opacity));
    backdrop-filter: blur(var(--blur-intensity));
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left: 5px solid var(--color-primary);
    transition: transform 0.3s;
}

.dashboard-card:hover, .kpi-card:hover, .chart-card:hover {
    transform: translateY(-3px);
}

.kpi-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--color-primary);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    font-weight: 600;
}

.kpi-card p {
    font-size: 32px; /* Larger KPI number */
    margin: 0;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Charts and Activity Area */
.charts-activity {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Two-thirds chart, one-third activity */
    gap: 30px;
}

.charts-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    padding: 20px;
    border-left: 5px solid var(--color-secondary); /* Different accent color for charts */
}

.chart-card h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--color-secondary);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    font-weight: 600;
}

.chart-card canvas {
    width: 100% !important;
    height: 400px !important;
    max-height: 500px;
}

/* Loader (Kept as is but integrated variables) */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.95); /* Darker loading screen */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid var(--color-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toggle Switch (Kept as is but refined) */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

/* Hide the default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Create the slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

/* Knob inside slider */
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* When checked */
input:checked + .slider {
  background-color: #ffc107;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Optional rounded style */
.slider.round {
  border-radius: 24px;
}
.slider.round:before {
  border-radius: 50%;
}
/* --- */

/* Final Responsive Design Adjustments */
@media (max-width: 1200px) {
    .dashboard-container {
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .charts-activity {
        grid-template-columns: 1fr; /* Stack charts and activity area */
    }

    .charts-area {
        grid-template-columns: 1fr; /* Stack individual charts */
    }
}