@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f0f3;
    color: #333;
    margin-bottom: 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(52, 10, 48, 0.1);
}

html {
    position: relative;
    min-height: 100%;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #340A30 0%, #2a0827 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-brand {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-brand-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
}

.sidebar-nav {
    list-style: none;
    padding: 15px 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav li a.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: #f9a825;
}

.sidebar-nav li a svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.sidebar-section-title {
    padding: 10px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.user-info {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f9a825;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-role {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-footer-link {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.sidebar-footer-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.sidebar-help-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 12px;
    margin: 15px 0 15px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.sidebar-help-link:hover {
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* Header */
.header {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #340A30;
    margin: 0;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-body {
    padding: 25px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #340A30;
    color: white;
}

.btn-primary:hover {
    background: #2a0827;
}

.btn-secondary {
    background: #f5f7fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #eee;
}

/* Form Elements */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.form-label .required {
    color: #d32f2f;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #340A30;
    box-shadow: 0 0 0 3px rgba(52,10,48,0.1);
}

.form-control::placeholder {
    color: #aaa;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-card-icon.blue { background: #e3f2fd; color: #1976d2; }
.stat-card-icon.green { background: #e8f5e9; color: #388e3c; }
.stat-card-icon.orange { background: #fff3e0; color: #f57c00; }
.stat-card-icon.purple { background: #f3e5f5; color: #7b1fa2; }

.stat-card-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-card-change {
    font-size: 12px;
    color: #2e7d32;
    margin-top: 5px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
}

.content-grid.full {
    grid-template-columns: 1fr;
}

/* Responsive */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 20px;
        color: #340A30;
        cursor: pointer;
        padding: 5px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Confirmation Overlay */
.confirm-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.95);
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    color: white;
    font-weight: 500;
}

.confirm-overlay.show {
    display: flex;
}

/* Table Action Buttons */
.table .btn-light {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #ddd;
    background: #f5f7fa;
    color: #333;
    border-radius: 6px;
    transition: all 0.2s;
}

.table .btn-light:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.table .btn-primary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}
