/* ==========================================================================
   URBN KULTURE POS SYSTEM - MAIN STYLESHEET
   Color Palette:
   - Primary BG: #f3f4f6 (Light Gray)
   - Navbar: #ffffff (White)
   - Sidebar: #111827 (Midnight Dark)
   - Accent: #10b981 (Emerald Green)
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL DEFAULTS & RESET
   ========================================================================== */
html, body {
    background-color: #f3f4f6 !important; 
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.content-wrapper {
    background-color: #f3f4f6 !important;
}

/* ==========================================================================
   2. PRELOADER & SPINNER
   ========================================================================== */
body.pace-running { overflow: hidden; }

#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #ffffff; z-index: 99999; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#loading-overlay.fade-out { 
    opacity: 0; visibility: hidden; pointer-events: none; 
}

/* Base Container para sa Sanina ug Printer */
.print-container {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Porma sa Sanina */
.shirt-base {
    font-size: 120px;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Kani ang Walay Sila (Blank Canvas) */
.shirt-blank {
    color: #e5e7eb; /* Light Gray */
    z-index: 1;
}

/* Kani ang Na-printan na (Ginatabunan ang blank) */
.shirt-printed {
    color: #111827; /* Midnight Dark */
    z-index: 2;
    clip-path: inset(100% 0 0 0); /* Nakatago gikan sa taas paubos */
    transform: translateZ(0); 
    will-change: clip-path;
}

/* Logo nga i-print sa tunga sa sanina */
.shirt-logo-inner {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #10b981;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    clip-path: inset(100% 0 0 0);
    will-change: clip-path;
}

/* Ang Laser Line/Printer Head nga gatuyok paubos */
.printer-line {
    position: absolute;
    top: 0%;
    left: -10%;
    width: 120%;
    height: 3px;
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
    z-index: 4;
    will-change: top;
    transition: opacity 0.3s;
}

/* Texts ug Porsyento */
.preloader-title { letter-spacing: 3px; font-size: 1.4rem; font-weight: 800; text-transform: uppercase; color: #111827; }
.preloader-title span { color: #10b981; }
.preloader-text { font-size: 0.85rem; letter-spacing: 1px; font-weight: 600; text-transform: uppercase; color: #6b7280; margin-top: 5px; }

/* Tago-on nato ang default ni Pace.js kay atoang custom design ang gamiton */
.pace { pointer-events: none; user-select: none; }
.pace .pace-progress, .pace .pace-activity { display: none !important; }

/* ==========================================================================
   3. NAVBAR, SIDEBAR & FOOTER
   ========================================================================== */
/* Navbar */
.main-header { background-color: #ffffff !important; border-bottom: 1px solid #e5e7eb !important; }
.main-header .nav-link, .main-header .font-weight-bold, .main-header .fa-bars { color: #111827 !important; }

/* Sidebar Background */
.main-sidebar, .main-sidebar .sidebar, .brand-link { background-color: #111827 !important; }
.brand-link { border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; }
.brand-text-juan, .brand-text { color: #ffffff !important; font-weight: 700; letter-spacing: 1px; }

/* Sidebar Links */
.sidebar .nav-header { color: #9ca3af !important; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.sidebar .user-panel .info a { color: #ffffff !important; }
.sidebar .nav-link { color: #d1d5db !important; }
.sidebar .nav-link:hover { color: #ffffff !important; background-color: rgba(255, 255, 255, 0.05) !important; }

/* Sidebar Active State (Emerald) */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: #10b981 !important; color: #ffffff !important; font-weight: bold !important; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.nav-pills .nav-link.active i { color: #ffffff !important; }

/* Footer */
.main-footer { background-color: #ffffff !important; color: #374151; border-top: 1px solid #e5e7eb; }

/* Dropdown Profile */
.nav-user-img { width: 30px; height: 30px; background-color: #111827 !important; color: #ffffff !important; vertical-align: middle; }
.user-dropdown-menu { min-width: 280px; margin-top: 8px !important; border-top: 3px solid #10b981; }
.user-header-styled { border-radius: 5px 5px 0 0; background-color: #111827 !important; color: #ffffff !important; }
.user-header-img { width: 80px; height: 80px; font-size: 40px; background-color: #ffffff !important; color: #111827 !important; }
.user-header-role { opacity: 0.8; color: rgba(255,255,255,0.8) !important; }

/* ==========================================================================
   4. LOGIN PAGE
   ========================================================================== */
.login-page-body { background-color: #f3f4f6; margin: 0; height: 100vh; overflow: hidden; }
.login-container { display: flex; height: 100vh; width: 100%; }
.login-banner { flex: 1; background-color: #111827; background-size: contain; background-position: center center; background-repeat: no-repeat; width: 100%; height: 100%; }
.login-form-wrapper { width: 500px; background: #ffffff; display: flex; align-items: center; justify-content: center; padding: 40px; box-shadow: -5px 0 15px rgba(0,0,0,0.05); z-index: 10; }
.login-header-img { max-height: 100px; width: auto; margin-bottom: 5px; }
.system-title h1 { font-weight: 800; font-size: 26px; color: #0f172a; line-height: 1.2; text-transform: uppercase; margin-bottom: 25px;}

.login-form-wrapper .form-control { height: 50px; border-radius: 8px; border: 1px solid #e2e8f0; background-color: #f8fafc; padding-left: 15px; }
.login-form-wrapper .form-control:focus { background-color: #fff; border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.login-form-wrapper .input-group-text { border: 1px solid #e2e8f0; border-left: none; background-color: #f8fafc; border-radius: 0 8px 8px 0; color: #6c757d; cursor: pointer; }

#loginbutton { height: 50px; border-radius: 8px; font-weight: 600; font-size: 16px; margin-top: 20px; width: 100%; background-color: #10b981; border-color: #10b981; color: #fff; }
#loginbutton:hover { background-color: #059669; transform: translateY(-1px); box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2); }

/* ==========================================================================
   5. DASHBOARD & UI COMPONENTS
   ========================================================================== */
.card { border: none; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-radius: 8px; margin-bottom: 1rem; background-color: #ffffff; }
.stat-card { border: none; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); background: #fff; padding: 20px; transition: transform 0.2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.stat-icon { width: 45px; height: 45px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 15px; }

/* Global Input Sizing (Matches Select2 40px) */
.content-wrapper .form-control:not(.form-control-sm):not(.form-control-lg),
.content-wrapper .input-group-text { height: 40px !important; font-size: 0.95rem; }

.select2-container .select2-selection--single { height: 40px !important; }
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered { line-height: 38px !important; }

/* ==========================================================================
   6. DATATABLES (POS THEME)
   ========================================================================== */
.dataTables_wrapper { background: #ffffff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); margin-top: 10px; }
table.dataTable thead th { background-color: #111827 !important; color: #ffffff !important; border-bottom: none !important; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; padding: 12px 10px; }
table.dataTable thead th:first-child { border-top-left-radius: 6px; }
table.dataTable thead th:last-child { border-top-right-radius: 6px; }

table.dataTable tbody td { font-size: 0.95rem; color: #333333; padding: 10px; vertical-align: middle; border-color: #f0f0f0 !important; }
table.dataTable.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(17, 24, 39, 0.02) !important; }
table.dataTable tbody tr:hover { background-color: rgba(16, 185, 129, 0.1) !important; transition: background-color 0.2s; }

.dataTables_wrapper .page-item.active .page-link { background-color: #10b981 !important; border-color: #10b981 !important; color: #ffffff !important; font-weight: bold; }
.dataTables_wrapper .dataTables_filter input { border: 1px solid #d1d5db; border-radius: 20px; padding: 5px 15px; outline: none; }
.dataTables_wrapper .dataTables_filter input:focus { border-color: #10b981; box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25); }

/* Special Row Colors (Paid/Unpaid) */
.row-paid { background-color: #d1e7dd !important; color: #0f5132 !important; }
.row-unpaid { background-color: #f8d7da !important; color: #842029 !important; }

/* ==========================================================================
   7. TOASTR NOTIFICATIONS
   ========================================================================== */
#toast-container > div,
#toast-container > .toast-success,
#toast-container > .toast-error,
#toast-container > .toast-warning,
#toast-container > .toast-info { 
    background-image: none !important; 
}

#toast-container > div { opacity: 1 !important; box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important; border-radius: 8px !important; padding: 20px 20px 20px 60px !important; width: 350px !important; position: relative; }
#toast-container > div::before { font-family: "Font Awesome 5 Free"; font-weight: 900; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; }
#toast-container > .toast-success { background-color: #10b981 !important; border-left: 6px solid #059669; }
#toast-container > .toast-success::before { content: "\f00c"; }
#toast-container > .toast-error { background-color: #ef4444 !important; border-left: 6px solid #b91c1c; }
#toast-container > .toast-error::before { content: "\f00d"; }
#toast-container > .toast-warning { background-color: #fbbf24 !important; border-left: 6px solid #d97706; color: #111827 !important; }
#toast-container > .toast-warning::before { content: "\f071"; color: #111827 !important; }

.toast-title { font-weight: 800 !important; font-size: 1.1rem !important; }
.toast-message { font-size: 0.95rem !important; }

/* ==========================================================================
   8. DARK MODE OVERRIDES (Keep for user preference)
   ========================================================================== */
body.dark-mode { background-color: #1f2937; color: #f9fafb; }
.dark-mode .card, .dark-mode .dataTables_wrapper, .dark-mode .modal-content { background-color: #374151; color: #fff; }
.dark-mode .form-control { background-color: #4b5563; border-color: #6b7280; color: white; }
.dark-mode table.dataTable thead th { background-color: #1f2937 !important; }
.dark-mode table.dataTable tbody td { border-color: #4b5563 !important; color: #d1d5db; }

/* ==========================================================================
   9. ERROR PAGES (404 & DB Errors)
   ========================================================================== */
.error-page-body, .db-error-body { background: #f3f4f6; display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; text-align: center; }
.error-code { font-size: 6rem; font-weight: 700; color: #fbbf24; line-height: 1; }
.btn-home, .btn-retry { background: #111827; color: white; padding: 10px 20px; border-radius: 5px; text-decoration: none; transition: all 0.2s; }
.btn-home:hover, .btn-retry:hover { background: #374151; color: white; }

/* ==========================================================================
   10. MOBILE & UTILITIES
   ========================================================================== */
.w-5pct { width: 5%; } .w-10pct { width: 10%; } .w-20pct { width: 20%; }
.initially-hidden { display: none; }
.cursor-pointer { cursor: pointer; }

@media (max-width: 992px) { .login-banner { display: none; } .login-form-wrapper { width: 100%; padding: 20px; } }
@media (max-width: 768px) { .dataTables_wrapper { padding: 10px; } }


/* ==========================================================================
   12. MODERN BUTTON EFFECTS (POS THEME)
   ========================================================================== */
.btn { 
    transition: all 0.2s ease-in-out; 
}
.btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important; 
}
.btn:active { 
    transform: translateY(0); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; 
}