@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #1565C0;
    /* Zen Blue */
    --primary-hover: #0D47A1;
    --accent-color: #F7BA11;
    /* Zen Gold */
    --text-main: #2F2F2F;
    /* Charcoal */
    --text-muted: #64748b;
    --bg-body: #F4F6F8;
    /* Soft Gray */
    --success-color: #43A047;
    --alert-color: #E53935;

    /* Layout & Effects */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    --card-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- Typography & Utilities --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--alert-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    border-radius: 8px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Layout Overrides --- */
.dashboard-body {
    background-color: var(--bg-body);
    min-height: 100vh;
    /* display: flex; Removed to simplify fixed sidebar layout */
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.sidebar-menu {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.menu-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin: 1.5rem 0 0.75rem 0.75rem;
}

.menu-category:first-child {
    margin-top: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    margin-bottom: 0.35rem;
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: #f8fafc;
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1976D2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.25);
}

.nav-link.active:hover {
    transform: none;
}

.nav-link i {
    margin-bottom: 1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.search-bar {
    width: 400px;
    position: relative;
}

.search-bar input {
    padding-left: 2.5rem;
    border-radius: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile:hover {
    background-color: #f8fafc;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Cards */
.stat-card,
.content-card {
    background: white;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Table Styles */
.table-custom thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table-custom tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Modals & Dropdowns */
.modal-content {
    border-radius: 16px;
}

.notification-dropdown {
    width: 320px;
    padding: 0;
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
}

.notification-dropdown .dropdown-item {
    white-space: normal;
    border-bottom: 1px solid #f1f5f9;
}

.notification-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 0 1rem;
    }
}

/* --- Login Page Visuals --- */
.visual-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1976D2 100%);
    position: relative;
    overflow: hidden;
}

.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float-up infinite linear;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 8s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    left: 20%;
    animation-duration: 5s;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    width: 120px;
    height: 120px;
    left: 35%;
    animation-duration: 10s;
    animation-delay: 2s;
}

.bubble:nth-child(4) {
    width: 60px;
    height: 60px;
    left: 50%;
    animation-duration: 7s;
    animation-delay: 0.5s;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 65%;
    animation-duration: 9s;
    animation-delay: 3s;
}

.bubble:nth-child(6) {
    width: 45px;
    height: 45px;
    left: 80%;
    animation-duration: 6s;
    animation-delay: 1.5s;
}

.bubble:nth-child(7) {
    width: 100px;
    height: 100px;
    left: 90%;
    animation-duration: 11s;
    animation-delay: 2.5s;
}

.bubble:nth-child(8) {
    width: 30px;
    height: 30px;
    left: 25%;
    animation-duration: 12s;
    animation-delay: 4s;
}

.bubble:nth-child(9) {
    width: 70px;
    height: 70px;
    left: 55%;
    animation-duration: 8.5s;
    animation-delay: 0.2s;
}

.bubble:nth-child(10) {
    width: 110px;
    height: 110px;
    left: 75%;
    animation-duration: 9.5s;
    animation-delay: 1.8s;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-1000px) scale(0.5);
        opacity: 0;
    }
}

.login-brand-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.login-brand-overlay i {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-brand-overlay h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -30px;
    left: -30px;
}