/* ═══════════════════════════════════════════════════════════════
   style.css — TimeTel Login Page  |  Premium Dark Design System
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
    --primary:        #6366f1;
    --primary-hover:  #4f46e5;
    --primary-glow:   rgba(99, 102, 241, 0.35);
    --accent:         #10b981;
    --accent-glow:    rgba(16, 185, 129, 0.3);
    --danger:         #ef4444;
    --bg-deep:        #060818;
    --bg-card:        rgba(15, 23, 42, 0.75);
    --border-subtle:  rgba(255, 255, 255, 0.08);
    --border-focus:   rgba(99, 102, 241, 0.6);
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;
}

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

/* ── Base ──────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    background: var(--bg-deep);
    color: var(--text-primary);
    display: flex;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   SPLIT-SCREEN LAYOUT
   Left  → Brand / Hero panel  (hidden on mobile)
   Right → Login card
   ══════════════════════════════════════════════════════════════ */

/* ── Left hero panel ─────────────────────────────────────────── */
.auth-hero {
    display: none; /* shown ≥ 900px */
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0a0f1e 0%, #0f172a 40%, #1a0f3a 100%);
}

/* Animated mesh gradient orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
    pointer-events: none;
}
.hero-orb-1 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(99,102,241,0.45) 0%, transparent 70%);
    top: -10%; left: -15%;
    animation-delay: 0s;
}
.hero-orb-2 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(139,92,246,0.35) 0%, transparent 70%);
    bottom: 10%; right: -10%;
    animation-delay: -3s;
}
.hero-orb-3 {
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, transparent 70%);
    top: 50%; left: 40%;
    animation-delay: -6s;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -40px) scale(1.05); }
    66%       { transform: translate(-20px, 30px) scale(0.95); }
}

/* Grid dot overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 60px 56px;
}

.hero-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 64px;
}
.hero-logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 8px 24px rgba(99,102,241,0.4);
}
.hero-logo-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #a8c0ff 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 48px;
}

/* Feature pills */
.hero-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    transition: background 0.3s;
}
.hero-feature:hover { background: rgba(255,255,255,0.07); }
.hero-feature-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.hero-feature-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.hero-feature-text span {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Right login panel ────────────────────────────────────────── */
.auth-panel {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-subtle);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Subtle corner glow on login panel */
.auth-panel::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Login header ──────────────────────────────────────────────── */
.auth-header {
    margin-bottom: 36px;
    animation: slideUp 0.5s ease-out both;
}

.auth-header .mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.auth-header .mobile-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.auth-header .mobile-brand-name {
    font-size: 18px; font-weight: 800;
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ── Form ──────────────────────────────────────────────────────── */
.login-form {
    animation: slideUp 0.5s 0.1s ease-out both;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.input-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.form-group input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon { opacity: 1; }

.form-group input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
}
.form-group input:focus {
    border-color: var(--border-focus);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Password eye toggle */
.pwd-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    opacity: 0.4;
    transition: opacity 0.2s;
    padding: 4px;
    color: var(--text-secondary);
}
.pwd-toggle:hover { opacity: 0.9; }

/* ── Sign-in button ───────────────────────────────────────────── */
.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.auth-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99,102,241,0.5);
    filter: brightness(1.06);
}
.auth-btn:hover::after { opacity: 1; }
.auth-btn:active { transform: translateY(0); }

/* Ripple on click */
.auth-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transform: scale(0);
    animation: ripple 0.5s linear;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ── Messages ─────────────────────────────────────────────────── */
.message {
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.3s ease-out;
}
.message::before { font-size: 16px; }
.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.message.error::before { content: '⚠️'; }
.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.message.success::before { content: '✅'; }

/* ── Demo card ─────────────────────────────────────────────────── */
.demo-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.6) 0%, rgba(79, 70, 229, 0.5) 100%);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s 0.05s ease-out both;
    backdrop-filter: blur(8px);
}
.demo-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}
.demo-card::after {
    content: 'DEMO';
    position: absolute;
    right: -8px; top: -12px;
    font-size: 68px;
    font-weight: 900;
    opacity: 0.05;
    pointer-events: none;
    letter-spacing: -3px;
    color: #fff;
}

.demo-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.demo-badge {
    background: rgba(99,102,241,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.demo-card-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
}

.demo-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    line-height: 1.55;
}

.demo-creds {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.demo-cred-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    user-select: none;
    color: #fff;
}
.demo-cred-pill:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
}
.demo-cred-pill:active { transform: translateY(0); }
.cred-copy-icon { font-size: 11px; opacity: 0.6; }

.demo-note {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
}
.demo-note::before { content: '↩'; font-size: 13px; }

/* Quick-fill button */
.demo-fill-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}
.demo-fill-btn:hover { background: rgba(255,255,255,0.18); }

/* ── Footer ───────────────────────────────────────────────────── */
.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    animation: slideUp 0.5s 0.2s ease-out both;
}
.auth-footer a {
    color: #a8c0ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-footer a:hover { color: #fff; }
.auth-footer .divider {
    display: flex; align-items: center;
    gap: 10px; margin: 14px 0;
    color: var(--text-muted); font-size: 11px;
}
.auth-footer .divider::before,
.auth-footer .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

/* ── Loading overlay ──────────────────────────────────────────── */
#demo-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 24, 0.92);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 18px;
    backdrop-filter: blur(8px);
}
#demo-loading.active { display: flex; }
.demo-spinner {
    width: 52px; height: 52px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #6366f1;
    border-right-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.demo-loading-text { font-size: 15px; font-weight: 700; }
.demo-loading-sub  { font-size: 12px; color: var(--text-muted); }
.demo-loading-bar  {
    width: 200px; height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.demo-loading-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (min-width: 900px) {
    .auth-hero  { display: flex; }
    .auth-panel { max-width: 460px; }
    .auth-header .mobile-brand { display: none !important; }
}

@media (max-width: 899px) {
    body { flex-direction: column; overflow-y: auto; }
    .auth-panel {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        padding: 36px 24px 48px;
        border-left: none;
        justify-content: center;
    }
    .auth-header .mobile-brand { display: flex; }
    .auth-panel::before { display: none; }
}

@media (max-width: 480px) {
    .auth-panel { padding: 28px 18px 40px; }
    .auth-header h1 { font-size: 22px; }
    .demo-creds { flex-direction: column; }
    .demo-cred-pill { justify-content: center; }
}
