/* Admin Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #F5F5F5;
    color: #31566D;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #E0E0E0;
}

.sidebar-brand {
    text-align: center;
}

.brand-name {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #c91d2b;
    margin-bottom: 4px;
}

.brand-subtitle {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #78909C;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-list {
    list-style: none;
    padding: 0 12px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #4C7189;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

.nav-link:hover {
    background: #F5F5F5;
    color: #c91d2b;
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, #c91d2b 0%, #a01621 100%);
    color: white;
}

.nav-link svg {
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c91d2b 0%, #a01621 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #31566D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: #78909C;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #FFEBEE;
    color: #C62828;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: #FFCDD2;
    transform: scale(1.05);
}

/* Main Content */
.admin-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    background: white;
    padding: 20px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-mobile-menu {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #EBF0F3;
    border: 1px solid #D1DDE3;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #c91d2b;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-mobile-menu:hover {
    background: #D1DDE3;
    transform: scale(1.05);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #31566D;
    margin: 0;
}

.content-body {
    flex: 1;
    padding: 32px;
}

/* Common Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #c91d2b 0%, #a01621 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a01621 0%, #8a1219 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 29, 43, 0.3);
}

.btn-secondary {
    background: #E0E0E0;
    color: #31566D;
}

.btn-secondary:hover {
    background: #BDBDBD;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-success:hover {
    background: #45A049;
}

.btn-danger {
    background: #F44336;
    color: white;
}

.btn-danger:hover {
    background: #E53935;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E0E0E0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #31566D;
    margin: 0;
}

.card-body {
    color: #4C7189;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #F5F5F5;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #31566D;
    border-bottom: 2px solid #E0E0E0;
}

.table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #4C7189;
    border-bottom: 1px solid #E0E0E0;
}

.table tbody tr:hover {
    background: #FAFAFA;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #31566D;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #31566D;
    background: #FFFFFF;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #c91d2b;
    box-shadow: 0 0 0 4px rgba(201, 29, 43, 0.1);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.badge-primary {
    background: #E3F2FD;
    color: #1976D2;
}

.badge-success {
    background: #E8F5E9;
    color: #388E3C;
}

.badge-warning {
    background: #FFF3E0;
    color: #F57C00;
}

.badge-danger {
    background: #FFEBEE;
    color: #C62828;
}

.badge-info {
    background: #E0F7FA;
    color: #0097A7;
}

/* Utility Classes */
.text-muted {
    color: #78909C !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.btn-sidebar-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #FFEBEE;
    color: #C62828;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.2s ease;
}

.btn-sidebar-close:hover {
    background: #FFCDD2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    }

    .admin-content {
        margin-left: 0;
    }

    .btn-mobile-menu {
        display: flex;
    }

    .btn-sidebar-close {
        display: flex;
    }

    .content-body {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .content-header {
        padding: 12px 16px;
        gap: 12px;
    }

    .page-title {
        font-size: 18px;
    }

    .content-body {
        padding: 16px;
    }

    .card {
        padding: 16px;
        border-radius: 10px;
    }

    .sidebar-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .btn-logout {
        width: 100%;
        height: 40px;
        margin-top: 8px;
    }

    /* Common Modal Responsive Styles */
    .modal-content,
    .modal-large .modal-content,
    .modal-xlarge .modal-content {
        width: 95% !important;
        margin: 10px auto;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 18px;
    }

    .table th,
    .table td {
        padding: 8px 12px;
        font-size: 13px;
    }
}