@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --bg-color: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition-speed: 0.2s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
}

body.admin-layout {
    display: flex;
}

/* SIDEBAR STYLES */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand img {
    max-width: 70px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar-brand h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-brand small {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 20px 0;
}

.sidebar-nav a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 12px 20px;
    margin: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
}

.sidebar-nav a i {
    font-size: 18px;
    opacity: 0.7;
    transition: all var(--transition-speed) ease;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056AC 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.35);
}

.sidebar-nav a.active i, .sidebar-nav a:hover i {
    color: #ffffff;
    opacity: 1;
}

/* MAIN CONTENT */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
    min-width: 0;
}

.top-navbar {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    z-index: 10;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.2s;
}

.menu-toggle:hover {
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.user-info i {
    font-size: 20px;
    color: var(--primary-color);
}

.content-area {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* CARDS & CONTAINERS */
.card-modern {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
}

/* FORMS & INPUTS */
.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* BUTTONS */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all var(--transition-speed) ease;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* TABLES */
.table-responsive {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #f1f5f9;
}

/* TAGIFY CUSTOM */
.tagify {
    width: 100%;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 3px;
    transition: border-color 0.2s;
}
.tagify:hover, .tagify--focus {
    border-color: var(--primary-color);
}

/* OVERLAY FOR MOBILE */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        width: 100%;
    }
    .menu-toggle {
        display: block;
    }
    .sidebar-overlay.open {
        display: block;
    }
    .content-area {
        padding: 15px;
    }
}

/* FOOTER */
.admin-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 15px 30px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto; /* Pushes the footer to the bottom if content is short */
}