/* sentinel.sale - Monochrome Design System */

:root {
    --bg: #ffffff;
    --bg-subtle: #f7f7f7;
    --bg-muted: #eeeeee;
    --border: #e0e0e0;
    --border-dark: #cccccc;
    --text: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-muted: #999999;
    --accent: #8B1A1A;
    --accent-hover: #6d1414;
    --accent-light: rgba(139, 26, 26, 0.08);
    --accent-border: rgba(139, 26, 26, 0.2);
    --success: #2d6a30;
    --success-bg: #ecf5ec;
    --danger: #1a1a1a;
    --danger-bg: #eeeeee;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
}

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

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    flex: 1;
}

.container-narrow {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.nav-bar {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}
.nav-brand:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-brand img {
    height: 32px;
    width: 32px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover {
    background: var(--bg-subtle);
    border-color: var(--border-dark);
    text-decoration: none;
    color: var(--text);
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.btn-primary:hover {
    background: #333;
    border-color: #333;
    color: var(--bg);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text);
}

.btn-danger {
    color: var(--accent);
    border-color: var(--accent-border);
    background: transparent;
}
.btn-danger:hover {
    background: var(--danger-bg);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.15s ease;
    outline: none;
}
.form-input:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.input-group {
    display: flex;
    gap: 0;
}
.input-group .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}
.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    white-space: nowrap;
}

.event-checkboxes {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}
.event-checkboxes label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    margin: 0 -28px -28px;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    background: var(--bg-subtle);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--bg-muted);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: var(--bg-subtle);
}

/* Badges */
span.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

span.badge-default {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

span.badge-accent {
    background: var(--accent-light);
    color: var(--accent);
}

span.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

span.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

span.badge-warning {
    background: #fff8e1;
    color: #8a6d00;
}

span.badge-sm {
    padding: 1px 6px;
    font-size: 0.6875rem;
    white-space: nowrap;
}

.badge-pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    letter-spacing: 0.02em;
    background: var(--bg-muted);
    color: var(--text-secondary);
    vertical-align: middle;
}
.alert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* Alert / Messages */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    display: none;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(45, 106, 48, 0.2);
    display: none;
}

.alert-info {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Hero / Landing */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 24px 48px;
}

.hero-content {
    text-align: center;
    max-width: 640px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Landing page sections */
.section-block {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Features grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}

.feature {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s ease;
}
.feature:hover {
    border-color: var(--border-dark);
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1rem;
}

.feature h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* How It Works */
.how-it-works {
    background: rgba(139, 26, 26, 0.06);
    padding: 56px 24px;
}

.how-it-works .section-block {
    padding: 0;
}

.how-it-works-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}

.step {
    padding: 8px;
}

.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.7;
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Screenshot Showcase */
.showcase-row {
    display: flex;
    align-items: center;
    gap: 48px;
}

.showcase-row--reverse {
    flex-direction: row-reverse;
}

.showcase-text {
    flex: 1;
}

.showcase-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.showcase-text p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.showcase-img {
    flex: 1;
}

.showcase-img img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.showcase-img--narrow {
    flex: 0 1 auto;
    max-width: 320px;
}

.extensions-screenshot {
    max-width: 700px;
    margin: 0 auto 32px;
}

.extensions-screenshot img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* Extensions section */
.extensions-section {
    background: var(--bg-subtle);
    padding: 56px 24px;
    text-align: center;
}

.extension-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-extension {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-extension:hover {
    background: var(--bg);
    border-color: var(--border-dark);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
}
.btn-extension svg {
    flex-shrink: 0;
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding: 64px 24px;
}

.final-cta h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.final-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Auth forms */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg-subtle);
}

.auth-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header img {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Dashboard */
.page-content {
    padding: 32px 0;
}

.section + .section {
    margin-top: 24px;
}

/* Product row specifics */
.product-name {
    font-weight: 500;
    color: var(--text);
}

.product-variant {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.product-link {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color 0.15s;
}
.product-link:hover {
    color: var(--accent);
}

.price {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.price-sale {
    color: var(--accent);
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Spinner / loading */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-accent {
    border-top-color: var(--accent);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Loading state for page load */
.loading-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9375rem;
}

/* Toast notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text);
    color: var(--bg);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.2s ease;
    max-width: 360px;
}

.toast-success {
    border-left: 3px solid var(--success);
}

.toast-error {
    border-left: 3px solid var(--accent);
}

@keyframes slideIn {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-box {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-box-wide {
    max-width: 800px;
    width: 95vw;
}

/* Sparkline */
.sparkline-wrap {
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

.sparkline-wrap:hover svg polyline {
    stroke-width: 2.5;
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

.w-full { width: 100%; }

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }

.font-mono { font-family: var(--font-mono); }

/* Product card view (mobile) */
.product-card-view {
    display: none;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}

.product-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.product-card-body .product-name {
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.product-card-body .product-variant {
    margin-bottom: 6px;
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.product-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--bg-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 48px 24px 32px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .hero-actions .btn-lg {
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }

    .nav-actions {
        gap: 8px;
    }

    .hide-mobile {
        display: none;
    }

    .section-block {
        padding: 40px 24px;
    }

    .how-it-works {
        padding: 40px 24px;
    }

    .how-it-works-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .showcase-row,
    .showcase-row--reverse {
        flex-direction: column;
        gap: 24px;
    }

    .extension-buttons {
        flex-direction: column;
        align-items: center;
    }

    .extensions-section {
        padding: 40px 24px;
    }

    .nav-user {
        display: none;
    }

    .event-checkboxes {
        flex-direction: column;
        gap: 6px;
    }

    .product-table-view {
        display: none;
    }

    .product-card-view {
        display: block;
    }

    table {
        font-size: 0.8125rem;
    }

    th, td {
        padding: 10px 14px;
    }

    .card {
        padding: 20px;
    }

    .table-wrap {
        margin: 0 -20px -20px;
    }
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

.footer-copy {
    margin: 0;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Accent line on top of page */
.accent-line {
    height: 3px;
    background: var(--accent);
    width: 100%;
}
