* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f5f6fa;
    color: #222;
}

a { color: #3788d8; text-decoration: none; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.brand { display: flex; align-items: center; }
.brand img { display: block; }
.auth-logo { align-self: center; margin-bottom: 4px; }

.topbar-right { display: flex; gap: 14px; align-items: center; }
.user-name {
    color: #444;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    background: #f0f2f5;
    border-radius: 20px;
}
.btn-logout {
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
    padding: 6px 14px;
    border: 1px solid #f0d3d0;
    border-radius: 20px;
}
.btn-logout:hover { background: #fdf0ef; }

.content { padding: 24px 32px; max-width: 1000px; margin: 0 auto; }

/* Auth pages */
.auth-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #020a1a 0%, #06265c 45%, #00afef 100%);
}
.auth-page::before {
    content: '';
    position: absolute;
    top: -12%;
    right: -8%;
    width: 55vw;
    height: 55vw;
    max-width: 640px;
    max-height: 640px;
    background: radial-gradient(circle, rgba(0,175,239,0.55) 0%, rgba(0,175,239,0) 70%);
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -18%;
    left: -10%;
    width: 45vw;
    height: 45vw;
    max-width: 520px;
    max-height: 520px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
.auth-brand {
    position: absolute;
    top: 32px;
    left: 40px;
    z-index: 2;
}
.auth-brand img { display: block; width: 130px; filter: brightness(0) invert(1); }
.auth-form {
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 40px 36px;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(2,10,26,0.35);
    width: 360px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-eyebrow { margin: 0; color: #00afef; font-weight: 700; font-size: 15px; }
.auth-form h1 { margin: 0 0 4px; font-size: 24px; color: #10233f; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #555; text-align: left; font-weight: 600; }
.auth-form input {
    padding: 11px 14px;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form input:focus {
    outline: none;
    border-color: #00afef;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,175,239,0.15);
}
.auth-form .btn-primary {
    background: linear-gradient(135deg, #00afef, #0077c2);
    border-color: transparent;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
}
.auth-form .btn-primary:hover { background: linear-gradient(135deg, #0099d6, #00629e); }
.switch { font-size: 13px; text-align: center; color: #666; }

@media (max-width: 480px) {
    .auth-brand { top: 20px; left: 20px; }
    .auth-brand img { width: 100px; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
}
.btn-primary { background: #3788d8; color: #fff; border-color: #3788d8; }
.btn-primary:hover { background: #2f70b3; }

.error { color: #c0392b; font-size: 13px; }
.success { color: #2e7d32; font-size: 13px; }

/* Dashboard tiles */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.tile {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.tile:hover { border-color: #3788d8; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.tile-title { font-size: 18px; font-weight: 700; color: #222; }
.tile-desc { font-size: 13px; color: #777; }

@media (max-width: 700px) {
    .content { padding: 14px; }
    .topbar { padding: 8px 14px; }
    .brand img { width: 84px; }
}
