:root {
    --sidebar-width: 260px;
}

body {
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, handle inside content */
}

/* Dark Mode */
.dark,
.dark body {
    background-color: #1a1e1e;
    color: #e0e0e0;
}

.dark .title,
.dark .subtitle,
.dark strong,
.dark label,
.dark .card-header-title,
.dark .table th {
    color: #ffffff;
}

.dark .card,
.dark .table,
.dark .box {
    background-color: #242929;
    color: #e0e0e0;
    border-color: #333;
}

.dark .table.is-striped tbody tr:not(.is-selected):nth-child(even) {
    background-color: #2d3333;
}

.dark .input,
.dark .select select,
.dark .textarea {
    background-color: #2d3333;
    border-color: #444;
    color: #e0e0e0;
}

.dark .input::placeholder {
    color: #777;
}

.dark .hero.is-light {
    background-color: transparent;
}

.dark .notification.is-light {
    background-color: #3a1a1a;
    color: #ffcccc;
}

.dark .icon {
    color: #888;
}

.dark .button.is-primary {
    background-color: #3273dc;
    border-color: transparent;
    color: #fff;
}

.dark .button.is-primary:hover {
    background-color: #276cda;
}

.dark .navbar {
    background-color: #2b3031;
    border-bottom: 1px solid #363b3c;
}

.dark .menu-label {
    color: #888;
}

.dark .menu-list a {
    color: #dbdbdb;
}

.dark .menu-list a:hover {
    background-color: #363b3c;
}

.dark .menu-list a.is-active {
    background-color: #3273dc;
    color: #fff;
}

.dark .has-text-grey,
.dark .has-text-grey-dark,
.dark .has-text-grey-darker {
    color: #dbdbdb !important;
}

.dark .title.has-text-grey-darker,
.dark .title.has-text-grey-dark {
    color: #fff !important;
}

/* App Shell Layout */
#app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#app-shell.is-standalone #main-scroll-area {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#app-shell.is-standalone #app-content {
    background-color: inherit;
}

#app-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    height: 100%;
    background: white;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.dark #app-sidebar {
    background-color: #2b3031;
    border-right-color: #363b3c;
}

#app-content {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#main-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

#mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 1023px) {
    #main-scroll-area {
        padding: 0;
    }

    #main-scroll-area>.container.is-fluid {
        margin: 0;
        padding: 0.5rem;
    }

    #app-sidebar {
        position: fixed;
        width: 75vw;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    #app-sidebar.active {
        transform: translateX(0);
    }

    #mobile-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* Components */
.h-full {
    height: 100%;
}

.w-full {
    width: 100%;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.sidebar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.sidebar-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f7ff;
    /* Very light blue pastel */
    z-index: -1;
}

.dark .sidebar-bg-layer {
    background-color: #1a1e1e;
}

.sidebar-logo-container {
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: center;
}

.sidebar-overlay {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .sidebar-overlay {
    background-color: rgba(30, 30, 30, 0.6);
    border-top-color: rgba(255, 255, 255, 0.1);
}

.sidebar-version {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    color: #4a4a4a;
}

.dark .sidebar-version {
    color: #a0a0a0;
    border-top-color: rgba(255, 255, 255, 0.1);
}

#theme-toggle-action {
    cursor: pointer;
    color: inherit;
}

.navbar-custom {
    padding: 0.5rem 1rem;
}

.navbar-burger-custom {
    display: block;
    margin-left: 0;
}

.dark .navbar-burger span {
    background-color: #dbdbdb;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.profile-container {
    max-width: 960px;
}

/* Branded Login Page */
#login-hero {
    position: relative;
    background-color: #f0f7ff;
    /* Very light blue pastel */
}

.dark #login-hero {
    background-color: #1a1e1e;
}

#login-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
}

.dark #login-hero::before {
    background: rgba(26, 30, 30, 0.2);
    /* Dark overlay */
}

.login-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
    text-align: center;
}

.login-box {
    position: relative;
    z-index: 1;
}

/* Doctor Cards */
.doctor-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dark .doctor-card {
    background-color: #242929;
    border: 1px solid #333;
}