/* =============================================
   PROMPT FORGE AI — MAIN STYLESHEET
   UX DEMON OFC — Light Pro Style
   ============================================= */

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

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --primary-dark: #1d4ed8;
    --bg: #eef2ff;
    --card: #ffffff;
    --border: #e2e8f0;
    --border-2: #cbd5e1;
    --text: #1e293b;
    --text-2: #475569;
    --text-3: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 2px 12px rgba(99,102,241,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --nav-h: 72px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ---- APP SHELL ---- */
.app-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: calc(var(--nav-h) + 16px);
}

.page-content {
    padding: 16px;
}

/* ---- TOP BAR ---- */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg);
}

.top-bar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.back-btn svg { width: 20px; height: 20px; }

/* ---- CREDITS BADGE ---- */
.credits-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: white;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    white-space: nowrap;
}

.credits-badge .star { font-size: 13px; }

/* ---- CARDS ---- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.card-sm { padding: 14px; }

/* ---- SECTION HEADER ---- */
.section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

.section-head .icon { font-size: 17px; }

/* ---- PILL OPTIONS ---- */
.pill-group {
    display: grid;
    gap: 10px;
}

.pill-group.cols-2 { grid-template-columns: 1fr 1fr; }
.pill-group.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.pill-group.cols-1 { grid-template-columns: 1fr; }

.pill-option {
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pill-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.pill-option.selected::before {
    content: '✓ ';
    font-size: 12px;
}

.pill-option:active { transform: scale(0.97); }

/* ---- THEME VISUAL CARDS ---- */
.theme-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.theme-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.theme-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.theme-preview {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.theme-preview.dark { background: linear-gradient(135deg, #1a0533, #6b21a8, #312e81); }
.theme-preview.light { background: linear-gradient(135deg, #d1fae5, #4ade80, #86efac); }

.theme-label {
    padding: 8px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: white;
}

.theme-card.selected .theme-label::after {
    content: ' ✓';
    color: var(--primary);
}

/* ---- FORM INPUTS ---- */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-input::placeholder { color: var(--text-3); }

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-textarea::placeholder { color: var(--text-3); }

.word-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

/* ---- WHAT'S INCLUDED ---- */
.whats-included {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    border: none;
    background: none;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.included-content {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: var(--radius-xs);
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
}

.included-content.show { display: block; }
.included-content li { margin-left: 16px; margin-bottom: 4px; }

/* ---- PRIMARY BUTTON ---- */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,0.35); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    flex: 1;
    padding: 14px;
    background: white;
    color: var(--text-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-row { display: flex; gap: 10px; }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--nav-h);
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-item svg { width: 22px; height: 22px; stroke-width: 2; }
.nav-item.active svg { stroke: var(--primary); }

/* ---- HOME SCREEN ---- */
.home-greeting {
    padding: 8px 0 20px;
}

.home-greeting h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-greeting p { font-size: 15px; color: var(--text-2); }

.prompt-type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.type-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

.type-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.type-card:active { transform: scale(0.97); }

.type-card-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.type-card-icon svg { width: 24px; height: 24px; stroke: var(--primary); }

.type-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.type-card p { font-size: 12px; color: var(--text-3); }

/* ---- SECTION TITLE ---- */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title-row h2 { font-size: 17px; font-weight: 700; color: var(--text); }
.section-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.empty-state p { font-size: 14px; color: var(--text-3); }

/* ---- HISTORY ITEMS ---- */
.history-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.history-item:hover { transform: translateX(3px); box-shadow: var(--shadow); }

.history-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon svg { width: 20px; height: 20px; stroke: var(--primary); }

.history-info { flex: 1; min-width: 0; }
.history-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-info p { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.history-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.history-badge.app { background: var(--primary-bg); color: var(--primary); }
.history-badge.web { background: #f0fdf4; color: #16a34a; }
.history-date { font-size: 11px; color: var(--text-3); }
.history-arrow { color: var(--text-3); flex-shrink: 0; }
.history-arrow svg { width: 16px; height: 16px; }

/* ---- WALLET SCREEN ---- */
.credits-card {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    border-radius: var(--radius);
    padding: 22px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
}

.credits-card-label { font-size: 14px; font-weight: 500; opacity: 0.85; margin-bottom: 8px; }

.credits-amount {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.credits-amount .star-icon { font-size: 28px; }
.credits-amount .number { font-size: 42px; font-weight: 800; }
.credits-note { font-size: 13px; opacity: 0.75; }

.packs-title { font-size: 19px; font-weight: 800; color: var(--text); margin-bottom: 14px; }

.credit-pack {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    position: relative;
}

.credit-pack.popular {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(37,99,235,0.15);
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 0 0 10px 10px;
}

.pack-name { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.pack-price { font-size: 32px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 4px; }
.pack-credits { font-size: 15px; font-weight: 600; text-align: center; color: var(--text-2); margin-bottom: 4px; }
.pack-per { font-size: 13px; color: var(--text-3); text-align: center; margin-bottom: 16px; }

/* ---- REVIEW SCREEN ---- */
.review-project-card {
    background: var(--primary-bg);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.review-project-icon {
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.review-project-icon svg { width: 28px; height: 28px; stroke: white; }

.review-project-info h2 { font-size: 18px; font-weight: 800; color: var(--text); }
.review-project-info p { font-size: 13px; color: var(--text-3); }
.review-project-info .tag { font-size: 13px; color: var(--primary); font-weight: 600; }

.review-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 15px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.review-item-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.review-item-info { flex: 1; }
.review-item-label { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.review-item-value { font-size: 15px; font-weight: 700; color: var(--text); }
.review-item-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.review-check { color: var(--success); flex-shrink: 0; font-size: 16px; }

.extra-features-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- GENERATING SCREEN ---- */
.generating-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg);
}

.gen-circles {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 32px;
}

.gen-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: spinCircle linear infinite;
}

.gen-circle-1 {
    inset: 0;
    border-top-color: var(--primary);
    animation-duration: 2s;
}

.gen-circle-2 {
    inset: 16px;
    border-right-color: #60a5fa;
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.gen-circle-3 {
    inset: 32px;
    border-bottom-color: rgba(37,99,235,0.3);
    animation-duration: 3s;
}

@keyframes spinCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gen-center {
    position: absolute;
    inset: 48px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 30px rgba(37,99,235,0.4);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(37,99,235,0.4); }
    50% { box-shadow: 0 0 50px rgba(37,99,235,0.6); }
}

.gen-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.gen-subtitle { font-size: 14px; color: var(--text-2); margin-bottom: 28px; text-align: center; }

.gen-step-card {
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.gen-step-current { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.gen-step-desc { font-size: 13px; color: var(--text-2); }

.gen-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.gen-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-2);
    transition: all 0.3s;
}

.gen-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

.gen-note { font-size: 13px; color: var(--text-3); }

/* ---- RESULT SCREEN ---- */
.result-banner {
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.prompt-box {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    max-height: 420px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.prompt-box pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-2);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prompt-box::-webkit-scrollbar { width: 4px; }
.prompt-box::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* ---- LOGIN SCREEN ---- */
.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg);
}

.login-logo { font-size: 56px; margin-bottom: 20px; }
.login-title { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 8px; text-align: center; }
.login-subtitle { font-size: 15px; color: var(--text-2); text-align: center; margin-bottom: 40px; line-height: 1.5; }

.login-form { width: 100%; max-width: 360px; }

.login-form .form-input { margin-bottom: 12px; }

.btn-google {
    width: 100%;
    padding: 14px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    color: var(--text);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.btn-google:hover { border-color: var(--primary); }

.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.divider span { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.divider-line { flex: 1; height: 1px; background: var(--border); }

.login-link { text-align: center; font-size: 14px; color: var(--text-3); margin-top: 20px; }
.login-link a { color: var(--primary); font-weight: 600; text-decoration: none; }

.error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}
.error-msg.show { display: block; }

/* ---- PROFILE SCREEN ---- */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}

.profile-name { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.profile-email { font-size: 14px; color: var(--text-3); text-align: center; margin-bottom: 20px; }

.settings-list { list-style: none; }

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.settings-item:last-child { border-bottom: none; }
.settings-item:active { opacity: 0.7; }

.settings-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.settings-item-text { flex: 1; }
.settings-item-text h4 { font-size: 15px; font-weight: 600; }
.settings-item-text p { font-size: 12px; color: var(--text-3); }
.settings-arrow { color: var(--text-3); font-size: 18px; }
.settings-item.danger { color: var(--danger); }

/* ---- TOAST ---- */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1), toastOut 0.3s ease 2.5s forwards;
    white-space: nowrap;
}

@keyframes toastIn { from { opacity:0; transform:translateY(-12px) scale(0.9); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; } }

/* ---- ADMIN ---- */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 24px; }

.admin-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.admin-logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.admin-nav a.danger { color: #fca5a5; }
.admin-nav a.danger:hover { background: rgba(239,68,68,0.2); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card-icon { font-size: 28px; margin-bottom: 8px; }
.stat-card-value { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.stat-card-label { font-size: 13px; color: var(--text-3); font-weight: 500; }

.admin-table-wrap { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }

.admin-table-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-table-head h3 { font-size: 16px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; background: #f8fafc; border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

.admin-badge { display: inline-flex; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.admin-badge.admin { background: #fef9c3; color: #854d0e; }
.admin-badge.user { background: var(--primary-bg); color: var(--primary); }
.admin-badge.banned { background: #fef2f2; color: var(--danger); }
.admin-badge.active { background: #f0fdf4; color: #16a34a; }
.admin-badge.app { background: var(--primary-bg); color: var(--primary); }
.admin-badge.web { background: #f0fdf4; color: #16a34a; }

.admin-action-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    margin-right: 4px;
}

.admin-action-btn.danger { background: #fef2f2; color: var(--danger); }
.admin-action-btn.danger:hover { background: var(--danger); color: white; }
.admin-action-btn.success { background: #f0fdf4; color: #16a34a; }
.admin-action-btn.success:hover { background: #16a34a; color: white; }
.admin-action-btn.primary { background: var(--primary-bg); color: var(--primary); }
.admin-action-btn.primary:hover { background: var(--primary); color: white; }

.admin-input {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}

.admin-input:focus { border-color: var(--primary); }

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.fw-700 { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-3); }
.hidden { display: none !important; }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
    .admin-wrap { padding: 12px; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    table { font-size: 13px; }
    th, td { padding: 10px 12px; }
}
