/* SoundSocials Portal — Branded Styles */

:root {
    --color-primary: #6c5ce7;
    --color-primary-dark: #5a4bd1;
    --color-primary-light: #a29bfe;
    --color-success: #00b894;
    --color-danger: #e74c3c;
    --color-warning: #fdcb6e;
    --color-warning-dark: #e17055;
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-text: #2d3436;
    --color-text-muted: #636e72;
    --color-border: #e0e0e0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nav */
.nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.1rem;
}
.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--color-primary); }
.nav-link-muted { color: var(--color-text-muted); }

/* Main */
.main {
    flex: 1;
    padding: 2rem 1.5rem;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
}
.container-sm {
    max-width: 480px;
    margin: 0 auto;
}

/* Auth pages */
.page-auth .main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}
.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}
.form-group input {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.form-group input[readonly] {
    background: var(--color-bg);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:disabled {
    background: var(--color-primary-light);
    cursor: not-allowed;
}
.btn-warning {
    background: var(--color-warning-dark);
    color: white;
}
.btn-warning:hover { opacity: 0.9; }
.btn-link {
    background: none;
    color: var(--color-primary);
    padding: 0.5rem;
}
.btn-link:hover { text-decoration: underline; }
.btn-block { width: 100%; }
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    line-height: 1.5;
}
.alert-error {
    background: #ffeef0;
    color: var(--color-danger);
    border: 1px solid #fcd4d8;
}
.alert-success {
    background: #eafff6;
    color: #00866e;
    border: 1px solid #b8f0d8;
}
.alert-info {
    background: #f0f0ff;
    color: var(--color-primary);
    border: 1px solid #d5d0ff;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
}
.page-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

/* Account cards */
.accounts-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.account-card {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.2s;
}
.account-card:hover {
    box-shadow: var(--shadow);
}
.account-card--error {
    border-color: #fcd4d8;
    background: #fffbfc;
}
.account-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.account-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.account-avatar--placeholder {
    background: var(--color-primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.account-username {
    font-weight: 600;
    font-size: 1rem;
}
.account-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.account-proxy {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    display: inline-block;
}
.badge-success {
    background: #eafff6;
    color: #00866e;
}
.badge-danger {
    background: #ffeef0;
    color: var(--color-danger);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 2px dashed var(--color-border);
}
.empty-icon {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}
.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.empty-state p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Card (generic) */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}
.card .page-title { margin-bottom: 0.25rem; }
.card .page-subtitle { margin-bottom: 1.5rem; }

/* Security notice */
.security-notice {
    display: flex;
    gap: 0.75rem;
    background: #eafff6;
    color: #00664f;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.5;
    border: 1px solid #b8f0d8;
    margin-bottom: 1rem;
}
.security-notice strong {
    color: #005a45;
}

/* SMS hint */
.sms-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

/* Verification notice */
.verification-notice {
    background: #f0f0ff;
    color: var(--color-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid #d5d0ff;
    margin-bottom: 0.5rem;
}

/* Checkpoint "Was this you?" card */
.checkpoint-card {
    text-align: center;
    padding: 0.5rem 0;
}
.checkpoint-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}
.checkpoint-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.checkpoint-icon {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}
.checkpoint-location {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fff8e6;
    color: #8a6d00;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.5;
    border: 1px solid #f0dfa0;
    text-align: left;
    margin-bottom: 1rem;
}
.checkpoint-steps {
    text-align: left;
    background: var(--color-bg);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

/* Spinner on button */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* Responsive */
@media (max-width: 600px) {
    .auth-card { padding: 1.5rem; }
    .card { padding: 1.5rem; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .account-card { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .account-card .btn { align-self: stretch; }
}
