/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-body: #151521;
    --bg-surface: #1e1e2d;
    --text-primary: #ffffff;
    --text-secondary: #a1a5b7;
    --text-muted: #6c757d;

    /* Brand Colors */
    --primary: #3699ff;
    --primary-hover: #0073e9;
    --success: #1bc5bd;
    --info: #8950fc;
    --warning: #ffa800;
    --danger: #f64e60;

    /* Borders & Dividers */
    --border-color: #2b2b40;
    --border-radius: 0.85rem;
    --border-radius-sm: 0.42rem;

    /* Spacing */
    --sidebar-width: 265px;
    --header-height: 70px;

    /* Shadows */
    --shadow-sm: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
    --shadow-card: 0px 0px 20px 0px rgba(76, 87, 125, 0.02);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-body: #f5f8fa;
    --bg-surface: #ffffff;
    --text-primary: #3f4254;
    --text-secondary: #7e8299;
    --text-muted: #b5b5c3;

    --border-color: #ebedf3;

    --shadow-sm: 0 0.1rem 1rem 0.25rem rgba(0, 0, 0, 0.05);
    --shadow-card: 0 0 20px 0 rgba(76, 87, 125, 0.02);
}

/* Reset & Base */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Layout Hierarchy */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border-color);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.brand-text span {
    color: var(--primary);
}

.sidebar-menu {
    padding: 20px 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.menu-label {
    padding: 10px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link i {
    font-size: 1.25rem;
    margin-right: 15px;
    color: #494b74;
    width: 24px;
    text-align: center;
    transition: all 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--text-primary);
    background-color: #1b1b28;
    border-right: 3px solid var(--primary);
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: var(--primary);
}

/* Main Content Area */
.page-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: var(--shadow-sm);
    z-index: 99;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Body */
.content-body {
    padding: 30px;
}

/* Cards */
.card {
    background-color: var(--bg-surface);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 30px;
}

/* Buttons */
.btn {
    padding: 0.65rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-light {
    background-color: #2b2b40;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-light:hover {
    background-color: #323248;
    color: var(--text-primary);
}

/* Tables */
.table {
    color: var(--text-secondary);
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px dashed var(--border-color);
    padding: 1rem 0.75rem;
}

.table td {
    border-bottom: 1px dashed var(--border-color);
    padding: 1rem 0.75rem;
    font-weight: 500;
}

.table-hover tbody tr:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

/* Forms */
.form-control {
    background-color: var(--bg-body) !important;
    border: 1px solid var(--bg-body);
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
}

.form-control:focus {
    background-color: var(--bg-body) !important;
    border-color: var(--primary);
    box-shadow: none;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Validation */
.text-danger {
    color: var(--danger) !important;
}

/* Footer */
.footer {
    padding: 20px 30px;
    background: transparent;
    border-top: none;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #323248;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #454560;
}