/* Premium material-inspired login styling */
:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0b1220;
    color: #f8fafc;
}

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    min-height: 100%;
}

body.login-page {
    background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 25%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 20%),
                linear-gradient(180deg, #08101f 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-shell {
    width: min(1200px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
}

.login-panel,
.login-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 36px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.45);
    padding: 40px;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-panel::before {
    content: '';
    position: absolute;
    inset: -30% 0 50% -20%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 40%);
    filter: blur(60px);
    pointer-events: none;
}

.brand-group {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    color: #0f172a;
    font-size: 26px;
    font-weight: 800;
}

.brand-logo,
.brand-logo-small {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    display: block;
}

.brand-logo-small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    padding: 6px;
}

.brand-group h1 {
    margin: 0;
    font-size: clamp(2rem, 2.5vw, 2.5rem);
    letter-spacing: -0.04em;
}

.brand-group p {
    margin: 8px 0 0;
    color: #cbd5e1;
    max-width: 420px;
    line-height: 1.7;
}

.hero-copy h2 {
    font-size: clamp(2.4rem, 3vw, 3.2rem);
    margin: 0;
    line-height: 1.05;
}

.hero-copy p {
    margin-top: 18px;
    color: #cbd5e1;
    max-width: 520px;
    line-height: 1.75;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
    position: relative;
    z-index: 1;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.feature-card span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #22d3ee;
    color: #0f172a;
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    color: #e2e8f0;
    font-weight: 500;
}

.login-card {
    position: relative;
    z-index: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
}

.card-header h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.status-pill {
    padding: 10px 16px;
    border-radius: 9999px;
    color: #0f172a;
    background: #22d3ee;
    font-weight: 700;
    font-size: 0.9rem;
}

.alert {
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.login-form {
    display: grid;
    gap: 18px;
}

.input-group {
    display: grid;
    gap: 10px;
}

.input-group label {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input::placeholder {
    color: #94a3b8;
}

.input-group input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    accent-color: #38bdf8;
}

.link-secondary {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-secondary:hover {
    color: #e2e8f0;
}

.btn {
    border: none;
    cursor: pointer;
    border-radius: 18px;
    font-weight: 700;
    padding: 16px 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    width: 100%;
    color: #0f172a;
    background: linear-gradient(135deg, #38bdf8, #22d3ee);
    box-shadow: 0 18px 40px rgba(56, 189, 248, 0.18);
}

.btn-social {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.btn-google,
.btn-apple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: #94a3b8;
    font-size: 0.93rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.18);
}

.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.signup-copy {
    margin-top: 26px;
    color: #cbd5e1;
    font-size: 0.95rem;
    text-align: center;
}

.signup-copy a {
    color: #38bdf8;
    text-decoration: none;
}

.signup-copy a:hover {
    color: #7dd3fc;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .login-shell {
        gap: 24px;
    }

    .login-panel,
    .login-card {
        padding: 28px;
        border-radius: 30px;
    }
}

.dashboard-page {
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    min-height: 100vh;
    color: #e2e8f0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 28px;
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-sidebar {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 32px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 28px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

/* Custom scrollbar design for sticky sidebar */
.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}
.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.12);
    border-radius: 6px;
}
.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.24);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark-small {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    color: #0f172a;
    font-weight: 800;
}

.brand-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.brand-note {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 0.92rem;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.nav-link {
    display: block;
    padding: 14px 18px;
    border-radius: 18px;
    text-decoration: none;
    color: #cbd5e1;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(56, 189, 248, 0.16);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
}

.btn-ghost {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    color: #cbd5e1;
    text-align: center;
}

.dashboard-content {
    display: grid;
    gap: 24px;
    align-self: start;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 32px;
    padding: 28px;
}

.dashboard-header h1 {
    margin: 0;
    font-size: clamp(2rem, 2.5vw, 2.8rem);
    line-height: 1.05;
}

.header-meta {
    display: flex;
    align-items: center;
}

.status-pill.status-owner {
    padding: 12px 18px;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.16);
    color: #e0f2fe;
    font-size: 0.95rem;
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    padding: 26px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.stat-label {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
}

.stat-card h2 {
    margin: 0;
    font-size: 2.2rem;
    color: #ffffff;
}

.card-primary {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(59, 130, 246, 0.12));
}

.card-secondary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));
}

.card-tertiary {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(34, 197, 94, 0.12));
}

.card-quaternary {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(245, 158, 11, 0.12));
}

.dashboard-panel {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 32px;
    padding: 28px;
}

.panel-header h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.panel-header p {
    margin: 0;
    color: #cbd5e1;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.panel-action {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.panel-action:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.26);
}

.hint-text {
    color: #94a3b8;
    font-size: 0.95rem;
}

.signup-copy {
    margin-top: 24px;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dashboard-grid,
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-sidebar {
        min-height: auto;
    }
}

.sidebar-dropdown {
    border: 1px solid transparent;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-dropdown[open] {
    border-color: rgba(56, 189, 248, 0.24);
}

.dropdown-toggle {
    display: block;
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 0;
    border-radius: 18px;
    cursor: pointer;
    color: #cbd5e1;
    background: transparent;
    font-weight: 700;
    border: none;
    list-style: none;
}

.dropdown-toggle::-webkit-details-marker {
    display: none;
}

.dropdown-toggle::after {
    content: '▾';
    float: right;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.sidebar-dropdown[open] .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: grid;
    gap: 8px;
    padding: 8px 0 12px 8px;
}

.nav-sublink {
    padding-left: 32px;
    font-size: 0.95rem;
}

.nav-sublink.active {
    color: #ffffff;
}

.settings-header-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 24px;
}

.settings-header-card h2 {
    margin: 0;
    font-size: 1.9rem;
}

.settings-header-card .section-copy {
    margin-top: 12px;
    color: #cbd5e1;
    max-width: 610px;
    line-height: 1.75;
}

.settings-nav-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.8);
    color: #cbd5e1;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tab-link:hover,
.tab-link.tab-active {
    background: rgba(56, 189, 248, 0.16);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.34);
}

.settings-panel {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 28px;
    padding: 28px;
}

.settings-section {
    display: grid;
    gap: 24px;
}

.settings-section h3 {
    margin: 0;
    font-size: 1.6rem;
}

.field-card {
    display: grid;
    gap: 10px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 22px;
    padding: 22px;
}

.field-card label {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.field-card input,
.field-card textarea,
.field-card select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
}

.field-card textarea {
    resize: vertical;
    min-height: 92px;
}

.field-card select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #cbd5e1 50%), linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 4px), calc(100% - 12px) calc(50% - 4px);
    background-size: 8px 8px;
    background-repeat: no-repeat;
}

.field-card-full {
    grid-column: span 2 / span 2;
}

.form-actions {
    grid-column: span 2 / span 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 8px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 900px) {
    .settings-header-card,
    .settings-grid {
        grid-template-columns: 1fr;
        display: grid;
    }
}

/* Order modal two-column form sections */
.form-section {
    display: grid;
    gap: 6px;
}

.form-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #475569;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    margin-bottom: 6px;
}

/* Responsive: collapse order modal two-column grid */
@media (max-width: 700px) {
    #order-modal .product-modal-panel > form > div[style*="grid-template-columns:1fr"] {
        grid-template-columns: 1fr !important;
    }
}
