/* Sapphire Smart Capital - Professional Theme */
:root {
    --navy-primary: #1a2332;
    --navy-secondary: #2c3e50;
    --gold-primary: #d4af37;
    --gold-secondary: #f4e4c1;
    --gold-light: #faf6ed;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --border-radius: 10px;
    --box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--navy-primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold-primary);
}

/* Layout */
.wrapper {
    display: flex;
    flex: 1;
    width: 100%;
}

.content {
    flex: 1;
    padding: 2rem;
    background: #f4f6f9;
    width: 100%;
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-secondary) 100%) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    z-index: 1001;
}

.navbar-brand {
    font-weight: 700;
    color: var(--gold-primary) !important;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--gold-primary) !important;
}

/* Sidebar */
.sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--navy-primary);
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
}

.sidebar a {
    padding: 12px 25px;
    text-decoration: none;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.sidebar a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--gold-primary);
}

.sidebar a.active {
    color: #fff;
    background: rgba(212, 175, 55, 0.15);
    border-left-color: var(--gold-primary);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    background: var(--white);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--navy-primary);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card .card-body {
    position: relative;
    z-index: 2;
    padding: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    pointer-events: none;
}

.stat-card-navy {
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-secondary));
}

.stat-card-gold {
    background: linear-gradient(135deg, var(--gold-primary), #e5c158);
    color: var(--navy-primary);
}

.stat-card-success {
    background: linear-gradient(135deg, var(--success), #34ce57);
}

.stat-card-info {
    background: linear-gradient(135deg, var(--info), #20c997);
}

.stat-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 3rem;
    opacity: 0.2;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-secondary));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--navy-secondary), var(--navy-primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(26, 35, 50, 0.3);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-primary), #e5c158);
    color: var(--navy-primary);
    font-weight: 600;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #e5c158, var(--gold-primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gold-light);
    color: var(--navy-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--gold-secondary);
    padding: 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.table-hover tbody tr:hover {
    background-color: #fcfcfc;
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--navy-secondary);
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.8rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Profile Picture */
.profile-picture {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 4px solid var(--gold-primary) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-picture-sm {
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--gold-primary) !important;
}

.profile-picture-md {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid var(--gold-primary) !important;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-secondary));
    color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner h2 {
    color: var(--gold-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Mobile Toggle Button */
.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--gold-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        transition: all 0.3s ease;
    }

    .sidebar.mobile-active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .sidebar-toggle-btn {
        display: block;
    }

    .content {
        padding: 1rem;
    }

    /* Mobile Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .welcome-banner {
        padding: 1.5rem;
    }

    .welcome-banner h2 {
        font-size: 1.5rem;
    }

    /* Mobile Tables */
    .table-responsive {
        border-radius: var(--border-radius);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th,
    .table td {
        white-space: nowrap;
        padding: 0.75rem;
    }

    /* Mobile Cards */
    .card-body {
        padding: 1rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Utilities */
.text-gold {
    color: var(--gold-primary) !important;
}

.bg-navy {
    background-color: var(--navy-primary) !important;
}

.bg-gold {
    background-color: var(--gold-primary) !important;
}

/* Loading Spinner */
#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9998;
    border-left: 4px solid;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-success {
    border-color: var(--success);
}

.toast-success i {
    color: var(--success);
}

.toast-error {
    border-color: var(--danger);
}

.toast-error i {
    color: var(--danger);
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}