@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #0f172a, #1e293b, #334155, #0f172a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 24px;
    width: 380px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transform: translateY(0);
    animation: fadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

p.subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #0ea5e9;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

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

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.links a:hover {
    color: #0ea5e9;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.alert.error {
    background: rgba(255, 75, 75, 0.2);
    border: 1px solid rgba(255, 75, 75, 0.4);
    color: #ffbaba;
    display: block;
}

.alert.success {
    background: rgba(75, 255, 125, 0.2);
    border: 1px solid rgba(75, 255, 125, 0.4);
    color: #baffe0;
    display: block;
}

.dashboard-body {
    display: block; 
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: relative;
    width: 72px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    z-index: 100;
    transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar:hover {
    width: 260px;
}

.sidebar-header {
    padding: 0 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 600;
    font-size: 1.3rem;
    color: white;
    white-space: nowrap;
}

.sidebar:hover .logo-text { opacity: 1; transition-delay: 0.1s; }

.sidebar-menu {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

.sidebar-menu::-webkit-scrollbar { width: 3px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* Top level menu links */
.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.1rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.25s;
    border-left: 3px solid transparent;
    gap: 12px;
}

.sidebar-menu > li > a i {
    font-size: 1.5rem;
    min-width: 30px;
    flex-shrink: 0;
}

.menu-text {
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}

.submenu-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    font-size: 1.1rem !important;
    min-width: auto !important;
}

.sidebar:hover .menu-text { opacity: 1; transition-delay: 0.08s; }
.sidebar:hover .submenu-icon { opacity: 1; transition-delay: 0.08s; }

.sidebar-menu > li > a:hover,
.sidebar-menu > li > a.active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-left-color: #8b5cf6;
}

.sidebar-menu > li > a:hover i,
.sidebar-menu > li > a.active i { color: #8b5cf6; }

/* Submenu */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,0.15);
    overflow: hidden;
}

.sidebar:not(:hover) .submenu { display: none !important; }

.submenu li a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.1rem 0.6rem 3rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s;
    gap: 8px;
    white-space: nowrap;
}

.submenu li a i { font-size: 1.1rem; flex-shrink: 0; }

.submenu li a:hover,
.submenu li a.active {
    color: #fff;
    background: rgba(139, 92, 246, 0.12);
    border-left: 3px solid #8b5cf6;
    padding-left: calc(3rem - 3px);
}

/* Sidebar footer / logout */
.sidebar-footer {
    padding: 1.2rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 180, 180, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.25s;
    padding: 0.6rem 0.1rem;
}

.logout-btn i { font-size: 1.5rem; min-width: 30px; flex-shrink: 0; }

.logout-text {
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.sidebar:hover .logout-text { opacity: 1; transition-delay: 0.08s; }
.logout-btn:hover { color: #ff6b6b; }
/* ===== END SIDEBAR ===== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255, 0.02);
    min-width: 0;
}


.topbar {
    height: 80px;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar h1 {
    font-size: 1.5rem;
    font-weight: 400;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.content-area {
    padding: 3rem;
    flex: 1;
    overflow-y: auto;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease;
}

.glass-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #0ea5e9;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2.5rem;
}

.stat-card h4 {
    font-weight: 300;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
