/* ═══════════════════════════════════════════
   1MinuteHQ Hub — Base Styles
   Matches 1MinuteReel / 1MinuteFunnel design
   ═══════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    /* Brand Colors */
    --hq-primary: #6366f1;
    --hq-primary-dark: #4f46e5;
    --hq-primary-light: #818cf8;
    --hq-primary-bg: #eef2ff;
    --hq-accent: #8b5cf6;

    /* Semantic Colors */
    --hq-success: #22c55e;
    --hq-success-bg: #f0fdf4;
    --hq-warning: #f59e0b;
    --hq-warning-bg: #fffbeb;
    --hq-danger: #ef4444;
    --hq-danger-bg: #fef2f2;

    /* Neutrals */
    --hq-bg: #f8fafc;
    --hq-surface: #ffffff;
    --hq-surface-hover: #f1f5f9;
    --hq-border: #e2e8f0;
    --hq-border-light: #f1f5f9;
    --hq-text: #0f172a;
    --hq-text-muted: #64748b;
    --hq-text-light: #94a3b8;

    /* Typography */
    --hq-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --hq-radius: 12px;
    --hq-radius-sm: 8px;
    --hq-radius-xs: 6px;

    /* Shadows */
    --hq-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --hq-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --hq-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --hq-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--hq-font);
    font-size: 1rem;
    color: var(--hq-text);
    background-color: var(--hq-bg);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--hq-primary); text-decoration: none; }
a:hover { color: var(--hq-primary-dark); text-decoration: underline; }
img { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }

/* ── Login container ── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: var(--hq-bg);
}

.login-card {
    background: var(--hq-surface);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--hq-shadow-lg);
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: var(--hq-radius-sm);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--hq-text);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--hq-text-muted);
    margin-bottom: 32px;
    font-size: 14px;
}

/* ── Buttons ── */
.hq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--hq-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 150ms ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.hq-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--hq-shadow-md);
    text-decoration: none;
}
.hq-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hq-btn-primary {
    background: var(--hq-primary);
    color: white;
}
.hq-btn-primary:hover:not(:disabled) {
    background: var(--hq-primary-dark);
}

.hq-btn-accent {
    background: var(--hq-accent);
    color: white;
}
.hq-btn-accent:hover:not(:disabled) { background: #7c3aed; }

.hq-btn-secondary {
    background: var(--hq-surface);
    color: var(--hq-text);
    border: 1px solid var(--hq-border);
}
.hq-btn-secondary:hover:not(:disabled) { background: var(--hq-surface-hover); }

.hq-btn-danger {
    background: var(--hq-danger);
    color: white;
}

.hq-btn-full { width: 100%; }

.hq-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Google sign-in button */
.hq-btn-google {
    background: var(--hq-surface);
    color: var(--hq-text);
    border: 1px solid var(--hq-border);
    font-weight: 500;
}
.hq-btn-google:hover {
    background: var(--hq-surface-hover);
    box-shadow: var(--hq-shadow-sm);
}
.hq-btn-google svg {
    width: 18px;
    height: 18px;
}

/* ── Divider ── */
.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--hq-text-light);
    font-size: 12px;
}
.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--hq-border);
}
.login-divider span { padding: 0 12px; }

/* ── Form ── */
.hq-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--hq-surface);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius-sm);
    color: var(--hq-text);
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.hq-input:focus {
    border-color: var(--hq-primary);
    box-shadow: 0 0 0 3px var(--hq-primary-bg);
}
.hq-input::placeholder { color: var(--hq-text-light); }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--hq-radius-xs);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-active { background: var(--hq-success-bg); color: #16a34a; }
.badge-trial { background: var(--hq-warning-bg); color: #d97706; }
.badge-expired { background: var(--hq-danger-bg); color: var(--hq-danger); }

/* ── Loading spinner ── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--hq-border);
    border-top-color: var(--hq-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    flex-direction: column;
    gap: 16px;
    color: var(--hq-text-muted);
}

/* ── Modal ── */
.hq-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
}

.hq-modal {
    background: var(--hq-surface);
    border: 1px solid var(--hq-border);
    border-radius: var(--hq-radius);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: var(--hq-shadow-xl);
}

.hq-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: var(--hq-text-light);
    font-size: 24px;
    cursor: pointer;
    transition: color 150ms ease;
}
.hq-modal-close:hover { color: var(--hq-text); }

.hq-modal-content p { margin-bottom: 16px; }

.hq-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ── Footer ── */
.hq-footer {
    text-align: center;
    padding: 24px;
    color: var(--hq-text-light);
    font-size: 12px;
}

/* ── Powered by ── */
.powered-by {
    margin-top: 32px;
    font-size: 12px;
    color: var(--hq-text-light);
}
.powered-by a { color: var(--hq-primary); }

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-card { padding: 32px 24px; }
}
