/* ============================================================
   Popsociables Web App — Shared Styles
   app.popsociables.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep:        #070f17;
    --bg-card:        #0d1f2d;
    --bg-card-2:      #102436;
    --bg-input:       #0a1a27;
    --border:         rgba(255, 255, 255, 0.08);
    --border-focus:   rgba(24, 167, 154, 0.6);
    --teal:           #18a79a;
    --teal-dark:      #0f8a7f;
    --teal-glow:      rgba(24, 167, 154, 0.15);
    --text-primary:   #eef2f7;
    --text-secondary: #7a9bb5;
    --text-muted:     #4a6580;
    --error:          #ff4d6a;
    --error-bg:       rgba(255, 77, 106, 0.1);
    --success-bg:     rgba(24, 167, 154, 0.12);
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      18px;
    --radius-xl:      24px;
    --shadow:         0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg:      0 12px 48px rgba(0, 0, 0, 0.55);
    --transition:     all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
}

/* ── Typography ── */
h1 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.2rem, 4vw, 1.6rem); font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-secondary); }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
    background: var(--teal);
    color: #fff;
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(24,167,154,0.3); }
.btn-primary:hover { text-decoration: none; }

.btn-secondary {
    background: transparent;
    color: var(--teal);
    border: 1.5px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal-glow); transform: translateY(-1px); text-decoration: none; }

.btn-ghost {
    background: var(--bg-card-2);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); text-decoration: none; }

.btn-danger {
    background: var(--error-bg);
    color: var(--error);
    border: 1.5px solid rgba(255,77,106,0.2);
}
.btn-danger:hover { background: rgba(255,77,106,0.2); text-decoration: none; }

.btn-sm { padding: 8px 16px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: 50%; min-width: 40px; min-height: 40px; }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
select,
textarea {
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 12px 14px;
    width: 100%;
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus {
    border-color: var(--border-focus);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(24,167,154,0.1);
}
textarea { resize: vertical; min-height: 80px; }

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%237a9bb5' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

input[type="color"] {
    width: 44px;
    height: 44px;
    padding: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    padding: 0;
    border: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--teal);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(24,167,154,0.4);
}

/* ── Tabs ── */
.tab-bar {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}
.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn.active {
    background: var(--bg-card-2);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    display: none;
}
.alert.show { display: block; }
.alert-error  { background: var(--error-bg);   color: var(--error); border: 1px solid rgba(255,77,106,0.2); }
.alert-success{ background: var(--success-bg); color: var(--teal);  border: 1px solid rgba(24,167,154,0.2); }

/* ── Toast ── */
#toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card-2);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    opacity: 0;
    white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.toast-success { border-color: rgba(24,167,154,0.4); color: #4ecdc4; }
#toast.toast-error   { border-color: rgba(255,77,106,0.4); color: var(--error); }

/* ── Logo ── */
.ps-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    text-decoration: none;
}
.ps-logo span { color: var(--teal); }
.ps-logo-mark {
    width: 34px;
    height: 34px;
    background: var(--teal);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Section Headers ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ── Spinner ── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.text-muted   { color: var(--text-muted) !important; }
.text-error   { color: var(--error) !important; }
.text-teal    { color: var(--teal) !important; }
.font-sm      { font-size: 0.82rem; }
.font-xs      { font-size: 0.75rem; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 32px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
