:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --navy: #1d2953;
    --navy-light: #2a3a6c;
    --navy-mid: #1d2953;
    --navy-accent: #1d2953;
    --primary: #1877f2;
    --primary-dark: #166fe5;
    --bg: #f0f2f5;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

body {
    background: var(--bg);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
}

/* ─── AUTH / LOGIN ─── */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1d2953 0%, #1d2953 50%, #1d2953 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29,41,83,0.15) 0%, transparent 70%);
    top: -200px; right: -200px;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29,41,83,0.2) 0%, transparent 70%);
    bottom: -100px; left: -100px;
}

.auth-container {
    background: rgba(255,255,255,0.97);
    padding: 44px 40px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 400px;
    max-width: 92vw;
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.auth-brand {
    text-align: center;
    margin-bottom: 8px;
}

.auth-logo {
    display: inline-block;
    max-width: 100%;
    width: 340px;
    height: auto;
}

.auth-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1d2953;
    margin: 0 0 4px;
}

.auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: #6b7a8f;
    margin: 0 0 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: #1d2953;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-icon-wrap {
    position: relative;
    width: 100%;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 2;
    font-size: 14px;
}

.input-icon-wrap .form-control {
    padding-left: 42px;
    border: 2px solid #dce3ed;
    border-radius: 10px;
    background: #fafcff;
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
}

.input-icon-wrap .form-control:focus {
    border-color: #1d2953;
    box-shadow: 0 0 0 3px rgba(29,41,83,0.12);
    background: #fff;
}


.auth-btn {
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: #1d2953;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29,41,83,0.35);
}

.auth-btn:active {
    transform: translateY(0);
}

.error {
    color: #d32f2f;
    background: #fce4ec;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.success {
    color: #2e7d32;
    background: #e8f5e9;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #dee2e6;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-profile {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-profile h6 {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-profile small {
    font-size: 12px;
}

.sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    border-radius: 0;
    transition: var(--transition);
    font-size: 14px;
}

.sidebar .nav-link:hover {
    background: #e9ecef;
    color: var(--primary);
    padding-left: 24px;
}

.sidebar .nav-link.active {
    background: #e9ecef !important;
    color: var(--primary) !important;
    font-weight: 600;
    border-right: 3px solid var(--primary);
}

.sidebar .nav-link.active i {
    color: var(--primary) !important;
}

.sidebar .nav-link i {
    width: 22px;
    margin-right: 4px;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 99;
    animation: slideDown 0.3s ease;
}

.content-body {
    padding: 24px;
    flex: 1;
    animation: fadeIn 0.4s ease;
}

.content-body > .row {
    margin-left: 0;
    margin-right: 0;
}

.content-body > .row > [class*="col-"] {
    padding-left: 24px;
    padding-right: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-info h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.stat-info span {
    color: #6c757d;
    font-size: 13px;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

.project-card {
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.table th {
    font-weight: 600;
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 12px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    border-radius: 12px 12px 0 0;
}

.badge {
    border-radius: 6px;
    padding: 6px 10px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-toggle {
    display: none;
}
.sidebar-overlay {
    display: none;
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 200;
        transition: transform 0.3s ease;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: inline-block;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
.autocomplete-wrap {
    position: relative;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1050;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease;
}

.autocomplete-item:hover {
    background: #e9ecef;
}

.autocomplete-item strong {
    color: var(--primary);
}

.autocomplete-item.disabled {
    color: #999;
    cursor: default;
}

.autocomplete-item.disabled:hover {
    background: none;
}

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 150;
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(0,0,0,0.1);
}

.card-title-sm {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    color: #1a1a2e;
}

/* Loading cursor overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    cursor: wait;
    background: transparent;
}
body.is-loading .loading-overlay {
    display: block;
}
body.is-loading,
body.is-loading * {
    cursor: wait !important;
}
