/* We Buy We Pickup - Modern Deal-Making Platform */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg: #0a0a0b;
    --bg-card: #131316;
    --bg-card-hover: #1a1a1f;
    --bg-input: #1a1a1f;
    --bg-elevated: #1e1e24;
    --border: #2a2a32;
    --border-hover: #3a3a44;
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --text-dim: #555568;
    --accent: #00d4aa;
    --accent-hover: #00eebb;
    --accent-dim: rgba(0, 212, 170, 0.1);
    --accent-border: rgba(0, 212, 170, 0.25);
    --danger: #ff4466;
    --danger-dim: rgba(255, 68, 102, 0.1);
    --warning: #ffaa00;
    --warning-dim: rgba(255, 170, 0, 0.1);
    --info: #4488ff;
    --info-dim: rgba(68, 136, 255, 0.1);
    --success: #00d4aa;
    --success-dim: rgba(0, 212, 170, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --font: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ========== LAYOUT ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    padding-top: max(24px, env(safe-area-inset-top, 24px));
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    text-decoration: none;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #00aa88);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--bg);
}

.sidebar-logo span {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    padding: 0 12px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.nav-link.active {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    font-family: var(--font-mono);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: capitalize;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    max-width: 1200px;
}

/* Mobile menu toggle */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-top, 0px));
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    align-items: center;
    padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    gap: 12px;
}

.mobile-header .sidebar-logo {
    padding: 0;
    margin: 0;
    border: none;
    flex-shrink: 0;
    overflow: visible;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}

/* ========== PAGE HEADER ========== */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* ========== STAT CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--accent);
}

.stat-value.warning { color: var(--warning); }
.stat-value.info { color: var(--info); }
.stat-value.danger { color: var(--danger); }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-danger {
    background: var(--danger-dim);
    color: var(--danger);
    border-color: rgba(255,68,102,0.25);
}

.btn-danger:hover {
    background: rgba(255,68,102,0.2);
}

.btn-warning {
    background: var(--warning-dim);
    color: var(--warning);
    border-color: rgba(255,170,0,0.25);
}

.btn-info {
    background: var(--info-dim);
    color: var(--info);
    border-color: rgba(68,136,255,0.25);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-dim);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ========== FILE UPLOAD ========== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-input);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.upload-zone svg {
    width: 40px;
    height: 40px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 14px;
}

.upload-zone .accent {
    color: var(--accent);
    font-weight: 600;
}

.upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.upload-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ========== ITEMS TABLE/LIST ========== */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.item-card:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.item-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-thumb svg {
    width: 28px;
    height: 28px;
    color: var(--text-dim);
}

.item-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-price {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
    white-space: nowrap;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.status-pending {
    background: var(--warning-dim);
    color: var(--warning);
    border: 1px solid rgba(255,170,0,0.25);
}

.status-info_requested {
    background: var(--info-dim);
    color: var(--info);
    border: 1px solid rgba(68,136,255,0.25);
}

.status-offer_made {
    background: rgba(136,68,255,0.1);
    color: #aa88ff;
    border: 1px solid rgba(136,68,255,0.25);
}

.status-offer_accepted {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid var(--accent-border);
}

.status-offer_declined, .status-denied {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(255,68,102,0.25);
}

.status-completed {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid var(--accent-border);
}

/* ========== OFFER TIMELINE ========== */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline-item.admin::before { border-color: var(--info); }
.timeline-item.denial::before { border-color: var(--danger); }
.timeline-item.accepted::before { border-color: var(--success); }

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-author {
    font-weight: 600;
    font-size: 13px;
}

.timeline-date {
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.timeline-amount {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
    font-size: 18px;
}

.timeline-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== IMAGE GALLERY ========== */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.gallery-img {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.gallery-img:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

/* ========== FILTERS ========== */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-chip:hover { border-color: var(--border-hover); color: var(--text); }
.filter-chip.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border); }

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 16px;
    padding-left: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-dim);
}

/* ========== CALENDAR PICKER ========== */
.calendar-picker {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    max-width: 350px;
}

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

.calendar-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.calendar-nav {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.calendar-nav:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 8px 0;
    font-family: var(--font-mono);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text);
    transition: all var(--transition);
}

.calendar-day:hover:not(.disabled) {
    background: var(--accent-dim);
    color: var(--accent);
}

.calendar-day.selected {
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
}

.calendar-day.disabled {
    color: var(--text-dim);
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.today {
    border: 1px solid var(--accent-border);
}

/* ========== MODAL ========== */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop.active { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ========== AUTH PAGES ========== */
.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

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

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    justify-content: center;
}

.auth-logo .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), #00aa88);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: var(--bg);
}

.auth-logo span {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== ALERT ========== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(255,68,102,0.25);
}

.alert-success {
    background: var(--success-dim);
    color: var(--success);
    border: 1px solid var(--accent-border);
}

.alert-info {
    background: var(--info-dim);
    color: var(--info);
    border: 1px solid rgba(68,136,255,0.25);
}

/* ========== LOADING ========== */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    flex-direction: column;
    gap: 16px;
    color: var(--text-muted);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

/* ========== DETAIL PAGE ========== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.detail-field {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(42,42,50,0.5);
    font-size: 14px;
}

.detail-field-label {
    color: var(--text-muted);
}

.detail-field-value {
    font-weight: 500;
    text-align: right;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
}

.page-btn:hover { border-color: var(--border-hover); color: var(--text); }
.page-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.toast-success { background: #0d3d2e; color: var(--accent); border: 1px solid var(--accent-border); }
.toast-error { background: #3d0d1a; color: var(--danger); border: 1px solid rgba(255,68,102,0.25); }
.toast-info { background: #0d1a3d; color: var(--info); border: 1px solid rgba(68,136,255,0.25); }

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

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-header {
        display: flex;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: calc(76px + env(safe-area-inset-top, 0px)) 16px 24px;
    }

    .item-card {
        grid-template-columns: 60px 1fr;
    }

    .item-price {
        grid-column: 1 / -1;
        text-align: right;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        min-width: 100%;
    }

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

    .auth-card {
        padding: 28px 20px;
    }

    /* Prevent iOS Safari from auto-zooming on input focus */
    .form-input, .form-select, .form-textarea {
        font-size: 16px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========== TAB NAVIGATION ========== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.tab:hover { color: var(--text); }
.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ========== PICKUP SCHEDULER ========== */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.time-slot {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-mono);
    background: var(--bg-input);
    color: var(--text);
    transition: all var(--transition);
}

.time-slot:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.time-slot.selected {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    font-weight: 700;
}

/* ========== STATUS: READY FOR PICKUP ========== */
.status-ready_for_pickup {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* ========== ADMIN PICKUP CALENDAR GRID ========== */
.pickup-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 16px;
}

.pickup-cal-header {
    background: var(--bg-sidebar);
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pickup-cal-day {
    background: var(--bg-card);
    min-height: 100px;
    padding: 6px;
    vertical-align: top;
}

.pickup-cal-day.empty {
    background: var(--bg);
    min-height: auto;
}

.pickup-cal-day.past {
    opacity: 0.5;
}

.pickup-cal-day.today {
    background: var(--accent-dim);
}

.pickup-cal-day.has-pickups {
    background: var(--bg-card-hover);
}

.pickup-cal-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.pickup-cal-day.today .pickup-cal-date {
    color: var(--accent);
    font-weight: 700;
}

.pickup-cal-event {
    font-size: 11px;
    padding: 4px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.3;
    transition: all var(--transition);
}

.pickup-cal-event:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.pickup-cal-event.status-ready_for_pickup {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-left: 3px solid #3b82f6;
}

.pickup-cal-event.status-completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-left: 3px solid #10b981;
}

.pickup-cal-event.status-offer_accepted {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-left: 3px solid #f59e0b;
}

.pickup-cal-customer {
    display: block;
    font-size: 10px;
    opacity: 0.7;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .pickup-calendar-grid {
        font-size: 11px;
    }
    .pickup-cal-day {
        min-height: 60px;
        padding: 4px;
    }
    .pickup-cal-event {
        font-size: 9px;
        padding: 2px 4px;
    }
    .pickup-cal-customer {
        display: none;
    }
}

/* ========== LANDING PAGE ========== */

/* Nav */
.lp-page { min-height: 100vh; background: var(--bg); color: var(--text); }

.lp-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(10,10,11,0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.lp-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lp-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.lp-nav-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #00aa88);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--bg);
    flex-shrink: 0;
}

.lp-nav-logo span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Hero */
.lp-hero {
    padding: 96px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lp-hero-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse at center top, rgba(0,212,170,0.14) 0%, transparent 65%);
    pointer-events: none;
}

.lp-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.lp-eyebrow {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.lp-hero-h {
    font-size: clamp(42px, 7.5vw, 76px);
    font-weight: 700;
    letter-spacing: -2.5px;
    line-height: 1.02;
    margin-bottom: 20px;
}

.lp-accent { color: var(--accent); }

.lp-hero-p {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 540px;
    margin: 0 auto 36px;
}

.lp-hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.lp-stats-bar {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 0;
    margin-bottom: 28px;
}

.lp-stat {
    padding: 0 32px;
    text-align: center;
}

.lp-stat-n {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: -1px;
    line-height: 1;
}

.lp-stat-l {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.lp-stat-sep {
    width: 1px;
    height: 36px;
    background: var(--border);
    flex-shrink: 0;
}

.lp-cats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 13px;
    color: var(--text-dim);
}

.lp-dot { color: var(--border-hover); }

/* Shared section styles */
.lp-section { padding: 88px 24px; }

.lp-section-alt {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.lp-inner { max-width: 1120px; margin: 0 auto; }

.lp-section-h {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.lp-section-p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 52px;
    max-width: 500px;
    line-height: 1.6;
}

#lp-how, #lp-auth { scroll-margin-top: 64px; }

/* Steps */
.lp-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.lp-step {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: border-color var(--transition);
}

.lp-step:hover { border-color: var(--accent-border); }

.lp-step-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.lp-step-ico {
    width: 48px;
    height: 48px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.lp-step-ico svg { width: 24px; height: 24px; }

.lp-step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.lp-step p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

.lp-step-arr {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0.4;
}

.lp-step-arr svg { width: 22px; height: 22px; }

/* Features */
.lp-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lp-feat {
    background: var(--bg-card);
    padding: 28px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: background var(--transition);
}

.lp-feat:hover { background: var(--bg-card-hover); }

.lp-feat-ico {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.lp-feat-ico svg { width: 20px; height: 20px; }

.lp-feat h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.lp-feat p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Auth section */
.lp-auth-section {
    padding: 88px 24px;
    background: radial-gradient(ellipse at 30% 60%, rgba(0,212,170,0.05) 0%, transparent 55%);
}

.lp-auth-inner {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 80px;
    align-items: center;
}

.lp-auth-copy .lp-eyebrow { margin-bottom: 20px; }

.lp-auth-copy h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.15;
}

.lp-auth-copy p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 32px;
}

.lp-check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.lp-check {
    width: 22px;
    height: 22px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Footer */
.lp-footer {
    border-top: 1px solid var(--border);
    padding: 28px 24px;
    background: var(--bg-card);
}

.lp-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lp-footer p {
    font-size: 13px;
    color: var(--text-dim);
}

/* Landing page responsive */
@media (max-width: 1024px) {
    .lp-auth-inner { grid-template-columns: 1fr; gap: 48px; }
    .lp-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .lp-hero { padding: 72px 20px 64px; }
    .lp-hero-h { letter-spacing: -1.5px; }
    .lp-stats-bar { padding: 12px 0; }
    .lp-stat { padding: 0 20px; }
    .lp-stat-n { font-size: 22px; }
    .lp-section { padding: 64px 20px; }
    .lp-steps { flex-direction: column; align-items: stretch; }
    .lp-step-arr { width: auto; height: 36px; transform: rotate(90deg); }
    .lp-footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
    .lp-features { grid-template-columns: 1fr; }
    .lp-hero-ctas { flex-direction: column; }
    .lp-hero-ctas .btn { width: 100%; justify-content: center; }
    .lp-cats { display: none; }
    .lp-stat-sep { display: none; }
    .lp-stats-bar { flex-wrap: wrap; padding: 8px 0; }
    .lp-stat { padding: 8px 16px; }
}
