/* =========================================================
   ST-POS · StandardTech Admin Theme
   Full responsive redesign — layered on top of theme.css / style.css
   Brand tokens: Orange #F97316 · Navy #0d1b3e
   ========================================================= */

:root {
    --st-orange: #F97316;
    --st-orange-dark: #ea640a;
    --st-orange-light: #fff1e6;
    --st-navy: #0d1b3e;
    --st-navy-light: #142a5c;
    --st-bg: #f4f6f9;
    --st-card-bg: #ffffff;
    --st-border: #e6e9ef;
    --st-text: #1f2533;
    --st-text-muted: #6b7280;
    --st-success: #16a34a;
    --st-danger: #dc2626;
    --st-warning: #d97706;
    --st-sidebar-width: 260px;
    --st-sidebar-width-mini: 64px;
    --st-header-height: 56px;
    --st-radius: 10px;
    --st-radius-sm: 6px;
    --st-shadow: 0 1px 3px rgba(13, 27, 62, 0.06), 0 1px 2px rgba(13, 27, 62, 0.04);
    --st-shadow-md: 0 4px 12px rgba(13, 27, 62, 0.08);
    --st-font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --st-font-heading: 'Outfit', 'Inter', sans-serif;
}

/* =========================================================
   Base
   ========================================================= */
body {
    font-family: var(--st-font);
    background-color: var(--st-bg);
    color: var(--st-text);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.logo, .div-title h3 {
    font-family: var(--st-font-heading);
}
a {
    color: var(--st-orange-dark);
}
a:hover, a:focus {
    color: var(--st-orange);
}

/* =========================================================
   Topbar / Header
   ========================================================= */
#header {
    background: var(--st-navy) !important;
    border: none !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    height: var(--st-header-height);
    min-height: var(--st-header-height);
    display: flex;
    align-items: center;
    padding: 0;
}
#header .container {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
a.navbar-brand {
    color: #fff !important;
    font-family: var(--st-font-heading);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    height: var(--st-header-height);
    padding: 0;
    margin: 0;
}
a.navbar-brand .logo::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--st-orange);
    margin-right: 8px;
    vertical-align: middle;
}
#header .btn,
#header .header-nav .btn {
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: none;
}
#header .btn:hover,
#header .header-nav .btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--st-radius-sm);
}
#header .header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
}
#header .dropdown-menu {
    border-radius: var(--st-radius-sm);
    border: 1px solid var(--st-border);
    box-shadow: var(--st-shadow-md);
    margin-top: 8px;
}
#header .account .user span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}
.mini_avatar {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.25);
}
.navbar-toggle {
    color: #fff !important;
}
.navbar-toggle .fa-bars {
    color: #fff;
}

/* =========================================================
   Layout — flexbox replacing the old table layout
   ========================================================= */
#app_wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
#container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    flex: 1;
}
#main-con {
    margin: 0;
    min-height: calc(100vh - var(--st-header-height));
}
.app-layout {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: calc(100vh - var(--st-header-height));
}
.sidebar-con {
    flex: 0 0 var(--st-sidebar-width);
    width: var(--st-sidebar-width);
    max-width: var(--st-sidebar-width);
    transition: flex-basis 0.2s ease, width 0.2s ease, max-width 0.2s ease;
}
.content-con {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

/* sidebar-minified (desktop collapsed state — JS-controlled, keep compatible) */
body.sidebar-minified .sidebar-con {
    flex-basis: var(--st-sidebar-width-mini);
    width: var(--st-sidebar-width-mini);
    max-width: var(--st-sidebar-width-mini);
}

/* =========================================================
   Sidebar
   ========================================================= */
#sidebar-left {
    background: var(--st-navy) !important;
    width: 100%;
    padding: 12px 0;
    min-height: 100%;
}
.sidebar-nav > ul.main-menu {
    margin: 0;
    padding: 0;
}
.sidebar-nav > ul.main-menu > li {
    list-style: none;
}
.sidebar-nav > ul.main-menu > li > a,
.sidebar-nav > ul.main-menu > li > a.dropmenu {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    padding: 11px 18px;
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav > ul.main-menu > li > a i.fa {
    width: 20px;
    margin-right: 10px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
}
.sidebar-nav > ul.main-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.sidebar-nav > ul.main-menu > li.active > a,
.sidebar-nav > ul.main-menu > li > a.open {
    background: rgba(249, 115, 22, 0.12);
    color: #fff;
    border-left-color: var(--st-orange);
}
.sidebar-nav > ul.main-menu > li.active > a i.fa,
.sidebar-nav > ul.main-menu > li > a.open i.fa {
    color: var(--st-orange);
}
.sidebar-nav .chevron {
    margin-left: auto;
}
.sidebar-nav > ul.main-menu > li > ul {
    background: rgba(0, 0, 0, 0.18);
    padding: 4px 0;
}
.sidebar-nav > ul.main-menu > li > ul > li > a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.62);
    padding: 8px 18px 8px 46px;
    font-size: 13px;
}
.sidebar-nav > ul.main-menu > li > ul > li > a i.fa {
    width: 16px;
    margin-right: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}
.sidebar-nav > ul.main-menu > li > ul > li > a:hover,
.sidebar-nav > ul.main-menu > li > ul > li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.sidebar-nav > ul.main-menu > li > ul > li.active > a {
    color: var(--st-orange);
}

/* Minified (icon-only) desktop sidebar */
#sidebar-left.minified .sidebar-nav > ul > li > a .text {
    display: none;
}
#sidebar-left.minified .sidebar-nav > ul > li > a {
    justify-content: center;
    padding: 12px 0;
}
#sidebar-left.minified .sidebar-nav > ul > li > a i.fa {
    margin-right: 0;
}

a#main-menu-act {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
a#main-menu-act:hover {
    color: #fff;
}

/* =========================================================
   Content area
   ========================================================= */
#content {
    background: transparent;
    padding: 18px 20px 30px;
    width: 100%;
}
#content .breadcrumb {
    background: transparent;
    padding: 0 0 14px 0;
    margin: 0 0 14px 0;
    border-bottom: 1px solid var(--st-border);
    font-size: 13px;
}
#content .breadcrumb .right_log {
    color: var(--st-text-muted);
    font-size: 12px;
}

/* =========================================================
   Cards / panels — applied broadly via Bootstrap's existing classes
   ========================================================= */
.panel,
.well,
.box,
.table-responsive,
table.dataTable {
    border-radius: var(--st-radius);
}
.panel {
    border: 1px solid var(--st-border);
    box-shadow: var(--st-shadow);
}
.panel-heading {
    background: #fff;
    border-bottom: 1px solid var(--st-border);
    font-weight: 600;
    border-radius: var(--st-radius) var(--st-radius) 0 0 !important;
}

/* Buttons */
.btn-primary,
.btn-success {
    background: var(--st-orange);
    border-color: var(--st-orange-dark);
}
.btn-primary:hover,
.btn-success:hover {
    background: var(--st-orange-dark);
    border-color: var(--st-orange-dark);
}
.btn-default {
    border-color: var(--st-border);
}

/* Tables */
.table > thead > tr > th {
    background: #f9fafb;
    color: var(--st-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    border-bottom: 1px solid var(--st-border);
}
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
    border-color: var(--st-border);
}

/* =========================================================
   RESPONSIVE — mobile-first overrides
   ========================================================= */

/* Tablet and below: sidebar becomes off-canvas drawer */
@media (max-width: 991px) {
    .app-layout {
        position: relative;
    }
    .sidebar-con {
        position: fixed;
        top: var(--st-header-height);
        left: 0;
        bottom: 0;
        z-index: 1040;
        flex-basis: var(--st-sidebar-width) !important;
        width: var(--st-sidebar-width) !important;
        max-width: 85vw !important;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--st-shadow-md);
    }
    .sidebar-con.open,
    body.sidebar-open .sidebar-con {
        transform: translateX(0);
    }
    #sidebar-left {
        height: 100%;
        overflow-y: auto;
    }
    .content-con {
        width: 100% !important;
        flex-basis: 100% !important;
    }
    a#main-menu-act {
        display: none;
    }
    /* dim background when drawer open */
    body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        top: var(--st-header-height);
        background: rgba(13, 27, 62, 0.45);
        z-index: 1035;
    }
}

@media (max-width: 767px) {
    #header .container {
        padding: 0 10px;
    }
    a.navbar-brand {
        font-size: 16px;
    }
    #content {
        padding: 14px 12px 24px;
    }
    #content .breadcrumb {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        font-size: 12px;
    }
    #content .breadcrumb .right_log {
        width: 100%;
        margin-top: 4px;
    }
    .panel-heading,
    .panel-body {
        padding: 12px 14px;
    }
    .table-responsive {
        border: none;
    }
    .btn {
        padding: 8px 14px;
    }
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        text-align: left;
        margin-bottom: 8px;
    }
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    a.navbar-brand .logo {
        font-size: 14px;
    }
    .header-nav .btn,
    .header-nav .account {
        padding: 6px 8px;
    }
    .account .user {
        display: none;
    }
    #content {
        padding: 12px 8px 20px;
    }
}
