/* Custom Styles for Chapel Workspace */

:root {
    --primary-color: #1E3A5F;
    --secondary-color: #4A6FA5;
    --success-color: #4A7C59;
    --danger-color: #B85450;
    --warning-color: #D4AF37;
    --info-color: #6B9AC4;
    --light-blue: #E8F1F8;
    --soft-white: #FEFEFE;
    --gold-accent: #D4AF37;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: #f5f7fa;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #1E3A5F 0%, #2B4A7C 100%);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header a {
    color: white;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.logo-icon span {
    font-weight: bold;
    color: #D4AF37;
    font-size: 18px;
}

.sidebar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 24px;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #D4AF37;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.user-avatar i {
    font-size: 1.5rem;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.user-actions a,
.user-actions .btn-logout {
    color: rgba(255, 255, 255, 0.8);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-actions a:hover,
.user-actions .btn-logout:hover {
    color: white;
}

/* Top Header (Mobile) */
.top-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #1E3A5F 0%, #2B4A7C 100%);
    color: white;
    z-index: 999;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-brand {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.mobile-brand span {
    font-weight: 600;
}

.btn-mobile-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 60px;
    right: -300px;
    width: 250px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    z-index: 998;
    transition: right 0.3s ease;
    padding: 1rem;
}

.mobile-menu.show {
    right: 0;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mobile-user-info i {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.mobile-user-name {
    font-weight: 600;
}

.mobile-user-role {
    font-size: 0.85rem;
    color: #6c757d;
}

.mobile-menu a,
.mobile-menu button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu button:hover {
    background: #f8f9fa;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-label {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-radius: 10px 10px 0 0 !important;
}

.card-body {
    padding: 1.25rem;
}

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(30, 58, 95, 0.05);
}

/* Button Styling */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #152945;
    border-color: #152945;
    transform: translateY(-1px);
}

/* Badge Styling */
.badge {
    font-weight: 500;
    padding: 0.5em 0.85em;
    border-radius: 6px;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
    border: none;
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #C5D7E8;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1E3A5F;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .top-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .stat-card {
        padding: 0.875rem;
    }

    .stat-icon {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .sidebar, .top-header, .btn, .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding-top: 0;
    }
}
