/* Import a clean, modern font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- Modern Color & Style Variables --- */
:root {
    --primary-green: #084810;  /* A vibrant, modern green (Tailwind Emerald 600) */
    --hover-green: #066320;    /* A slightly darker green for interaction */
    --font-color: #084810;     /* A softer black for text */
    --border-color: #d1d5db;   /* A light gray for borders */
    --placeholder-color: #9ca3af;
    --primary-white: #ffffff;
}

/* --- General Body Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: linear-gradient(120deg, #f7fff8, #e0ffe7);
    min-height: 100vh;
    box-sizing: border-box;
}

/* Specific body styles for different layouts */
/* Specific body styles for different layouts */
.student-body, 
.cashier-body, 
.admin-body {
    display: flex;
    flex-direction: column; /* Ginagawang vertical column ang page */
    min-height: 100vh;     /* Sinasabing punuin ang buong taas ng screen */
    background-color: #f8faf9;
}

.admin-body {
    flex-direction: row; /* Special case para sa admin na may sidebar */
}
.login-body { /* Assuming you add this class to the body on login/register pages */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* --- Login / "Frosted Glass" Container --- */
.container {
    width: 100%;
    max-width: 420px;
    padding: 45px 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

/* --- General Typography --- */
.logo {
    max-width: 120px;
    margin-bottom: 15px;
}
h1, h2, h3 {
    color: var(--primary-green);
    margin-top: 0;
}
h1 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.subtitle { font-size: 15px; color: #6b7280; margin-bottom: 30px; }
.no-data { text-align: center; padding: 40px; font-size: 18px; color: #6c757d; }

/* --- Forms & Buttons --- */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--font-color); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-size: 16px;
    color: var(--font-color);
    box-sizing: border-box;
    transition: all 0.3s ease;
    resize: vertical; /* allow resizing only up/down */
    
}

.form-group input::placeholder { color: var(--placeholder-color); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}


.btn {
    display: block; width: 100%; padding: 14px; border: none; border-radius: 10px;
    background-color: var(--primary-green); color: #ffffff;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
    text-decoration: none; text-align: center;
}
.btn:hover { background-color: var(--hover-green); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3); }
.btn:active { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(5, 150, 105, 0.3); }

/* --- Alert Messages --- */
.alert { padding: 15px; margin-bottom: 20px; border-radius: 10px; border: 1px solid transparent; text-align: center; font-size: 15px; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.alert-success { color: #084810; background-color: #d4edda; border-color: #c3e6cb; }
.alert-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }

/* --- Admin Layout --- */
.sidebar { width: 260px; background-color: #212529; color: #fff; position: fixed; height: 100%; overflow-y: auto; }
.sidebar-header { padding: 20px; text-align: center; background-color: rgba(0,0,0,0.2); border-bottom: 1px solid #495057; }
.sidebar-header h3 { margin: 0; color: var(--primary-white); }
.sidebar-menu { list-style: none; padding: 0; margin: 20px 0; }
.sidebar-menu li a { display: block; color: #ced4da; padding: 15px 25px; text-decoration: none; transition: background-color 0.3s ease, color 0.3s ease; }
.sidebar-menu li a:hover { background-color: var(--primary-green); color: var(--primary-white); }
.sidebar-menu li.active a { background-color: var(--primary-green); color: var(--primary-white); font-weight: 600; }
.sidebar-menu li .logout-link { color: #ffcdd2; }
.sidebar-menu li .logout-link:hover { background-color: #d32f2f; color: var(--primary-white); }
.main-content { margin-left: 260px; width: calc(100% - 260px); }
.main-header { background: var(--primary-white); padding: 20px 30px; border-bottom: 1px solid #e9ecef; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.main-header h2 { margin: 0; color: var(--font-color); }
.main-header span { font-weight: 600; }
.content-wrapper { padding: 30px; }

/* --- Student & Cashier Layout --- */
.navbar { background-color: var(--primary-white); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border-bottom: 3px solid var(--primary-green); }
.navbar-brand { display: flex; align-items: center; font-weight: 600; font-size: 20px; color: var(--primary-green); }
.nav-logo { height: 40px; margin-right: 15px; }
.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px; /* Adds nice spacing between the items */
}
.btn-logout { background: #dc3545; color: white; padding: 8px 15px; text-decoration: none; border-radius: 5px; font-weight: 500; transition: background-color 0.3s; }
.btn-logout:hover { background: #c82333; }
.students-container, .cashier-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    flex-grow: 1;

    /* IDAGDAG ITONG DALAWA */
    display: flex;
    flex-direction: column;
}
/* --- Panels, Cards, & Grids --- */
.card, .panel, .panel-cashier, .action-area, .form-container {
    background: var(--primary-white); padding: 25px; border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    margin-bottom: 30px;
     box-sizing: border-box; /* <-- ADD THIS LINE */
}
.status-panels {
    display: grid;
    /*
      AUTO-FIT: Gagawa ito ng columns na kasya sa screen.
      MINMAX: Bawat column ay may minimum na 200px, pero pwedeng lumaki (1fr).
    */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.panel { text-align: center; }
.panel-title { font-size: 22px; font-weight: 600; color: #6c757d; margin: 0 0 15px 0; }
.panel-number { font-size: 72px; font-weight: 700; color: var(--primary-green); line-height: 1; }
.panel-number.placeholder { color: #ced4da; }
.panel-info { margin-top: 15px; color: #6b7280; }
.action-area { text-align: center; }
.btn-get-ticket { padding: 20px 40px; font-size: 24px; }
.cashier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr; /* Ang row ng waiting list ang lalaki */
    gap: 30px;
    flex-grow: 1; /* Papalitan natin ang 'height' nito */
}
.serving-now-panel { grid-column: 1 / 2; grid-row: 1 / 2; }
.controls-panel { grid-column: 2 / 3; grid-row: 1 / 2; }
.waiting-list-panel { grid-column: 1 / 3; grid-row: 2 / 3; display: flex; flex-direction: column; }
.panel-cashier h3 { margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.serving-number { font-size: 80px; font-weight: 700; color: var(--primary-green); text-align: center; }
.serving-details p { margin: 5px 0; font-size: 18px; }
.serving-details strong { color: var(--font-color); }
.controls-panel .btn { margin-bottom: 15px; padding: 15px; font-size: 18px; }
.btn-recall { background-color: #ffc107; color: #212529; }
.btn-noshow { background-color: #6c757d; }

/* --- Table Styles --- */
.table-container { overflow-x: auto; margin-bottom: 30px; }
.table-container::-webkit-scrollbar { height: 8px; }
.table-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.content-table { width: 100%; border-collapse: collapse; background: var(--primary-white); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.content-table thead tr { background-color: var(--primary-green); color: #ffffff; text-align: left; font-weight: bold; }
.content-table th, .content-table td { padding: 15px 20px; }
.content-table tbody tr { border-bottom: 1px solid #dddddd; }
.content-table tbody tr:nth-of-type(even) { background-color: #f3f3f3; }
.content-table tbody tr:last-of-type { border-bottom: 2px solid var(--primary-green); }
.action-btn { padding: 10px 15px; border-radius: 5px; text-decoration: none; font-size: 14px; margin-right: 5px; min-width: 90px; text-align: center; font-weight: 600; cursor: pointer; color: white; border: none; }
.btn-approve { background-color: #084810; }
.btn-deny { background-color: #dc3545; }
.waiting-list-panel .panel-content { flex-grow: 1; overflow-y: auto; }
.waiting-list-table { width: 100%; border-collapse: collapse; }
.waiting-list-table th, .waiting-list-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
.waiting-list-table th { background-color: #f8f9fa; }

/* --- Modal Styles --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: #fefefe; margin: 15% auto; padding: 30px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 15px; position: relative; }
.close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; position: absolute; top: 10px; right: 25px; cursor: pointer; }
.close-btn:hover, .close-btn:focus { color: black; text-decoration: none; }

/* ==========================================================================
   ## New Modern Login Page Design ##
   ========================================================================== */
.login-body-new {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
}
.login-wrapper { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.welcome-panel {
    /* We use a linear-gradient ON TOP of the image so the white text is readable. 
       Adjust the 0.8 and 0.7 values to make it darker or lighter. */
    background: linear-gradient(
        to bottom right, 
        rgba(7, 52, 13, 0.85),  /* Dark Green Overlay (Start) */
        rgba(7, 52, 13, 0.7)    /* Lighter Green Overlay (End) */
    ), url('../assets/school.png'); /* IMPORTANT: Check this file path */

    /* Ensures the image covers the whole panel without stretching weirdly */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Existing Flexbox settings */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}
.welcome-content .logo {
    /* 1. SIZE: Increased slightly to dominate the space */
    max-width: 250px; 
    margin-bottom: 1px;

    
    backdrop-filter: blur(0px);           /* Stronger blur */
    -webkit-backdrop-filter: blur(20px);
    /* 5. SPACING: Controls how big the image is inside the glass bubble */
    /* Decrease this number if you want the logo graphic to look bigger */
    padding: 10px;

    /* 6. ANIMATION: Apply the floating effect */
    animation: softFloat 4s ease-in-out infinite;
    
    /* Ensure image fits nicely */
    object-fit: contain;
}
.welcome-content h1 { color: white; font-weight: 700; font-size: 2.5em; margin-bottom: 10px; }
.welcome-content p { font-size: 1.1em; opacity: 0.8; }
.login-panel { display: flex; justify-content: center; align-items: center; padding: 40px; background-color: white; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.login-form-container { width: 100%; max-width: 400px; }

/* ==========================================================================
   ## Preloader / Loading Screen Styles ##
   ========================================================================== */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #ffffff;
    z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.fade-out { opacity: 0; visibility: hidden; }
.preloader-logo { text-align: center; animation: pulse 1.5s ease-in-out infinite; }
.preloader-logo img { max-width: 150px; }
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   ## RESPONSIVE STYLES ##
   (Combined and Corrected for all screens 800px or smaller)
   ========================================================================== */

@media (max-width: 800px) {

    /* --- General Mobile Layout & Spacing --- */
    .admin-body, .student-body, .cashier-body, .login-body { padding: 10px; }
    .status-panels { 
        grid-template-columns: 1fr; /* This should already be here */
        gap: 20px; 
    }
    .content-wrapper, .students-container, .cashier-container { padding: 15px; margin-top: 20px; }
    .container { width: 95%; padding: 25px 20px; }

    /* --- Typography Adjustments --- */
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }

    /* --- Navbar Mobile Fix --- */
    .navbar { flex-direction: column; align-items: flex-start; gap: 15px; padding: 15px; }

    /* --- New Login Page Mobile --- */
    .login-wrapper { grid-template-columns: 1fr; }
    .welcome-panel { min-height: 30vh; }
    .login-panel { min-height: 70vh; align-items: flex-start; padding-top: 50px; }
    .welcome-content h1 { font-size: 2em; }

    /* --- CORRECTED Admin Dashboard Layout --- */
    .main-content {
        margin-left: 0; /* Should always be full-width on mobile */
        width: 100%;
    }
    .admin-logs .btn-deny { float: none; width: 100%; margin-bottom: 25px; }

    /* --- Hamburger Menu & Slide-out Sidebar --- */
    .sidebar-toggle {
        display: block; /* Show the hamburger button */
    }
    .main-header {
        justify-content: flex-start; /* Align header items to the start */
        gap: 15px;
    }
    .main-header span {
        display: none; /* Hide the "Welcome..." message to save space */
    }
    .sidebar {
        position: fixed; /* Keep it fixed so it can slide */
        left: -270px; /* Start off-screen */
        z-index: 1001; /* Must be on top of everything */
        transition: left 0.3s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
        height: 100%; /* Ensure it takes full height */
    }
    .sidebar.open {
        left: 0; /* Slide it into view */
    }
    .sidebar-overlay.open {
        display: block; /* Show the background overlay */
    }

    /* --- Panels & Grids --- */
    .status-panels, .cashier-grid { grid-template-columns: 1fr; gap: 20px; }
    .cashier-grid { height: auto; }
    .serving-now-panel, .controls-panel, .waiting-list-panel { grid-column: auto; grid-row: auto; }
    .card, .panel-cashier, .action-area, .form-container { padding: 20px; margin-bottom: 20px; }
    

    /* --- Lobby View --- */
    .lobby-container { grid-template-columns: 1fr; height: auto; }
    .lobby-serving h1 { font-size: 10vw; }
    .lobby-serving .number { font-size: 35vw; }
    .lobby-waiting h2 { font-size: 8vw; }
    .waiting-list li { font-size: 7vw; }

    /* --- Kiosk Mode --- */
    .kiosk-grid { grid-template-columns: 1fr; gap: 20px; }
    .kiosk-btn { padding: 30px; font-size: 1.5em; }
    .kiosk-container form { margin: 0; }
    
    /* --- Chatbot Widget --- */
    .chat-widget { width: 95%; height: 80%; bottom: 10px; right: 10px; }

    
}

/* ==========================================================================
   ## Upgraded Admin Logs Page Styles ##
   ========================================================================== */

/* The main form container is now a simple block */
.filter-form {
    display: block;
}

/* This new container will hold the inputs in a row */
.filter-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px; /* Adds space between inputs and buttons */
}

.filter-item {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows items to grow and fill space */
}

.filter-item label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-item input[type="text"],
.filter-item input[type="date"],
.filter-item select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

/* This new container will hold the buttons */
.filter-actions {
    display: flex;
    justify-content: flex-end; /* Pushes buttons to the right */
    gap: 10px;
    border-top: 1px solid #eee; /* Adds a nice separator line */
    padding-top: 20px;
}

.filter-actions .btn {
    padding: 10px 25px;
    font-size: 14px;
    width: auto;
    display: inline-block;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-header h3 {
    margin: 0;
}

.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-green);
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.pagination a:hover {
    background-color: #0dc70d;
}

.pagination a.active {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}
.pagination a.active:hover {
    background-color: #084810;;
}

/* ==========================================================================
   ## Hamburger Menu & Responsive Sidebar Styles ##
   ========================================================================== */

/* --- The Hamburger Button --- */
.sidebar-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
}
.sidebar-toggle svg {
    stroke: var(--font-color);
}

/* --- The Background Overlay --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Must be below sidebar but above content */
}

/* --- Responsive Styles for the Admin Sidebar --- */
@media (max-width: 768px) {
    /* Show the hamburger button on mobile */
    .sidebar-toggle {
        display: block;
    }
    
    /* Change the header to make space for the button */
    .main-header {
        justify-content: flex-start; /* Align items to the start */
        gap: 15px;
    }
    .main-header span {
        display: none; /* Hide the welcome message on mobile to save space */
    }

    /* Override the old mobile sidebar style */
    .sidebar {
        position: fixed; /* Keep it fixed */
        left: -270px; /* Start off-screen */
        z-index: 1001; /* Must be on top of everything */
        transition: left 0.3s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    }

    /* This class will be added by JavaScript to show the sidebar */
    .sidebar.open {
        left: 0; /* Slide it into view */
    }

    /* Show the overlay when the sidebar is open */
    .sidebar-overlay.open {
        display: block;
    }
    
    /* Override old main content style */
    .main-content {
        margin-left: 0; /* Should always be full-width on mobile */
    }
}

/* ==========================================================================
   ## Toast Notification Styles ##
   ========================================================================== */
app-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none; /* <-- ADD THIS LINE */
}
.toast {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-left: 5px solid;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast.success { border-color: var(--primary-green); }
.toast.error { border-color: #dc3545; }
.toast-icon { font-size: 24px; margin-right: 15px; }
.toast.success .toast-icon { color: var(--primary-green); }
.toast.error .toast-icon { color: #dc3545; }
.toast-message { font-weight: 500; color: var(--font-color); }
.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
}

/* ==========================================================================
   ## Header & Dropdown Menu Upgrade ##
   ========================================================================== */

/* --- Admin Sidebar Icon Styling --- */
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px; /* Adds space between icon and text */
}
.sidebar-menu .icon {
    font-size: 20px;
    width: 24px; /* Gives icons a consistent width */
    text-align: center;
}

/* --- User Dropdown Menu --- */
.user-dropdown {
    position: relative;
    display: inline-block;
    margin-left: auto;
}
.user-dropdown-toggle {
    background-color: #ffffff;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.user-dropdown-toggle:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.user-name {
    font-weight: 600;
    color: var(--font-color);
}
.user-role {
    font-size: 12px;
    background-color: var(--primary-green);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
}
.chevron {
    font-size: 20px;
    transition: transform 0.2s ease-in-out;
}
.user-dropdown.open .chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 100;
    border-radius: 8px;
    overflow: hidden;
}
.user-dropdown-menu a {
    color: var(--font-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}
.user-dropdown-menu a:hover {
    background-color: #f1f1f1;
}

/* Make dropdown visible when .open class is added */
.user-dropdown.open .user-dropdown-menu {
    display: block;
}

/* On mobile, hide the role and make the dropdown simpler */
@media (max-width: 768px) {
    .main-header {
        /* The header itself is the flex container */
        gap: 0; /* Let space-between handle it */
    }
    .user-role, .main-header span, .main-header h2 {
        display: none; /* Hide extra text to make space */
    }
    .main-header .user-dropdown-toggle {
        background: none;
        border: none;
    }
}

/* --- Student Dashboard Queue Rules Panel --- */
.queue-rules {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: left;
}

.queue-rules h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--font-color);
}

.queue-rules ul {
    padding-left: 20px;
    margin: 0;
    color: #6c757d;
}

.queue-rules ul li {
    margin-bottom: 10px;
}
.queue-rules ul li:last-child {
    margin-bottom: 0;
}

/* --- Admin Management Page Layouts --- */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}
.form-row .form-group {
    flex-grow: 1;
    margin-bottom: 0; /* Remove default margin for better alignment */
}
.form-row .btn {
    width: auto;
    flex-shrink: 0;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* --- Cashier Dashboard Counter --- */
.queue-counter-span {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

/* ==============================================================
   ## Cashier Dashboard Waiting List Scrollbar ##
   ============================================================== */

/* This targets the content area inside the "Waiting List" panel */
.waiting-list-panel .panel-content {
    /* Set a fixed height. Adjust this value if your row height changes. */
    /* Calculation: approx 45px per row * 20 rows = 900px */
    /* We'll set a max-height for flexibility on large screens */
    max-height: 900px; 
    overflow-y: auto; /* This is the magic part! Adds a scrollbar when needed. */
}

/* --- Text Truncation Style --- */
.truncate-text {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Show a maximum of 3 lines */
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px; /* Optional: you can also limit the width */
}

/* Styling for button inside the user dropdown */
.user-dropdown-menu .dropdown-button {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    display: block;
    font-size: 1em;
    font-family: inherit;
    padding: 10px 15px;
    text-align: left;
    width: 100%;
}

.user-dropdown-menu .dropdown-button:hover {
    background-color: #f0f0f0;
}

.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.9em;
    color: #6c757d;
}

.main-footer p {
    margin: 0;
}

.main-footer a {
    color: #0056b3;
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   ## STRONGER FIX FOR REPORT HEADER ON MOBILE ##
   ========================================================================== */

/* Default style for desktop remains the same */
div.main-header.my-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #d1d5db; /* Ginamit ko na lang ang var(--border-color) */
    padding-bottom: 20px;
}

div.main-header.my-report-header h2 {
    margin: 0;
}

/* --- This is the stronger mobile rule --- */
@media (max-width: 768px) {
    div.main-header.my-report-header {
        flex-direction: column !important; /* Stack them vertically */
        align-items: flex-start !important; /* Align to the left */
        gap: 15px !important; /* Add space between them */
    }

    div.main-header.my-report-header .btn {
        width: 100% !important; /* Make the button full-width */
    }
}

.clickable-row {
    cursor: pointer; /* Nagiging kamay ang cursor pag tinapat */
    transition: background-color 0.2s ease-in-out;
}

.clickable-row:hover {
    background-color: #1ad333; /* Isang light blue na kulay */
}

/* cashier dashboard */

 .status-indicator {
        padding: 8px 15px;
        border-radius: 20px;
        color: #fff;
        font-weight: bold;
        font-size: 16px;
    }

    .status-open {
        background-color: #084810;
    }

    .status-paused {
        background-color: #ffc107;
        color: #f9f9fa;
    }

    .status-closed {
        background-color: red;
    }
    .status-closing {
        color: red;
    }

    /* Kaunting styling para sa orasan at button */
    .cashier-utilities {
        display: flex;
        flex-direction: column;
        /* Ito ang nagpapastack sa kanila */
        gap: 10px;
        /* Ito ang naglalagay ng espasyo sa pagitan nila */
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
    }

    .digital-clock-display {
        font-size: 1.1em;
        font-weight: 500;
        color: #495057;
        background-color: #fff;
        padding: 8px 12px;
        border-radius: 6px;
        border: 1px solid #ced4da;
    }

    .cashier-utilities .btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    /* Styles for the action buttons when serving a ticket */
    .serving-actions {
        display: flex;
        /* This aligns the forms in a row */
        gap: 10px;
        /* This adds a 10px space between each button */
        justify-content: center;
        /* This centers the group of buttons */
    }

    .serving-actions form {
        flex: 1;
        /* This is the magic part: it tells each form to take up an equal amount of space */
        display: flex;
        /* This makes the form a flex container too */
    }

    .serving-actions button {
        width: 100%;
        /* This makes the button fill the entire width of its parent form */
    }

    .shortcuts-guide {
        text-align: center;
        padding: 8px;
        background-color: #e9ecef;
        border-radius: 6px;
        margin-bottom: 15px;
        font-size: 0.9em;
        color: #495057;
    }

    .shortcuts-guide kbd {
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 3px;
        padding: 2px 5px;
        font-weight: bold;
        font-family: monospace;
    }

    .help-list {
        padding-left: 20px;
        line-height: 1.8;
    }

    .help-list li {
        margin-bottom: 15px;
    }

    .help-list ul {
        margin-top: 10px;
    }

    /* Idagdag ito sa style.css */
.form-group {
    /* Siguraduhin na ang .form-group ay relative para gumana ang absolute positioning */
    position: relative;
}

.autocomplete-results {
    display: none; /* Naka-tago by default */
    position: absolute;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 1001; /* Para lumabas sa ibabaw ng modal */
    width: 100%;
    max-height: 200px; /* Ito ang scrollable part */
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.autocomplete-results div {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.autocomplete-results div:hover {
    background-color: #f1f1f1;
}

/* =================================================================
   ## SCHOOL THEME CONTROLS (Green, Yellow, White) ##
   ================================================================= */

/* 1. GREEN BUTTONS (Go / Success / Primary) 
   Applies to: Call Next, Complete, Resume, Fast Payment */
.controls-panel .btn,
.controls-panel .btn-approve {
    background-color: var(--primary-green); /* #084810 */
    color: #ffffff;
    border: 2px solid var(--primary-green);
    font-weight: 600;
    transition: all 0.3s ease;
}

.controls-panel .btn:hover,
.controls-panel .btn-approve:hover {
    background-color: #0b5c16; /* Slightly lighter green */
    border-color: #0b5c16;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(8, 72, 16, 0.3);
}

/* 2. YELLOW BUTTONS (Pause / Recall) - STAY YELLOW */
.controls-panel .btn-recall, 
.controls-panel .btn-pause {
    background-color: #ffc107;  /* Standard School Yellow */
    color: #084810;             /* Dark Green Text */
    
    /* IMPORTANT: Border is Yellow to match background */
    border: 2px solid #ffc107;  
    
    font-weight: 700;
}

/* HOVER STATE: Still Yellow (just slightly brighter) */
.controls-panel .btn-recall:hover, 
.controls-panel .btn-pause:hover {
    background-color: #ffcd39;  /* Slightly lighter Yellow */
    
    /* FIX: Border changes to the same lighter Yellow (No Black!) */
    border-color: #ffcd39;      
    
    color: #084810;             /* Text stays Green */
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4); /* Soft Yellow Glow */
    outline: none;
}

.controls-panel .btn-recall:hover,
.controls-panel .btn-pause:hover {
    background-color: #ffca2c;
    color: #063f0e;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

/* 3. WHITE BUTTONS (Negative / Cancel)
   Applies to: No Show */
.controls-panel .btn-noshow {
    background-color: #ffffff;
    color: #dc3545; /* Red text for danger */
    border: 2px solid #dc3545; /* Red border */
}

.controls-panel .btn-noshow:hover {
    background-color: #dc3545;
    color: #ffffff;
}

/* 4. FAST PAYMENT BUTTON (Special Emphasis) */
#other-payment-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =================================================================
   ## UTILITY / REFRESH BUTTON (White & Green) ##
   ================================================================= */
.cashier-utilities .btn {
    background-color: #ffffff;
    color: var(--primary-green); /* Dark Green Text */
    border: 2px solid var(--primary-green); /* Dark Green Border */
    font-weight: 600;
    transition: all 0.3s ease;
    
    /* Ensure it aligns nicely with the clock */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
}

/* Hover Effect: Swaps to Green Background */
.cashier-utilities .btn:hover {
    background-color: var(--primary-green);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(8, 72, 16, 0.2);
    cursor: pointer;
}

/* Optional: Style the container to match the clean look */
.cashier-utilities {
    background-color: #ffffff !important; /* Force white background */
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* =================================================================
   ## MAINTENANCE BUTTONS ##
   ================================================================= */
#cleanup-previous-day-btn {
    background-color: #ffffff;
    color: var(--primary-green);    /* School Green Text */
    border: 2px solid var(--primary-green);
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

/* Hover: Turns Light Green (Minty) instead of solid dark green */
/* This keeps it distinct from the "Call Next" button */
#cleanup-previous-day-btn:hover {
    background-color: #e8f5e9;      /* Very light green tint */
    color: #063f0e;                 /* Darker text */
    border-color: #063f0e;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =================================================================
   ## SECONDARY BUTTON (Gray for Cancel/Back) ##
   ================================================================= */
.btn-secondary {
    background-color: #6c757d; /* Neutral Gray */
    color: #ffffff;
    border: 2px solid #6c757d;
    box-shadow: none; /* Cancel buttons usually don't need a heavy shadow */
}

/* Hover Effect: Darker Gray */
.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* =================================================================
   ## STUDENT DASHBOARD STYLES ##
   ================================================================= */

/* 1. Queue Status Banner (Open/Paused/Closed) */
.queue-status-banner {
    padding: 15px;
    text-align: center;
    font-weight: 700; /* Bold */
    color: white;
    margin-bottom: 30px;
    border-radius: 12px;
    font-size: 1.2em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    /* Flexbox to center icon and text */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Status Colors */
.status-open { background-color: var(--primary-green); }
.status-paused { background-color: #ffc107; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.status-closed { background-color: #dc3545; }

/* 2. Student 3-Column Stats Grid */
.student-stats-grid {
    display: grid;
    /* Auto-fit creates columns that are at least 250px wide, 
       so it stacks automatically on mobile */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    margin-bottom: 40px;
}

/* 3. Red "Cancel Ticket" Button */
#cancelTicketBtn {
    background-color: #ffffff;
    color: #dc3545;
    border: 2px solid #dc3545;
    width: auto;
    padding: 12px 25px;
    margin: 20px auto 0 auto;
    display: block; /* Centers the button */
    font-weight: 600;
    transition: all 0.3s ease;
}

#cancelTicketBtn:hover {
    background-color: #dc3545;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* =================================================================
   ## ACCESSIBLE AUTOCOMPLETE (Senior-Friendly) ##
   ================================================================= */

/* Make the dropdown box distinct and floating */
.autocomplete-results {
    display: none;
    position: absolute;
    background-color: white;
    border: 2px solid var(--primary-green); /* Green border to show it's active */
    border-radius: 0 0 8px 8px;
    z-index: 1001;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); /* Strong shadow */
}

/* Big, readable text for the list items */
.autocomplete-results div {
    padding: 15px 20px; /* Big padding = easier to click */
    font-size: 16px;    /* Larger font */
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

/* High contrast hover effect */
.autocomplete-results div:hover {
    background-color: #d1e7dd; /* Light green background */
    color: var(--primary-green);
    font-weight: 600;
}

/* The Info Card that appears AFTER selection */
.student-info-card {
    background-color: #e8f5e9; /* Very light green */
    border-left: 5px solid var(--primary-green);
    padding: 15px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 14px;
    color: #084810;
    display: none; /* Hidden by default */
}

.student-info-card strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 3px;
}

/* =================================================================
   ## SENIOR-FRIENDLY FORM INPUTS ##
   ================================================================= */

/* 1. JUMBO INPUTS: Make Money Fields Huge */
#op_amount, #op_cash, #complete_amount_to_pay, #complete_cash_provided {
    font-size: 24px;       /* Much bigger text */
    font-weight: bold;
    padding: 15px;         /* Easier to click target */
    letter-spacing: 1px;
    color: var(--primary-green);
    height: auto;          /* Let it grow */
}

/* 2. HIGH-CONTRAST FOCUS: "Where am I?" indicator */
.form-control:focus {
    background-color: #fff9db; /* Turns Light Yellow when active */
    border-color: #ffc107;     /* Gold Border */
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.25); /* Big Glow */
    transform: scale(1.02);    /* Pops out slightly */
    transition: all 0.2s ease;
}

/* 3. READABLE LABELS: Darker and bolder */
.form-group label {
    color: #333;
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 700; /* Bold */
}

/* 4. CLEAR ERROR MESSAGES */
.input-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-top: 5px;
    display: flex;
    align-items: center;
}
.input-error::before {
    content: "⚠️ "; /* Warning Icon */
    margin-right: 5px;
}

/* =================================================================
   ## BIG MODAL UPGRADE (Refined & Smaller Fonts) ##
   ## Applies to: #otherPaymentModal & #completeConfirmModal ##
   ================================================================= */

/* 1. Target BOTH Modals */
#otherPaymentModal .modal-content,
#completeConfirmModal .modal-content {
    width: 90%;
    max-width: 1000px;       /* Reduced width slightly */
    height: auto;
    min-height: 60vh;        /* Slightly shorter */
    max-height: 95vh;
    margin: 2vh auto;
    padding: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 2. Custom Header Bar */
.big-modal-header {
    background-color: var(--primary-green);
    color: white;
    padding: 12px 25px;      /* Reduced padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.big-modal-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;         /* Reduced from 24px */
    font-weight: 600;
}

.big-modal-header .close-btn {
    color: white;
    opacity: 0.8;
    font-size: 24px;         /* Reduced from 28px */
    position: static;
}

/* 3. The Two-Column Grid Layout */
.big-modal-body {
    padding: 25px;           /* Reduced padding */
    background-color: #f8f9fa;
    flex-grow: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;               /* Reduced gap */
}

/* 4. Section Styling */
.modal-section-title {
    font-size: 14px;         /* Reduced from 16px */
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6; /* Thinner line */
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* 5. General Inputs (Left Column) */
.left-col .form-control {
    font-size: 15px !important;
    padding: 10px !important;
}

/* 6. JUMBO INPUTS (Money Fields) */
#op_amount, #op_cash,
#complete_amount_to_pay, #complete_cash_provided {
    font-size: 22px !important;  /* Reduced from 26px */
    height: 50px !important;     /* Reduced from 60px */
    padding-left: 35px !important;
    font-weight: bold;
}

/* Peso Sign inside Jumbo Inputs */
.input-group span {
    font-size: 18px !important;
    left: 15px !important;
}

/* Specific colors */
#op_amount, #complete_amount_to_pay { color: var(--primary-green); }
#op_cash, #complete_cash_provided { color: #495057; }

/* Change Display */
#op_change_display, #complete_change_display {
    font-size: 28px !important;  /* Reduced from 36px */
    font-weight: 800 !important;
    border: none;
    background: transparent;
    text-align: center;
    color: var(--primary-green);
}

/* Receipt Input (Highlight) */
#op_receipt, #complete_receipt_number {
    font-size: 18px !important;
    padding: 10px !important;
    color: #d63384;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Action Buttons */
.right-col .btn {
    padding: 12px !important;    /* Reduced padding */
    font-size: 16px !important;  /* Standard button size */
}

/* Ticket Number Big Display (Complete Modal) */
/* FIX: Target ONLY the Big Ticket Number in the Complete Modal */
#completeConfirmModal .left-col strong {
    font-size: 48px !important; 
}

/* SAFETY: Force the Student Info Card text to stay small */
.student-info-card strong {
    font-size: 16px !important;
    color: var(--primary-green);
}
/* --- 2. MOBILE OVERRIDE (Grow Tall, Scroll the Whole Screen) --- */
@media (max-width: 1024px) {
    
    /* 1. Unlock the wrapper so the PAGE can scroll */
    #otherPaymentModal, #completeConfirmModal {
        overflow-y: auto !important; /* Allow the gray background to scroll */
    }

    /* 2. Make the Modal Card grow naturally */
    #otherPaymentModal .modal-content,
    #completeConfirmModal .modal-content {
        position: relative !important; /* Un-pin it from the center */
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        
        margin: 30px auto !important; /* Add top/bottom margin for scrolling space */
        width: 95% !important;
        height: auto !important;      /* Let it grow as tall as needed */
        max-height: none !important;  /* Remove any height limits */
        
        display: flex !important;
        flex-direction: column !important;
        border-radius: 15px !important;
    }

    /* 3. Let the wrappers expand */
    #other-payment-form,
    #completeConfirmModal form {
        height: auto !important;
        overflow: visible !important;
    }

    /* 4. Let the Body expand */
    .big-modal-body {
        display: block !important;    /* Stack vertically */
        padding: 0 !important;
        
        flex-grow: 0 !important;      /* Don't force-fill space */
        height: auto !important;      /* Grow with content */
        overflow: visible !important; /* No internal scrollbar */
    }

    /* 5. Spacing Adjustments */
    .left-col, .right-col {
        padding: 20px 25px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .left-col {
        border-bottom: 8px solid #e9ecef;
    }

    /* Ensure buttons have space at the bottom */
    .right-col {
        padding-bottom: 40px !important;
    }

    /* Mobile Inputs */
    #op_amount, #op_cash,
    #complete_amount_to_pay, #complete_cash_provided {
        font-size: 24px !important; 
        height: 55px !important;
        padding-left: 40px !important;
    }
}

/* =================================================================
   ## SOUND PERMISSION TOAST ##
   ================================================================= */

.sound-toast {
    position: fixed;
    bottom: 30px;
    right: 30px; /* Floating in bottom right */
    background: white;
    border-left: 5px solid var(--primary-green); /* School Theme Accent */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 15px 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 280px;
    
    /* Animation Initial State */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: none; /* Click-through when hidden */
}

/* Show State */
.sound-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.sound-toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
}

.sound-toast-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Update this specific class for the Single Button layout */
.btn-sound-confirm {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 10px 20px; /* Slightly bigger padding */
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%; /* Make it fill the available space */
}

.btn-sound-confirm:hover {
    background-color: var(--hover-green);
}

.btn-sound-dismiss {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
}

.btn-sound-dismiss:hover {
    background-color: #f8f9fa;
}

/* Mobile: Center it at the bottom */
@media (max-width: 600px) {
    .sound-toast {
        right: 5%;
        left: 5%;
        bottom: 20px;
        min-width: auto;
    }
}

/* =================================================================
   ## ADMIN SETTINGS: SHOW PIN TOGGLE FIX ##
   ================================================================= */

/* Container for the checkbox row */
.show-pin-container {
    display: flex;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 5px;
    gap: 8px; /* Space between checkbox and text */
}

/* Force the checkbox to be a normal size (override global input styles) */
.show-pin-container input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background-color: white;
    /* Reset any global input shadows/widths */
    box-shadow: none;
    display: inline-block;
}

/* Style the label next to it */
.show-pin-container label {
    margin: 0; /* Remove bottom margin from global label style */
    font-weight: 500;
    font-size: 14px;
    color: var(--font-color);
    cursor: pointer;
    user-select: none; /* Prevent text selection when clicking fast */
}

/* Optional: Add a subtle hover effect */
.show-pin-container:hover label {
    color: var(--primary-green);
}

/* Add this to the bottom of css/style.css */

/* Special Container for Profile Page (Full Width) */
/* css/style.css */

.cashier-profile-container {
    width: 100%;
    padding: 20px;
    display: block; 
    box-sizing: border-box;
    
    /* [FIX] Set this to transparent so the body's green/gray color shows through! */
    background-color: transparent; 
    
    min-height: 80vh;
}

/* --- SMART PAYMENT MODAL STYLES --- */

/* 1. Container Polish */
#variable-payment-fields {
    animation: fadeIn 0.3s ease-in-out;
}

#variable-payment-fields > div {
    /* Yung white box container */
    padding: 20px !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* --- POLISHED PAYMENT TABLE STYLES --- */

.payment-breakdown-table {
    width: 100%;
    border-collapse: collapse; /* Pinagdikit ang border para sa malinis na lines */
    margin-bottom: 15px;
}

/* 1. Lagyan ng space at linya ang bawat row */
.payment-breakdown-table tr {
    border-bottom: 1px solid #eaeaea; /* Light gray divider line */
}

/* Alisin ang line sa pinakahuling row para malinis */
.payment-breakdown-table tr:last-child {
    border-bottom: none;
}

/* 2. Dagdagan ang breathing room sa loob ng cells */
.payment-breakdown-table td {
    padding: 15px 5px; /* 15px taas/baba, 5px gilid */
    vertical-align: middle; /* Gitna ang text sa input box */
}

/* 3. Ayusin ang Header ng table */
.payment-breakdown-table th {
    padding-bottom: 15px; /* Layo sa unang item */
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ddd; /* Mas makapal na line sa header */
}

/* 4. Optional: Zebra Striping (Alternate Colors) para mas madaling sundan ng mata */
/* Kung gusto mo ng alternate background, i-uncomment ito: */
/*
.payment-breakdown-table tr:nth-child(even) {
    background-color: #fcfcfc;
}
*/

/* 5. Input Box Height Polish */
.item-price-input {
    height: 45px; /* Gawing uniform ang height */
    padding: 5px 10px;
}

/* Style kapag VARIABLE (Typeable) */
.item-price-input:not([readonly]) {
    border: 2px solid var(--primary-green); /* Green border para agaw pansin */
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,128,0,0.1);
}
.item-price-input:not([readonly]):focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2); /* Glow effect */
}

/* Style kapag FIXED (Readonly) */
.item-price-input[readonly] {
    border: 1px solid #eee;
    background-color: #f8f9fa;
    color: #666;
    cursor: default;
}

/* 5. Total Footer (UPDATED) */
.payment-total-row td {
    border-top: 3px solid #004d00; /* Mas makapal at dark green na linya */
    padding-top: 15px !important;
    vertical-align: middle;
}

/* Style para sa TEXT ("TOTAL AMOUNT:") */
.total-label {
    font-size: 1.4rem;
    font-weight: 900 !important; /* Extra Bold */
    color: #004d00 !important;    /* Dark Green */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Style para sa NUMBER ("100.00") */
#complete_amount_to_pay {
    font-family: 'Courier New', monospace;
    font-weight: 900 !important; /* Extra Bold */
    color: #004d00 !important;    /* Dark Green */
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
    padding: 0;
    
    /* Default size sa Desktop */
    font-size: 2.2rem !important; 
    line-height: 1;
}

/* --- MOBILE RESPONSIVENESS (Anti-Overflow) --- */
@media (max-width: 600px) {
    /* Paliitin ang font sa mobile para magkasya */
    .total-label {
        font-size: 1.1rem; /* Mas maliit na label */
    }
    
    #complete_amount_to_pay {
        font-size: 1.6rem !important; /* Mas maliit na number para di lumampas */
    }

    /* Siguraduhing magkatabi sila nang maayos */
    .payment-total-row tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .payment-total-row td {
        padding: 10px 0 !important;
        border-top: 2px solid #004d00;
    }
}

/* 6. Cash & Change Section */
.cash-change-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px dashed #ccc;
}

#complete_cash_provided {
    font-size: 2rem !important;
    height: 60px;
    color: #333;
    border: 2px solid #ccc;
    border-radius: 10px;
    transition: border-color 0.2s;
}
#complete_cash_provided:focus {
    border-color: var(--primary-green);
}

#complete_change_display {
    font-family: 'Courier New', monospace;
    font-weight: 900 !important;
    letter-spacing: -1px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 600px) {
    /* Gawing stack ang table rows sa mobile kung masikip */
    .payment-breakdown-table th {
        display: none; /* Hide headers sa mobile para malinis */
    }
    
    .payment-breakdown-table tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .payment-breakdown-table td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .item-price-input {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-top: 5px;
    }

    .payment-total-row tr {
        display: flex;
        flex-direction: row; /* Balik sa row para sa total */
        justify-content: space-between;
        align-items: center;
    }
    
    .payment-item-name small {
        display: inline-block;
        margin-left: 5px;
    }
}

/* --- FIX FOR CUT-OFF MODAL BUTTONS --- */

/* 1. Limitahan ang height ng Modal at gawing Flex container */
#completeConfirmModal .modal-content {
    max-height: 90vh; /* Hanggang 90% lang ng taas ng screen */
    display: flex;
    flex-direction: column;
    padding: 0; /* Alisin muna ang padding para dikit ang header */
    overflow: hidden; /* Iwasan ang double scrollbar sa labas */
}



/* 3. Ang Body ang siyang magkakaroon ng Scrollbar */
#complete-modal-wrapper {
    flex: 1; /* Sakupin ang natitirang space */
    overflow-y: auto; /* Magkaroon ng scrollbar kapag mahaba */
    padding: 20px; /* Ibalik ang padding dito */
}

/* 4. Optional: Pagandahin ang Scrollbar (Chrome/Edge/Safari) */
#complete-modal-wrapper::-webkit-scrollbar {
    width: 8px;
}
#complete-modal-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}
#complete-modal-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
#complete-modal-wrapper::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- FIXED TOTAL AMOUNT STYLES (Force Override) --- */

/* 1. Targetin ang Footer Row sa loob mismo ng container */
#variable-payment-fields tfoot tr {
    border-top: 3px solid #004d00 !important; /* Dark Green Line */
}

#variable-payment-fields tfoot td {
    padding-top: 15px !important;
    vertical-align: middle !important;
}

/* 2. Style para sa TEXT ("TOTAL AMOUNT:") */
#variable-payment-fields tfoot td:first-child {
    font-size: 1.3rem;
    font-weight: 900 !important; /* Extra Bold */
    color: #004d00 !important;    /* Dark Green */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Bawal maputol ang text */
}

/* 3. Style para sa NUMBER INPUT */
#complete_amount_to_pay {
    font-family: 'Courier New', monospace;
    font-weight: 900 !important; 
    color: #004d00 !important;    /* Dark Green */
    background: transparent !important;
    border: none !important;
    text-align: right !important;
    width: 100% !important;
    padding: 0 !important;
    
    /* Default Desktop Size */
    font-size: 2rem !important; 
}

/* --- MOBILE ADJUSTMENTS (Para hindi lumampas) --- */
@media (max-width: 480px) {
    
    /* I-flex natin ang row para magtabi sila nang maayos */
    #variable-payment-fields tfoot tr {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    #variable-payment-fields tfoot td {
        display: block !important;
        width: auto !important;
        border: none !important; 
        padding-top: 10px !important;
    }

    /* Label: Paliitin nang konti */
    #variable-payment-fields tfoot td:first-child {
        font-size: 1rem !important; /* Mas maliit para kasya */
        margin-right: 10px;
    }

    /* Input Number: Paliitin para hindi lumampas */
    #complete_amount_to_pay {
        font-size: 1.4rem !important; /* Sakto lang sa mobile */
        width: 100% !important;
        text-align: right !important;
    }
}

/* --- MULTI-SELECT TRANSACTION GRID --- */
.transaction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.trans-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    position: relative;
}

.trans-card:hover {
    border-color: var(--primary-green);
    background: #f9fff9;
}

.trans-card.active {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.trans-card .t-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.trans-card .t-price {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

/* Validation Error Style */
.trans-card.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #dc3545;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}


    /* --- TRANSACTION GRID STYLES FOR CASHIER --- */
    .transaction-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
        margin-top: 10px;
        overflow-y: auto;
        max-height: 200px;
    }
    .trans-card {
        background-color: #fff;
        border: 2px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 80px;
    }
    .trans-card:hover { border-color: var(--primary-green, #28a745); }
    .trans-card.active {
        background-color: #e8f5e9;
        border-color: var(--primary-green, #28a745);
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
    }
    .trans-card .t-name { font-weight: bold; margin-bottom: 5px; color: #333; }
    .trans-card .t-price { font-size: 0.9em; color: #666; }
    
    /* PAID ITEM STYLES */
    .trans-card.paid-item {
        background-color: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        opacity: 0.7;
        cursor: not-allowed !important;
        pointer-events: none; 
    }
    .trans-card.paid-item .t-price { text-decoration: line-through; color: #999; }
