/* assets/css/app.css
   End-user app styling. Shares the CSS-variable theme system with
   admin.css but with a lighter, more "product" feeling chrome
   (top navbar instead of dark sidebar, card-based dashboard). */

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

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --accent: #7C3AED;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --success: #10B981;
    --danger: #DC2626;
    --warning: #F59E0B;
}

html[data-mode="dark"] {
    --bg: #0F172A;
    --surface: #1E293B;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --border: #334155;
}

html[data-theme="emerald"]      { --primary: #10B981; --accent: #059669; }
html[data-theme="royal_purple"] { --primary: #7C3AED; --accent: #5B21B6; }
html[data-theme="sunset_orange"]{ --primary: #F97316; --accent: #EA580C; }
html[data-theme="ocean_blue"]   { --primary: #0EA5E9; --accent: #0284C7; }
html[data-theme="rose_gold"]    { --primary: #E11D48; --accent: #BE123C; }
html[data-theme="midnight_teal"]{ --primary: #0D9488; --accent: #0F766E; }

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--primary); }

.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    color: var(--text);
}

.navbar .brand img { height: 30px; width: 30px; border-radius: 7px; }

.navbar nav { display: flex; gap: 22px; align-items: center; }
.navbar nav a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.navbar nav a:hover, .navbar nav a.active { color: var(--primary); }

.navbar .nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

.container { max-width: 1180px; margin: 0 auto; padding: 28px 20px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
}

.hero {
    text-align: center;
    padding: 70px 20px 50px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
}

.hero h1 { font-size: 38px; font-weight: 900; margin: 0 0 14px; }
.hero p { font-size: 17px; color: var(--text-muted); max-width: 620px; margin: 0 auto 26px; }

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Roboto', Arial, sans-serif;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.navbar nav .btn-primary { color: #fff !important; background: var(--primary) !important; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px rgba(79,70,229,0.25); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.feature-card { text-align: left; }
.feature-card .icon {
    display: inline-flex; width: 44px; height: 44px; border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary); align-items: center; justify-content: center; margin-bottom: 12px; font-size: 20px;
}

.pricing-card { text-align: center; border: 2px solid var(--border); }
.pricing-card.featured { border-color: var(--primary); }
.pricing-card .price { font-size: 34px; font-weight: 900; margin: 10px 0; }

footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
footer.site-footer a { color: var(--text-muted); margin: 0 10px; text-decoration: none; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto', Arial, sans-serif;
    background: var(--surface);
    color: var(--text);
}

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
    padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px;
}
table.data-table th { font-weight: 700; color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-active { background: #D1FAE5; color: #047857; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-locked { background: #F1F5F9; color: #64748B; }

.score-ring {
    width: 90px; height: 90px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; color: #fff;
    background: conic-gradient(var(--primary) calc(var(--score) * 1%), var(--border) 0);
}

@media (max-width: 900px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .navbar nav { display: none; }
    .navbar .nav-toggle { display: inline-block; }
    .hero h1 { font-size: 28px; }
}

/* ============================================================
   Theme Switcher (navbar)
   ============================================================ */
.theme-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 9px;
    cursor: pointer;
    color: var(--text);
    font-size: 16px;
    line-height: 1;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-btn:hover { background: var(--surface); }

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 9999;
}

.theme-dropdown-section { margin-bottom: 14px; }
.theme-dropdown-section:last-child { margin-bottom: 0; }

.theme-dropdown-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.theme-mode-row {
    display: flex;
    gap: 6px;
}

.mode-btn {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s;
}
.mode-btn:hover { border-color: var(--primary); }
.mode-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.theme-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.theme-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    outline: none;
}
.theme-color-swatch:hover { transform: scale(1.18); }
.theme-color-swatch.active {
    border-color: var(--text);
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--primary);
}
