/* =========================================================
   GLOBAL THEME VARIABLES
   DEFAULT LIGHT THEME
========================================================= */

/* =========================================================
   GOKRIPADHAM ADMIN THEME
========================================================= */

:root {

    /* =====================================================
       PRIMARY THEME COLORS
    ===================================================== */

    --primary: #e17224;
    --primary-dark: #a56211;
    --primary-light: #fff2de;

    --secondary: #3f321f;
    --accent: #c58a18;


    /* =====================================================
       BACKGROUND / SURFACE
    ===================================================== */

    --background: #f8f3e9;
    --surface: #fffdf7;

    --cream: #fffaf1;


    /* =====================================================
       TEXT
    ===================================================== */

    --text: #2f291f;
    --text-muted: #7d7467;


    /* =====================================================
       BORDERS
    ===================================================== */

    --border: #e7ddcc;


    /* =====================================================
       BUTTONS
    ===================================================== */

    --button: #e17224;
    --button-text: #ffffff;


    /* =====================================================
       STATUS COLORS
    ===================================================== */

    --success: #3f8f5b;
    --danger: #d9534f;
    --warning: #d99a21;
    --info: #5b83a6;


    /* =====================================================
       LINKS
    ===================================================== */

    --link: #e17224;
    --link-hover: #a56211;


    /* =====================================================
       SIDEBAR
    ===================================================== */

    --sidebar-background: #3f321f;

    --sidebar-text: #f5eee2;
    --sidebar-muted: #c9bda9;

    --sidebar-hover: rgba(255, 255, 255, 0.08);

    --sidebar-active: #e17224;


    /* =====================================================
       LAYOUT
    ===================================================== */

    --sidebar-width: 240px;
    --sidebar-collapsed-width: 68px;

    --navbar-height: 68px;


    /* =====================================================
       TYPOGRAPHY
    ===================================================== */

    --font-heading:
        "Space Grotesk",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    --font-family:
        "Satoshi",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;


    /* =====================================================
       SHADOW
    ===================================================== */

    --shadow:
        0 4px 18px rgba(74, 55, 30, 0.07);

}


/* =========================================================
   DARK MODE THEME
========================================================= */

body.dark-mode {

    /* =====================================================
       PRIMARY THEME COLORS
    ===================================================== */

    --primary: #f08a3c;
    --primary-dark: #d46d20;
    --primary-light: #4a3020;

    --secondary: #211c16;
    --accent: #d8a33a;


    /* =====================================================
       BACKGROUND / SURFACE
    ===================================================== */

    --background: #17130f;
    --surface: #241e17;

    --cream: #211b15;


    /* =====================================================
       TEXT
    ===================================================== */

    --text: #f4ede2;
    --text-muted: #b9ad9d;


    /* =====================================================
       BORDERS
    ===================================================== */

    --border: #40362a;


    /* =====================================================
       BUTTONS
    ===================================================== */

    --button: #e17224;
    --button-text: #ffffff;


    /* =====================================================
       STATUS COLORS
    ===================================================== */

    --success: #63a875;
    --danger: #ef6b65;
    --warning: #e0ae4a;
    --info: #79a2c4;


    /* =====================================================
       LINKS
    ===================================================== */

    --link: #f08a3c;
    --link-hover: #ffab66;


    /* =====================================================
       SIDEBAR
    ===================================================== */

    --sidebar-background: #191510;

    --sidebar-text: #eee4d5;
    --sidebar-muted: #a99d8c;

    --sidebar-hover: rgba(255, 255, 255, 0.07);

    --sidebar-active: #e17224;


    /* =====================================================
       SHADOW
    ===================================================== */

    --shadow:
        0 6px 24px rgba(0, 0, 0, 0.30);

}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family: var(--font-family);

    background: var(--background);

    color: var(--text);

    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

/* =====================================================
   PREVENT HORIZONTAL PAGE OVERFLOW
===================================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}


/* =========================================================
   MAIN ADMIN LAYOUT
========================================================= */

.admin-layout {

    min-height: 100vh;

    width: 100%;
}


/* =========================================================
   NAVBAR
   FULL WIDTH
========================================================= */

.admin-navbar {

    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    width: 100%;

    height: var(--navbar-height);
    

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 25px;

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    box-shadow: var(--shadow);

    z-index: 2000;
}


/* =========================================================
   NAVBAR BRAND
========================================================= */

.navbar-brand {

    display: flex;

    align-items: center;

    gap: 10px;

    width: auto;
    max-width: 220px;
    min-width: 0;

    text-decoration: none;

    color: var(--text);
}

.brand-logo-image {
    display: block;
    width: auto;
    height: 42px;
    max-width: 150px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
}

.brand-logo {

    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: var(--primary);

    color: #ffffff;

    font-size: 13px;

    font-weight: 700;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}


/* =========================================================
   NAVBAR LEFT
========================================================= */

.navbar-left {

    display: flex;

    align-items: center;

    gap: 15px;
}

.sidebar-toggle {

    display: none;

    border: none;

    background: transparent;

    color: var(--text);

    font-size: 18px;

    cursor: pointer;
}

.navbar-page-title {

    font-size: 18px;

    font-weight: 700;
}


/* =========================================================
   NAVBAR RIGHT
========================================================= */

.navbar-right {

    display: flex;

    align-items: center;

    gap: 10px;
}


/* =========================================================
   SEARCH
========================================================= */

.navbar-search {

    width: 220px;

    height: 38px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 0 12px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--background);
}

.navbar-search i {

    color: var(--text-muted);

    font-size: 12px;
}

.navbar-search input {

    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 12px;
}


/* =========================================================
   NAVBAR ICON BUTTONS
========================================================= */

.navbar-icon-btn {

    position: relative;

    width: 36px;
    height: 36px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--surface);

    color: var(--text-muted);

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: 0.2s ease;
}

.navbar-icon-btn:hover {

    color: var(--primary);

    border-color: var(--primary);
}

.notification-dot {

    position: absolute;

    top: 6px;
    right: 6px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--accent);
}


/* =========================================================
   ADMIN PROFILE
========================================================= */

.admin-profile-wrapper {

    position: relative;
}


/* Clickable profile */

.admin-profile {

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 4px 8px;

    border: none;

    background: transparent;

    cursor: pointer;

    border-radius: 8px;

    color: var(--text);

    transition: background 0.2s ease;
}

.admin-profile:hover {

    background: var(--background);
}


.admin-avatar {

    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary);

    color: #ffffff;

    font-size: 12px;

    font-weight: 700;
}


.admin-profile-info {

    display: flex;

    flex-direction: column;

    gap: 2px;

    text-align: left;
}

.admin-profile-name {

    font-size: 12px;

    font-weight: 700;
}

.admin-profile-role {

    font-size: 9px;

    color: var(--text-muted);
}


.profile-arrow {

    font-size: 10px;

    color: var(--text-muted);

    transition: transform 0.2s ease;
}

.admin-profile.active .profile-arrow {

    transform: rotate(180deg);
}


/* =========================================================
   ADMIN DROPDOWN
========================================================= */

.admin-dropdown {

    position: absolute;

    top: calc(100% + 10px);

    right: 0;

    width: 210px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 10px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.12);

    padding: 8px;

    display: none;

    z-index: 3000;
}

.admin-dropdown.show {

    display: block;
}


/* Dropdown header */

.dropdown-header {

    padding: 10px 11px;

    border-bottom: 1px solid var(--border);

    margin-bottom: 5px;
}

.dropdown-header strong {

    display: block;

    font-size: 13px;
}

.dropdown-header span {

    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;
}


/* Dropdown items */

.dropdown-item {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 11px;

    border: none;

    border-radius: 7px;

    background: transparent;

    color: var(--text);

    text-decoration: none;

    font-size: 12px;

    cursor: pointer;

    text-align: left;

    transition: 0.2s ease;
}

.dropdown-item:hover {

    background: var(--background);

    color: var(--primary);
}

.dropdown-item i {

    width: 16px;

    text-align: center;

    color: var(--text-muted);
}

.dropdown-item:hover i {

    color: var(--primary);
}


/* Logout */

.dropdown-item.logout {

    color: var(--danger);

    margin-top: 4px;
}

.dropdown-item.logout:hover {

    background: rgba(239, 68, 68, 0.12);

    color: var(--danger);
}

.dropdown-item.logout i {

    color: var(--danger);
}


/* =========================================================
   SIDEBAR
   STARTS BELOW NAVBAR
========================================================= */

.admin-sidebar {

    position: fixed;

    top: var(--navbar-height);

    left: 0;

    width: var(--sidebar-width);

    height: calc(100vh - var(--navbar-height));

    background: var(--sidebar-background);
    color: var(--sidebar-text);

    padding: 16px 12px;

    overflow-y: auto;

    z-index: 1500;
}


/* =========================================================
   SIDEBAR SECTIONS

   IMPORTANT:
   Your PHP uses .sidebar-title
========================================================= */

.sidebar-section {

    margin-bottom: 6px;
}

.sidebar-title {

    padding: 0 10px;

    margin-bottom: 5px;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 0.08em;

    color: var(--sidebar-muted);
}


/* =========================================================
   SIDEBAR LINKS
========================================================= */

.sidebar-link {

    position: relative;

    display: flex;
    align-items: center;

    gap: 10px;

    width: 100%;

    min-height: 38px;

    padding: 8px 10px;

    margin-bottom: 3px;

    border-radius: 7px;

    color: var(--sidebar-text);

    text-decoration: none;

    font-size: 13px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* IMPORTANT:
   Your PHP uses .sidebar-icon
*/

.sidebar-icon {

    width: 18px;

    min-width: 18px;

    text-align: center;

    font-size: 13px;
}


.sidebar-link:hover {

    background: var(--sidebar-hover);
    color: #ffffff;
}


.sidebar-link.active {

    background: var(--primary);

    color: #ffffff;
}


/* =========================================================
   SIDEBAR BADGE
========================================================= */

.sidebar-badge {

    margin-left: auto;

    min-width: 20px;

    height: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #ef4444;

    color: #ffffff;

    font-size: 10px;

    font-weight: 700;
}


/* =========================================================
   SIDEBAR COLLAPSE BUTTON
========================================================= */

/* =========================================================
   SIDEBAR COLLAPSE BUTTON
========================================================= */

.sidebar-collapse-btn {

    width: 100%;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    padding: 0 8px;

    margin-bottom: 4px;

    border: none;
    outline: none;

    background: transparent;
    color: var(--text-muted);

    cursor: pointer;

    overflow: hidden;

    transition: color 0.2s ease;
}

.sidebar-collapse-btn:hover {

    color: #ffffff;
}

.sidebar-collapse-btn i {

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    font-size: 13px;

    transition:
        background 0.2s ease,
        transform 0.25s ease;
}

.sidebar-collapse-btn:hover i {

    background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   COLLAPSED SIDEBAR
========================================================= */

.admin-sidebar.collapsed {

    width: var(--sidebar-collapsed-width);
}

.admin-sidebar.collapsed .sidebar-title,
.admin-sidebar.collapsed .sidebar-link > span:not(.sidebar-icon),
.admin-sidebar.collapsed .sidebar-badge {

    display: none;
}

.admin-sidebar.collapsed .sidebar-link {

    justify-content: center;

    padding: 10px;

    gap: 0;
}

.admin-sidebar.collapsed .sidebar-icon {

    margin: 0;
}

.admin-sidebar.collapsed .sidebar-section {

    margin-bottom: 12px;
}

.admin-sidebar.collapsed
.sidebar-collapse-btn i {

    transform: rotate(180deg);
}

body.sidebar-collapsed .admin-content {

    margin-left: var(--sidebar-collapsed-width);

    width: calc(
        100% - var(--sidebar-collapsed-width)
    );
}

.admin-navbar {

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Hide visible scrollbar while keeping scrolling available */

.admin-sidebar {
    scrollbar-width: none;
    transition:
        width 0.25s ease,
        background-color 0.25s ease;
}

.admin-sidebar::-webkit-scrollbar {
    display: none;
}

.admin-dropdown {

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease;
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.admin-content {

    margin-left: var(--sidebar-width);

    margin-top: var(--navbar-height);

    min-height: 100vh;
    transition:
        margin-left 0.25s ease,
        width 0.25s ease;

    width: calc(100% - var(--sidebar-width));
}


.admin-content-inner {

    padding: 28px;
}


/* =========================================================
   BREADCRUMB
========================================================= */

.admin-breadcrumb {

    margin-left: -28px;

    margin-bottom: 28px;

    width: calc(100% + 56px);

    min-height: 48px;

    display: flex;

    align-items: center;

    padding: 0 20px;

    background: var(--surface);

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 13px;

}


/* =========================================================
   BREADCRUMB ITEMS
========================================================= */

.breadcrumb-item {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: var(--text-muted);

    text-decoration: none;

    transition: color 0.2s ease;

}


/* =========================================================
   ONLY CLICKABLE BREADCRUMBS HOVER
========================================================= */

.breadcrumb-item:not(.breadcrumb-current):hover {

    color: var(--primary);

}


/* =========================================================
   HOME
========================================================= */

.breadcrumb-home i {

    font-size: 13px;

}


/* =========================================================
   SEPARATOR
========================================================= */

.breadcrumb-separator {

    margin: 0 10px;

    color: var(--text-muted);

    user-select: none;

}


/* =========================================================
   CURRENT PAGE
========================================================= */

.breadcrumb-current {

    color: var(--text-muted);

    cursor: default;

}


/*
   Make absolutely sure the current page
   never changes color on hover.
*/

.breadcrumb-current:hover {

    color: var(--text-muted);

}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .admin-breadcrumb {

    background: var(--surface);

    border-top-color: var(--border);

    border-bottom-color: var(--border);

    color: var(--text-muted);

}


body.dark-mode .breadcrumb-item {

    color: var(--text-muted);

}


/* Clickable items only */

body.dark-mode .breadcrumb-item:not(.breadcrumb-current):hover {

    color: var(--primary);

}


/* Current page */

body.dark-mode .breadcrumb-current,
body.dark-mode .breadcrumb-current:hover {

    color: var(--text-muted);

}


/* Separator */

body.dark-mode .breadcrumb-separator {

    color: var(--text-muted);

}


/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {

    margin-bottom: 14px;
}

.page-header h1 {

    font-size: 24px;

    margin-bottom: 5px;
}

.page-header p {

    color: var(--text-muted);

    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .navbar-search {

        width: 160px;
    }
}


@media (max-width: 768px) {

    .admin-sidebar {

        transform: translateX(-100%);

        transition: transform 0.25s ease;
    }

    .admin-sidebar.open {

        transform: translateX(0);
    }

    .admin-content {

        margin-left: 0;

        width: 100%;
    }

    .sidebar-toggle {

        display: block;
    }

    .admin-profile-info {

        display: none;
    }

    .navbar-search {

        display: none;
    }
}

@media (max-height: 750px) {

    .admin-sidebar {
        padding: 10px 10px;
    }

    .sidebar-section {
        margin-bottom: 5px;
    }

    .sidebar-link {
        min-height: 34px;
        padding: 6px 9px;
        font-size: 11px;
    }

    .sidebar-title {
        margin-bottom: 3px;
        font-size: 8px;
    }

    .sidebar-link i {
        font-size: 11px;
    }
}

@media (max-height: 650px) {

    .sidebar-link {
        min-height: 31px;
        padding: 5px 8px;
        font-size: 10px;
    }

    .sidebar-section {
        margin-bottom: 3px;
    }

    .sidebar-title {
        font-size: 7px;
    }
}