/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d0d0d;
    overflow: hidden;
    position: relative;
}

/* Animated blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    animation: float 8s ease-in-out infinite;
}

.blob1 {
    width: 400px;
    height: 400px;
    background: #8a2be2;
    top: -150px;
    left: -100px;
}

.blob2 {
    width: 300px;
    height: 300px;
    background: #ff69b4;
    bottom: -100px;
    right: -80px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(50px, 30px) scale(1.05); }
}

/* Card (glassmorphism) */
.card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 2rem 1.8rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.37);
}

.card-header {
    text-align: center;
    margin-bottom: 1.8rem;
    color: #fff;
}

.card-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.card-header p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
}

/* Form fields */
.field-group {
    margin-bottom: 1.3rem;
}

.field-group label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: rgba(255,255,255,0.5);
}

input::placeholder {
    color: rgba(255,255,255,0.25);
}

/* Sign In button */
.signin-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    margin-top: 0.2rem;
}

.signin-btn:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.signin-btn:active {
    transform: scale(0.98);
}

/* Mobile-first adjustments (already applied) */
@media (min-width: 768px) {
    .card {
        padding: 2.8rem 2.5rem;
    }

    .card-header h1 {
        font-size: 2.4rem;
    }
}

/* ───── Dashboard page overrides ───── */
body.dashboard {
    display: block;
    align-items: initial;
    justify-content: initial;
    overflow: auto;
}

/* Top bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    color: #fff;
}

.branding {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Slide-out navigation */
.side-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6rem 1.5rem 1.5rem;
    transition: left 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.side-nav.open {
    left: 0;
}

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

.side-nav li {
    margin-bottom: 1rem;
}

.side-nav a {
    display: block;
    padding: 0.8rem 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: background 0.3s;
}

.side-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Dashboard main area */
.dashboard-main {
    padding: 6rem 1.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    color: #fff;
    text-align: left;
}

.metric-card h2 {
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.metric-change {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.metric-change.positive {
    color: #4caf50;
}
