:root {
    --bg: #050205;
    --panel: #0b0607;
    --neon: #ff2d2d;
    --neon-glow: rgba(255, 45, 45, 0.22);
    --muted: #d0c6c8;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at top left, rgba(255, 45, 45, 0.08), transparent 20%),
                radial-gradient(circle at bottom right, rgba(255, 45, 45, 0.05), transparent 20%),
                #050205;
    color: var(--muted);
    font-family: Inter, Arial, sans-serif;
}

body {
    padding: 24px;
}

.app-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.brand .eyebrow {
    display: block;
    color: rgba(255, 45, 45, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.brand h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    text-shadow: 0 0 16px rgba(255, 45, 45, 0.25);
}

.main-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 160px;
}

.user-label {
    color: #cfcfcf;
    opacity: 0.95;
    font-size: 0.92rem;
    margin-top: 6px;
    text-align: right;
}

.auth-copy {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.75);
}

#dashboardStats.hidden {
    display: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 45, 45, 0.18);
    transform: translateY(-1px);
}

.hero-card,
.section-panel,
.dashboard-box,
.feature-card,
.featured-card,
.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 45, 45, 0.05));
    border: 1px solid rgba(255, 45, 45, 0.14);
    border-radius: 24px;
    padding: 24px;
}

.glow {
    box-shadow: 0 24px 80px rgba(255, 45, 45, 0.1);
}

.hero-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
}

.hero-copy .eyebrow,
.section-header .eyebrow {
    color: rgba(255, 45, 45, 0.9);
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-copy h2,
.section-header h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.05;
    color: #fff;
}

.hero-copy p,
.section-copy,
.feature-card p,
.featured-card p,
.dashboard-box p,
.stat-card .stat-label {
    margin: 16px 0 0;
    line-height: 1.8;
    color: var(--muted);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 45, 45, 0.16);
    color: white;
    background: rgba(255, 45, 45, 0.1);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 45, 45, 0.24);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 45, 45, 0.16);
    color: #fff;
}

.btn.secondary:hover {
    background: rgba(255, 45, 45, 0.14);
}

.btn.danger {
    background: linear-gradient(90deg, #ff4d4d, #ff1f1f);
    border-color: transparent;
    color: #080808;
}

.btn.primary {
    background: linear-gradient(90deg, #ff1f1f, #ff6f6f);
    border-color: transparent;
    color: #080808;
}

.btn.outline {
    background: transparent;
    border-color: rgba(255, 45, 45, 0.3);
}

/* Styled logout button (outline variant) */
#logoutButton.btn.outline {
    padding: 8px 18px;
    border-radius: 999px;
    border-width: 2px;
    border-color: rgba(255,45,45,0.9);
    background: rgba(8,8,8,0.6);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(255,45,45,0.06);
}

/* Slightly smaller primary login button when header stacked */
.header-actions .btn.primary {
    padding: 10px 18px;
}

/* Modern form controls */
label {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,45,45,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,45,45,0.02));
    color: var(--muted);
    outline: none;
    transition: box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
    font-size: 0.95rem;
}

textarea { min-height: 110px; resize: vertical; }

input::placeholder, textarea::placeholder { color: rgba(208,198,200,0.45); }

input:focus, textarea:focus, select:focus {
    border-color: var(--neon);
    box-shadow: 0 6px 28px var(--neon-glow);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,45,45,0.03));
    color: #fff;
}

/* Modal styles */
.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1200;
}

.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2,2,2,0.6);
    backdrop-filter: blur(4px);
}

.modal-panel {
    position: relative;
    width: min(720px, 96%);
    background: linear-gradient(180deg, rgba(8,6,7,0.98), rgba(12,8,9,0.98));
    border: 1px solid rgba(255,45,45,0.12);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 8px 40px rgba(255,45,45,0.06);
    z-index: 1210;
}

.modal-panel h3 { margin-top: 0; color: #fff; }

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.6rem;
}

.modal-body { margin-top: 8px; display: grid; gap: 10px; }

.modal-actions { display:flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

.modal-row { display:flex; flex-direction:column; gap:6px; }

/* Custom dropdown */
.custom-dropdown {
    position: relative;
}

.dropdown-button {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,45,45,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,45,45,0.02));
    color: var(--muted);
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-button::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 8px;
    opacity: 0.6;
}

.dropdown-button:hover {
    border-color: rgba(255,45,45,0.15);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,45,45,0.03));
}

.dropdown-button:focus {
    border-color: var(--neon);
    box-shadow: 0 6px 28px var(--neon-glow);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,45,45,0.03));
    color: #fff;
    outline: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(8,6,7,0.98), rgba(12,8,9,0.98));
    border: 1px solid rgba(255,45,45,0.12);
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-top: -1px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-option {
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 120ms ease, color 120ms ease;
}

.dropdown-option:hover {
    background: rgba(255,45,45,0.1);
    color: #fff;
}

.dropdown-option:first-child {
    border-radius: 0;
}

.dropdown-option:last-child {
    border-radius: 0 0 12px 12px;
}

@media (max-width: 720px) {
    label { flex-direction: column; align-items: stretch; }
}

.feature-grid,
.stats-grid,
.dashboard-content {
    display: grid;
    gap: 16px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.feature-card,
.featured-card {
    min-height: 160px;
}

.featured-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.store-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.add-card {
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    cursor:pointer;
    min-height:160px;
}
.add-card .add-button{
    width:72px;height:72px;border-radius:16px;background:linear-gradient(90deg,#ff1f1f,#ff6f6f);display:grid;place-items:center;font-size:36px;color:#080808;margin-bottom:8px;box-shadow:0 20px 60px rgba(255,45,45,0.12);
}
.pending-card .actions .btn.danger{ background: linear-gradient(90deg,#ff4d4d,#ff1f1f); color:#080808; border-color:transparent; }

.store-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.stat-card {
    padding: 22px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.stat-label {
    color: var(--muted);
    margin-top: 10px;
}

.section-panel {
    padding: 24px;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-copy {
    max-width: 54rem;
}

.dashboard-content {
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
}

.dashboard-box ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.dashboard-box li {
    margin-bottom: 10px;
}

.admin-actions {
    display: grid;
    gap: 20px;
}

.admin-actions > div {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 45, 45, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.pending-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.pending-card {
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 45, 45, 0.12);
}

.pending-card h4 {
    margin: 0 0 10px;
    color: #fff;
}

.pending-card p {
    margin: 8px 0;
    color: var(--muted);
}

.pending-card .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.store-image {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.store-list article {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 340px;
}

.price {
    margin: 12px 0 0;
    color: #fff;
    font-weight: 700;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .hero-card,
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    .feature-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
