/*
 * UI v2 — 2026-02-24
 * Layered on top of ui-improvements.css (v1.2)
 * To revert: remove the <link> in default.php and auth.php
 */

/* ========================================
   1. CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    --orange:       #da6f29;
    --orange-dark:  #c5621f;
    --orange-light: #fff3eb;
    --orange-bg:    #fff8f3;
    --orange-a12:   rgba(218,111,41,0.12);
    --orange-a08:   rgba(218,111,41,0.08);
    --gray-50:      #f9fafb;
    --gray-100:     #f3f4f6;
    --gray-200:     #e5e7eb;
    --gray-300:     #d1d5db;
    --gray-400:     #9ca3af;
    --gray-500:     #6b7280;
    --gray-600:     #4b5563;
    --gray-700:     #374151;
    --gray-800:     #1f2937;
    --gray-900:     #111827;
    --radius-sm:    4px;
    --radius-md:    8px;
    --radius-lg:    12px;
    --radius-xl:    16px;
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:    0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg:    0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl:    0 20px 50px rgba(0,0,0,0.15);
}

/* ========================================
   2. LOGIN PAGE MODERNIZATION
   White bg, same col-sm-6 width, modern polish
   ======================================== */
body.login {
    background: #fff;
    font-family: 'Inter', sans-serif;
}
body.login .main-login {
    animation: fadeInUp 0.5s ease-out;
}
/* Logo */
body.login .logo {
    padding: 20px 20px 10px;
}
/* Login card — same size, modern shadow */
body.login .box-login {
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.10);
    padding: 28px 24px 20px;
    border-top: none;
}
/* Title */
body.login .box-login h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}
body.login .box-login > p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 18px;
}
/* Form fields */
body.login .form-group {
    margin-bottom: 14px;
}
body.login .form-control {
    height: 40px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
body.login .form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-a12);
}
/* Input icons — orange on focus */
body.login .input-icon > [class*="fa-"] {
    color: var(--gray-400);
    transition: color 0.2s;
}
body.login .input-icon > input:focus + [class*="fa-"] {
    color: var(--orange);
}
/* Forgot link */
body.login a.forgot {
    color: var(--orange-dark);
    text-shadow: none;
    font-weight: 500;
}
body.login a.forgot:hover {
    color: var(--orange);
}
/* Checkbox */
body.login label.checkbox-inline {
    font-size: 13px;
    color: var(--gray-600);
}
/* Login button — orange gradient */
body.login .btn-bricky {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 24px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(218,111,41,0.3);
}
body.login .btn-bricky:hover {
    box-shadow: 0 4px 14px rgba(218,111,41,0.4);
    transform: translateY(-1px);
}
body.login .btn-bricky:active {
    transform: translateY(0);
}
/* Form actions divider */
body.login .form-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}
/* Alert inside login */
body.login .alert {
    border-radius: 6px;
    font-size: 13px;
}

/* ========================================
   3. DASHBOARD STAT CARDS (.noti-box)
   ======================================== */
.noti-box {
    display: flex !important;
    align-items: center;
    padding: 18px 20px !important;
    min-height: auto !important;
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-md) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff !important;
}
.noti-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.noti-box .icon-box {
    float: none !important;
    flex-shrink: 0;
    width: 52px !important;
    height: 52px !important;
    line-height: 52px !important;
    font-size: 24px !important;
    margin: 0 16px 0 0 !important;
    background: var(--orange-light) !important;
    color: var(--orange) !important;
}
.noti-box .text-box {
    flex: 1;
    min-width: 0;
}
.noti-box .text-box .main-text {
    font-size: 20px !important;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
    margin-bottom: 2px !important;
}
.noti-box .text-box .text-muted {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0 !important;
}
.noti-box .text-box br {
    display: none;
}

/* ========================================
   4. DASHBOARD SIDE PANELS
   ======================================== */
.bg-color-green {
    background: linear-gradient(135deg, #00CE6F 0%, #009B50 100%) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}
.bg-color-red {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}
.bg-color-green .panel-body,
.bg-color-red .panel-body {
    padding: 20px 16px !important;
}
.bg-color-green .panel-body .fa,
.bg-color-red .panel-body .fa {
    font-size: 36px !important;
    opacity: 0.85;
}
.bg-color-green .panel-body h3,
.bg-color-red .panel-body h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0 0;
}
.back-footer-green {
    background: rgba(0,0,0,0.15) !important;
    border-radius: 0 !important;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
}
.back-footer-red {
    background: rgba(0,0,0,0.15) !important;
    border-radius: 0 !important;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
}

/* ========================================
   5. HEADER DROPDOWN POLISH
   ======================================== */
/* Credits badge — pill shape */
.nav-cstm .notifications-menu > a {
    margin-top: 16px !important;
    padding: 6px 14px !important;
    border-radius: 20px;
    background: var(--orange-light) !important;
    line-height: 1.4;
}
.nav-cstm .notifications-menu > a .fa {
    color: var(--orange) !important;
    font-size: 14px !important;
}
/* Dropdown h3 override */
.nav-cstm .dropdown-menu .menu li a h3 {
    font-family: 'Inter', sans-serif;
    font-size: 13px !important;
    font-weight: 500;
    color: var(--gray-700);
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
}
.nav-cstm .dropdown-menu .menu li a h3 b {
    font-weight: 600;
}
.nav-cstm .dropdown-menu .menu li:last-child a {
    color: #dc2626;
    border-top: 1px solid var(--gray-100);
    margin-top: 4px;
    padding-top: 10px !important;
}
.nav-cstm .dropdown-menu .menu li:last-child a h3 {
    color: #dc2626;
}
.nav-cstm .dropdown-menu .menu li:last-child a:hover {
    background: #fef2f2;
}
/* Profile image */
.nav-cstm .tasks-menu > a img {
    border: 2px solid var(--gray-200);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-cstm .tasks-menu > a:hover img {
    border-color: var(--orange);
}

/* ========================================
   6. SIDEBAR OVERRIDES
   ======================================== */
/* Override inline letter-spacing and font-size on menu items */
.sidebar-menu > li > a {
    letter-spacing: 0.3px !important;
    font-size: 14px !important;
}
.sidebar-menu > li > a > span {
    letter-spacing: 0.3px !important;
    font-size: 14px !important;
}
/* Treeview submenu overrides */
.sidebar-menu .treeview-menu {
    padding-left: 20px !important;
    letter-spacing: 0.2px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.sidebar-menu .treeview-menu > li > a {
    padding: 6px 12px !important;
    border-radius: var(--radius-sm);
    margin: 1px 4px;
}
.sidebar-menu .treeview-menu > li > a:hover {
    background: rgba(218,111,41,0.08) !important;
}
/* Active item glow */
.sidebar-menu > li.active > a {
    box-shadow: inset 3px 0 0 var(--orange), 0 0 12px rgba(218,111,41,0.06);
}
/* Smoother treeview expand */
.sidebar-menu .treeview-menu {
    transition: max-height 0.25s ease;
}
/* Override hr inline styles */
.sidebar hr {
    margin-top: 6px !important;
    margin-bottom: 6px !important;
}

/* ========================================
   7. FILTER FORMS / WELLS
   ======================================== */
.well {
    background: var(--gray-50) !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    padding: 16px !important;
}
.well .form-group {
    margin-bottom: 8px;
}
.well .btn {
    margin-top: 0;
}
/* Input group addons (date picker icons etc) */
.input-group-addon {
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--gray-500);
}

/* ========================================
   8. MICRO-ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Content area entrance */
.content-wrapper .content {
    animation: fadeInUp 0.3s ease-out;
}
/* Button hover scale */
.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0) !important;
}
/* Panel / card hover lift */
.panel {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.panel:hover {
    box-shadow: var(--shadow-md);
}
/* NProgress bar → orange */
#nprogress .bar {
    background: var(--orange) !important;
    height: 3px !important;
}
#nprogress .peg {
    box-shadow: 0 0 10px var(--orange), 0 0 5px var(--orange) !important;
}
#nprogress .spinner-icon {
    border-top-color: var(--orange) !important;
    border-left-color: var(--orange) !important;
}

/* ========================================
   9. PRINT STYLES
   ======================================== */
@media print {
    .main-header,
    .main-sidebar,
    .sidebar-overlay,
    .sidebar-toggle,
    .navbar,
    .breadcrumb,
    .btn,
    .pagination,
    .modal,
    #nprogress {
        display: none !important;
    }
    .content-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    #page-inner {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .table {
        border-collapse: collapse !important;
    }
    .table > thead > tr > th {
        background: #f5f5f5 !important;
        border-bottom: 2px solid #333 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .table > tbody > tr > td {
        border-color: #ccc !important;
    }
    body {
        font-size: 12px !important;
        color: #000 !important;
        background: #fff !important;
    }
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}

/* ========================================
   10. EMPTY / LOADING STATES
   ======================================== */
.table tbody td[colspan] {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--gray-400);
    font-size: 14px;
    font-style: italic;
}
/* Morris chart empty state */
#weekly-chart:empty,
#weekly-chart:only-child {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 14px;
}

/* ========================================
   BONUS — PANEL HEADING POLISH
   ======================================== */
.panel-default > .panel-heading {
    background: var(--gray-50);
    border-color: var(--gray-200);
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    padding: 12px 16px;
}

/* ========================================
   BONUS — DROPDOWN CARET
   ======================================== */
.sidebar-menu .pull-right-container .fa-angle-left {
    transition: transform 0.2s ease;
}
.sidebar-menu .treeview.active > a .pull-right-container .fa-angle-left {
    transform: rotate(-90deg);
}
