@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #f6f8fb;
    color: #1f2937;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* App Layout */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 280px;
    height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 1040;
    padding: 1.25rem 1rem;
    color: #fff;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
}

.sidebar-brand:hover {
    color: #fff;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.brand-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0.9rem;
    margin-bottom: 1.5rem;
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #dbeafe;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.sidebar-user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin: 1.2rem 0 0.75rem;
    padding: 0 0.6rem;
}

.sidebar-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav li + li {
    margin-top: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    padding: 0.9rem 1rem;
    border-radius: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-link i {
    width: 20px;
    font-size: 1.05rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #14b8a6, #06b6d4);
    color: #fff;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.25);
}

/* Main Content */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    padding: 1.5rem;
}

/* Mobile Topbar */
.mobile-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.mobile-topbar-brand {
    font-weight: 700;
    color: #0f172a;
}

.sidebar-toggle-btn,
.sidebar-close-btn {
    color: #111827;
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
}

.sidebar-toggle-btn i,
.sidebar-close-btn i {
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: #fff;
    padding: 5rem 2rem;
    text-align: center;
    border-radius: 0 0 24px 24px;
}

.features {
    padding: 4rem 2rem;
}

.feature-icon {
    font-size: 2rem;
    color: #1e88e5;
}

/* Messages */
#message-alert {
    position: fixed;
    bottom: 7%;
    right: 1%;
    z-index: 10000;
    animation: cssAnimation 10s forwards;
    -webkit-animation: cssAnimation 10s forwards;
}

@keyframes cssAnimation {
    0% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@-webkit-keyframes cssAnimation {
    0% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
}

/* Mobile */
@media (max-width: 767.98px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        transition: left 0.25s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    }

    .app-sidebar.show {
        left: 0;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
        z-index: 1035;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    .page-content {
        padding: 1rem;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .mobile-topbar {
        display: none;
    }

    .sidebar-close-btn {
        display: none;
    }
}

.auth-card {
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.auth-card .form-control,
.auth-card .form-select {
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
}

.auth-card .btn {
    border-radius: 0.9rem;
}