/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Default (Cool) - Blue/Purple */
    --primary-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --secondary-gradient: linear-gradient(135deg, #00cec9 0%, #81ecec 100%);
    --primary-solid: #6c5ce7;
    --sidebar-bg: #2d3436;
    --sidebar-text: #b2bec3;
    --sidebar-active: #ffffff;
    --body-bg: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #2d3436;
    --text-muted: #636e72;
    --border-color: #dfe6e9;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* THEMES */
[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --primary-solid: #a29bfe;
    --sidebar-bg: #1e272e;
    --sidebar-text: #d2dae2;
    --sidebar-active: #ffffff;
    --body-bg: #2f3640;
    --card-bg: #353b48;
    --text-color: #f5f6fa;
    --text-muted: #dcdde1;
    --border-color: #576574;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="avocado"] {
    --primary-gradient: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    --primary-solid: #00b894;
    --sidebar-bg: #2d3436;
    --body-bg: #f9fff9;
}

[data-theme="peach"] {
    --primary-gradient: linear-gradient(135deg, #e17055 0%, #fab1a0 100%);
    --primary-solid: #e17055;
    --sidebar-bg: #2d3436;
    --body-bg: #fff5f0;
}

[data-theme="cherry"] {
    --primary-gradient: linear-gradient(135deg, #d63031 0%, #ff7675 100%);
    --primary-solid: #d63031;
    --sidebar-bg: #2d3436;
    --body-bg: #fff0f0;
}

/* Universal adjustments */
body {
    background-color: var(--body-bg);
    color: var(--text-color);
}

.card {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color);
}

.table {
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color);
}

/* Make Page Titles follow Theme Color */
.page-title h2 {
    color: var(--primary-solid) !important;
}

.menu-category {
    color: var(--text-muted);
}

.menu-item {
    color: var(--sidebar-text);
}

.menu-item:hover {
    color: var(--sidebar-active);
}

.menu-item.active {
    color: var(--sidebar-active);
    background: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--body-bg);
    color: var(--text-color);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s;
}

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: var(--sidebar-bg);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: 'Inter', sans-serif;
    /* Formal */
    letter-spacing: 0.5px;
}

.sidebar-header .brand {
    color: var(--primary-solid);
    /* Use theme color for brand too */
    /* No more pacifico */
}


.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-top: 20px;
}

.menu-category {
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5c6b7f;
}

.menu-item {
    display: block;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.menu-item:hover,
.menu-item.active {
    color: var(--sidebar-active);
    background-color: #2b3544;
    border-left: 4px solid #ff6b81;
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Upgrade Box */
.upgrade-box {
    background: linear-gradient(135deg, #1e2530 0%, #171d26 100%);
    margin: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.upgrade-box h4 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 14px;
}

.upgrade-box p {
    margin: 0 0 10px;
    font-size: 12px;
}

.btn-upgrade {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    /* Force full width */
    min-width: 0;
    /* Flexbox trick to prevent overflow */
}

/* Header */
.top-header {
    height: 70px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.4);
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    font-size: 20px;
    margin-right: 20px;
    cursor: pointer;
}

.search-bar {
    position: relative;
    opacity: 0.8;
}

.search-bar input {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 15px 8px 35px;
    border-radius: 20px;
    color: #fff;
    outline: none;
}

.search-bar input::placeholder {
    color: #eee;
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* Page Content */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    /* Reduced from 30px for more stretch feel */
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.page-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: var(--card-shadow);
    color: #ff6b81;
    font-size: 20px;
}

/* Card Fix */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    height: 100%;
}

/* Basic Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    width: calc(100% + 30px);
    /* Compensate margins */
}

[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Desktop Columns */
@media (min-width: 992px) {
    .col-lg-12 {
        width: 100%;
    }

    .col-lg-8 {
        width: 66.66667%;
    }

    .col-lg-6 {
        width: 50%;
    }

    .col-lg-4 {
        width: 33.33333%;
    }
}

/* Tablet/Mobile Adjustments */
@media (max-width: 900px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
    }

    .row {
        margin-right: 0;
        margin-left: 0;
        width: 100%;
    }

    [class*="col-"] {
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 20px;
    }

    .col-lg-12,
    .col-lg-8,
    .col-lg-6,
    .col-lg-4 {
        width: 100%;
    }
}

/* Footer Styling */
.footer {
    background: #fff;
    padding: 15px 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
    /* Push to bottom if flex column */
    flex-shrink: 0;
}