/* Modern Theme - Style System */
:root {
    /* Color Palette */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --surface: #FFFFFF;
    --background: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --success: #10B981;
    --danger: #F43F5E;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Global Radius */
    --radius: 0.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 16px;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-links {
    list-style: none;
    padding: var(--spacing-md);
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    margin-bottom: var(--spacing-xs);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    color: #193b75;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: #EFF6FF !important;
    /* Primary light */
    color: #3cad2a !important;
}

.nav-link i {
    width: 20px;
    margin-right: var(--spacing-sm);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    /* Width of sidebar */
    display: flex;
    flex-direction: column;
}

.top-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.content-wrapper {
    padding: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    /* Reset AdminLTE Margin conflict */
    margin-left: auto !important;
}

/* Override AdminLTE conflicts */
@media (min-width: 768px) {

    body:not(.sidebar-mini-md) .content-wrapper,
    body:not(.sidebar-mini-md) .main-footer,
    body:not(.sidebar-mini-md) .main-header {
        margin-left: auto !important;
    }
}

/* Components */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.card-header {
    /*display: flex !important;*/
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: var(--spacing-lg);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--background) !important;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.875rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background-color: var(--background);
    padding: var(--spacing-md);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: #F1F5F9 !important;
}

/* Status Badges */
.badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background-color: #FFE4E6;
    color: #9F1239;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 50;
    }

    .main-content {
        margin-left: 0;
    }

    .top-header {
        padding: var(--spacing-md);
    }

    .content-wrapper {
        padding: var(--spacing-md);
    }
}