/* ===== ROOT VARIABLES ===== */
:root {
    --sidebar-width: 280px;
    --header-height: 60px;
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --sidebar-bg: #34495e;
    --sidebar-hover: #2c3e50;
    --content-bg: #f8f9fa;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== GLOBAL STYLES ===== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--content-bg);
    overflow-x: hidden;
}

/* ===== TOP HEADER ===== */
.header-top {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}


/* ===== LAYOUT CONTAINER ===== */
.layout-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--primary-dark) 100%);
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 500;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}


.sidebar-nav {
    padding: 0;
    margin: 0;
}

/* ===== NAVIGATION GROUPS ===== */
.nav-group {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-group:last-child {
    border-bottom: none;
}

.nav-group-title {
    color: #bdc3c7;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 25px 10px 25px;
    margin: 0;
    transition: all 0.3s ease;
}


/* ===== NAVIGATION LINKS ===== */
.sidebar .nav {
    padding-bottom: 20px;
}

.sidebar .nav-item {
    margin: 0;
}

.sidebar .nav-link {
    color: #ecf0f1;
    padding: 12px 25px;
    font-size: 0.95rem;
    font-weight: 400;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: var(--sidebar-hover);
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    color: white;
    background: linear-gradient(90deg, var(--accent-color), rgba(52, 152, 219, 0.8));
    border-left: 4px solid var(--success-color);
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    opacity: 1;
    transform: scale(1.1);
}


/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    background-color: var(--content-bg);
}


.content-wrapper {
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
}

/* ===== CONTENT HEADER ===== */
.content-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.content-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* ===== CARDS AND COMPONENTS ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-bottom: none;
    font-weight: 500;
    border-radius: 12px 12px 0 0 !important;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #2980b9);
    border: none;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #229954);
    border: none;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* ===== FORMS ===== */
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===== BREADCRUMBS ===== */
.breadcrumb {
    background: none;
    padding: 0;
    margin-top: 10px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* ===== TABLES ===== */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    font-weight: 500;
    padding: 15px;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 20px 15px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.content-wrapper > * {
    animation: slideInRight 0.6s ease-out;
}

/* ===== UTILITIES ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
}
