/* ================================================================
   Beauty Private Label — Admin Panel CSS
   Bootstrap 5 layout + Bootstrap 3 compatibility shim
   ================================================================ */

/* ----------------------------------------------------------------
   1. LAYOUT
   ---------------------------------------------------------------- */

body {
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Top navbar */
.admin-navbar {
    background: #1a2332;
    height: 56px;
    z-index: 1035;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.admin-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.3px;
}

.admin-navbar .hamburger-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    padding: 6px 10px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.admin-navbar .hamburger-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Sidebar */
.admin-sidebar {
    background: #1a2332;
    width: 230px !important;
}

.admin-sidebar .offcanvas-header {
    background: #141c28;
    padding: 14px 16px;
}

.admin-sidebar .offcanvas-title {
    color: #fff;
    font-weight: 600;
}

/* Sidebar nav */
.admin-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.admin-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.admin-nav li a:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
    border-left-color: rgba(255,255,255,0.3);
}

.admin-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #4e9af1;
}

.admin-nav li a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.admin-nav .nav-divider {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 8px 0;
}

/* Main content */
.admin-main {
    min-height: 100vh;
    padding: 72px 20px 30px;
}

/* Desktop: sidebar fixed, main indented */
@media (min-width: 992px) {
    .admin-sidebar {
        position: fixed !important;
        top: 56px;
        left: 0;
        height: calc(100vh - 56px);
        transform: none !important;
        visibility: visible !important;
        overflow-y: auto;
        z-index: 1020;
        border-right: 1px solid rgba(255,255,255,0.05);
    }

    .admin-main {
        margin-left: 230px;
    }

    /* Hide offcanvas close button on desktop */
    .admin-sidebar .btn-close { display: none; }
}

/* Mobile: full-width content, offcanvas sidebar */
@media (max-width: 991.98px) {
    .admin-main {
        padding: 68px 12px 20px;
    }
}


/* ----------------------------------------------------------------
   2. PAGE COMPONENTS
   ---------------------------------------------------------------- */

.admin-page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Card (panel equivalent) */
.card {
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 14px;
    color: #1a2332;
    padding: 12px 16px;
}

.card-body {
    padding: 16px;
}


/* ----------------------------------------------------------------
   3. BOOTSTRAP 3 → 5 COMPATIBILITY SHIM
   The content views use BS3 classes. These mappings let them keep
   working without any changes to the individual view files.
   ---------------------------------------------------------------- */

/* .panel → .card */
.panel {
    background: #fff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.panel-heading {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 6px 6px 0 0;
    background: #fff;
    font-weight: 600;
    font-size: 14px;
    color: #1a2332;
}

.panel-body {
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* .label → .badge */
.label {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}
.label-default  { background: #6c757d; }
.label-primary  { background: #0d6efd; }
.label-success  { background: #198754; }
.label-info     { background: #0dcaf0; color: #000; }
.label-warning  { background: #ffc107; color: #000; }
.label-danger   { background: #dc3545; }

/* .btn-default → btn-secondary style */
.btn-default {
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
}
.btn-default:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
    color: #333;
}

/* .table-condensed */
.table-condensed th,
.table-condensed td {
    padding: 4px 8px !important;
}

/* .input-group-addon (BS3) → .input-group-text (BS5) */
.input-group-addon {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 14px;
    color: #555;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    white-space: nowrap;
}

/* Place addon correctly inside .input-group */
.input-group .input-group-addon:first-child {
    border-right: 0;
    border-radius: 4px 0 0 4px;
}
.input-group .input-group-addon:last-child {
    border-left: 0;
    border-radius: 0 4px 4px 0;
}

/* .col-xs-* (BS3) — map to same widths, no breakpoint (always applied) */
.col-xs-1  { flex: 0 0 8.3333%;  max-width: 8.3333%;  padding-right: 15px; padding-left: 15px; }
.col-xs-2  { flex: 0 0 16.6667%; max-width: 16.6667%; padding-right: 15px; padding-left: 15px; }
.col-xs-3  { flex: 0 0 25%;      max-width: 25%;      padding-right: 15px; padding-left: 15px; }
.col-xs-4  { flex: 0 0 33.3333%; max-width: 33.3333%; padding-right: 15px; padding-left: 15px; }
.col-xs-5  { flex: 0 0 41.6667%; max-width: 41.6667%; padding-right: 15px; padding-left: 15px; }
.col-xs-6  { flex: 0 0 50%;      max-width: 50%;      padding-right: 15px; padding-left: 15px; }
.col-xs-7  { flex: 0 0 58.3333%; max-width: 58.3333%; padding-right: 15px; padding-left: 15px; }
.col-xs-8  { flex: 0 0 66.6667%; max-width: 66.6667%; padding-right: 15px; padding-left: 15px; }
.col-xs-9  { flex: 0 0 75%;      max-width: 75%;      padding-right: 15px; padding-left: 15px; }
.col-xs-10 { flex: 0 0 83.3333%; max-width: 83.3333%; padding-right: 15px; padding-left: 15px; }
.col-xs-11 { flex: 0 0 91.6667%; max-width: 91.6667%; padding-right: 15px; padding-left: 15px; }
.col-xs-12 { flex: 0 0 100%;     max-width: 100%;     padding-right: 15px; padding-left: 15px; }

/* .well */
.well {
    background: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}

/* .form-group */
.form-group { margin-bottom: 16px; }

/* .checkbox / .radio */
.checkbox, .radio {
    display: block;
    margin-top: 4px;
    margin-bottom: 8px;
}
.checkbox label, .radio label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    min-height: 20px;
}
.checkbox input[type="checkbox"],
.radio input[type="radio"] {
    margin: 0;
}

/* .pull-right / .pull-left */
.pull-right { float: right !important; }
.pull-left  { float: left  !important; }

/* .text-right (BS3 kept in BS5, just making sure) */
.text-right { text-align: right !important; }

/* .border-head (used in orders page) */
.border-head h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* .form-inline on mobile: stack */
@media (max-width: 575.98px) {
    .form-inline { flex-direction: column; align-items: stretch !important; }
    .form-inline .form-control,
    .form-inline select { width: 100%; }
}


/* ----------------------------------------------------------------
   4. TABLES — mobile scroll wrapper
   ---------------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Make all panel-body tables scroll on mobile */
@media (max-width: 767px) {
    .panel-body { overflow-x: auto; }

    .table { min-width: 480px; }

    /* Prevent iOS zoom on focus */
    input, select, textarea {
        font-size: 16px !important;
    }

    .btn { min-height: 38px; }
    .btn-xs { min-height: 30px; font-size: 12px; }
}


/* ----------------------------------------------------------------
   5. ALERTS
   ---------------------------------------------------------------- */
.alert { border-radius: 6px; font-size: 14px; }


/* ----------------------------------------------------------------
   6. LOGIN PAGE
   ---------------------------------------------------------------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a2332;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 6px;
}

.login-box .subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 28px;
}

/* ----------------------------------------------------------------
   Dashboard stat cards
   ---------------------------------------------------------------- */

.dash-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dash-card-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.1;
}

.dash-card-label {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

@media (max-width: 575px) {
    .dash-card { padding: 14px 16px; gap: 12px; }
    .dash-card-icon { width: 40px; height: 40px; font-size: 17px; }
    .dash-card-value { font-size: 18px; }
}
