/* ═══════════════════════════════════════════════════
   365HALLOWEEN — Client Dashboard CSS
   ═══════════════════════════════════════════════════ */

/* ── Auth Gate ── */
.auth-gate {
    position: fixed; inset: 0; background: #0a0a0f; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.auth-spinner {
    width: 32px; height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spinDash 0.7s linear infinite;
}
@keyframes spinDash { to { transform: rotate(360deg); } }

/* ── Client Topbar ── */
.client-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
}

.topbar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px;
}

.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-logo { height: 36px; }
.topbar-title {
    font-family: 'Orbitron', monospace; font-size: 0.7rem;
    font-weight: 700; letter-spacing: 0.15em; color: #8b5cf6;
}
.topbar-sub { font-size: 0.72rem; color: #6b6760; }

.topbar-actions { display: flex; gap: 6px; }

.topbar-btn {
    font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600;
    color: #a09c94; padding: 8px 16px; border-radius: 8px;
    border: 1px solid transparent; background: none;
    cursor: pointer; transition: 0.3s ease; text-decoration: none;
}
.topbar-btn:hover { background: rgba(255, 255, 255, 0.05); color: #f0ece4; }
.topbar-btn.active {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}
.topbar-logout { color: #ef4444; }
.topbar-logout:hover { background: rgba(239, 68, 68, 0.1); }

/* ── Client Sections ── */
.client-section { padding-top: 80px; min-height: 100vh; }

/* ── Dashboard ── */
.dash-header { text-align: center; margin-bottom: 40px; }
.dash-title {
    font-family: 'Creepster', cursive; font-size: 2.4rem;
    color: #ff6a00; margin-bottom: 6px;
    text-shadow: 0 0 30px rgba(255, 106, 0, 0.3);
}
.dash-subtitle { font-size: 0.95rem; color: #6b6760; }

.dash-loading { text-align: center; padding: 60px; color: #6b6760; }
.dash-loading .auth-spinner { margin: 0 auto 16px; }

.dash-empty { text-align: center; padding: 80px 20px; }
.dash-empty-icon { font-size: 3rem; margin-bottom: 16px; }

/* ── Overview Cards ── */
.dash-overview {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
    margin-bottom: 24px;
}

.dash-card {
    background: #16161f; border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px; padding: 28px; text-align: center;
}

.dash-card-label {
    font-family: 'Orbitron', monospace; font-size: 0.6rem;
    font-weight: 700; letter-spacing: 0.15em; color: #6b6760;
    margin-bottom: 12px;
}

.dash-card-value {
    font-family: 'Orbitron', monospace; font-size: 2rem;
    font-weight: 900; color: #f0ece4; line-height: 1;
    margin-bottom: 6px;
}

.dash-card-sub { font-size: 0.78rem; color: #6b6760; }

.dash-card-progress { position: relative; }

.dash-progress-ring { width: 120px; height: 120px; margin: 0 auto 12px; position: relative; }
.progress-svg { width: 100%; height: 100%; }
.progress-circle { transition: stroke-dashoffset 1s ease; }
.progress-pct {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', monospace; font-size: 1.6rem; font-weight: 900; color: #f0ece4;
}

/* ── Status Bar ── */
.dash-status-bar {
    display: flex; height: 8px; border-radius: 4px; overflow: hidden;
    background: rgba(255, 255, 255, 0.04); margin-bottom: 12px;
}
.dash-status-seg { transition: width 0.5s ease; }

.dash-status-legend {
    display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px;
    justify-content: center;
}
.dash-legend-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: #a09c94;
}
.dash-legend-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* ── Section Title ── */
.dash-section-title {
    font-family: 'Orbitron', monospace; font-size: 0.8rem;
    font-weight: 700; letter-spacing: 0.12em; color: #a09c94;
    margin-bottom: 16px;
}

/* ── Room Progress ── */
.dash-room {
    background: #16161f; border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px; padding: 20px; margin-bottom: 12px;
}

.dash-room-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.dash-room-name {
    font-family: 'Orbitron', monospace; font-size: 0.7rem;
    font-weight: 700; letter-spacing: 0.1em; color: #f0ece4;
}
.dash-room-pct { font-size: 0.75rem; color: #6b6760; }

.dash-room-bar {
    height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.04);
    margin-bottom: 14px; overflow: hidden;
}
.dash-room-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #ff6a00, #22c55e);
    transition: width 0.5s ease;
}

.dash-prop-list { display: flex; flex-direction: column; gap: 6px; }

.dash-prop {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: 0.25s ease;
}
.dash-prop:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.dash-prop-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.dash-prop-thumb {
    width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
    overflow: hidden; background: rgba(255, 255, 255, 0.04);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.dash-prop-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}
.dash-prop-thumb-empty {
    font-size: 1.3rem;
}
.dash-thumb-count {
    position: absolute; bottom: 2px; right: 2px;
    font-size: 0.5rem; color: #fff; background: rgba(0,0,0,0.7);
    padding: 1px 4px; border-radius: 3px; line-height: 1;
}

.dash-prop-name { font-size: 0.88rem; font-weight: 600; color: #f0ece4; }

.dash-prop-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.dash-prop-builder { font-size: 0.75rem; color: #6b6760; }

.dash-prop-badge {
    font-family: 'Orbitron', monospace; font-size: 0.55rem;
    font-weight: 700; letter-spacing: 0.08em;
    padding: 4px 10px; border-radius: 6px;
}

.dash-prop-arrow {
    color: #6b6760; font-size: 0.8rem; transition: 0.2s;
}
.dash-prop:hover .dash-prop-arrow {
    color: #8b5cf6; transform: translateX(3px);
}

/* ══════════ Prop Detail Modal ══════════ */
.prop-detail-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeInOverlay 0.2s ease;
}
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }

.prop-detail-modal {
    background: #111118; border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px; width: 100%; max-width: 680px;
    max-height: 90vh; overflow-y: auto; position: relative;
    padding: 32px; animation: slideUpModal 0.3s ease;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}
@keyframes slideUpModal { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.prop-detail-modal::-webkit-scrollbar { width: 6px; }
.prop-detail-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.prop-detail-close {
    position: sticky; top: 0; float: right;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 8px 14px; color: #f0ece4;
    cursor: pointer; font-size: 0.9rem; z-index: 2; transition: 0.2s;
}
.prop-detail-close:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.prop-detail-header { margin-bottom: 24px; }

.prop-detail-name {
    font-family: 'Creepster', cursive; font-size: 1.6rem;
    color: #ff6a00; margin-bottom: 8px;
}

.prop-detail-meta-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}

/* ── Photo Gallery ── */
.prop-detail-section { margin-bottom: 24px; }

.prop-detail-section-title {
    font-family: 'Orbitron', monospace; font-size: 0.65rem;
    font-weight: 700; letter-spacing: 0.12em; color: #a09c94;
    margin-bottom: 12px; text-transform: uppercase;
}

.prop-detail-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.prop-gallery-thumb {
    aspect-ratio: 1; border-radius: 10px; overflow: hidden;
    cursor: pointer; border: 2px solid transparent;
    transition: 0.25s ease;
}
.prop-gallery-thumb:hover {
    border-color: #8b5cf6; transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}
.prop-gallery-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}

/* ── Lightbox ── */
.client-lightbox {
    position: fixed; inset: 0; z-index: 20000;
    background: rgba(0, 0, 0, 0.95); display: flex;
    align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.client-lightbox.open { opacity: 1; pointer-events: auto; }
.client-lightbox img {
    max-width: 90vw; max-height: 90vh; object-fit: contain;
    border-radius: 8px; box-shadow: 0 10px 60px rgba(0,0,0,0.8);
}

/* ── Parts List ── */
.prop-detail-parts {
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px; overflow: hidden;
}
.prop-part-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; font-size: 0.85rem; color: #f0ece4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.prop-part-row:last-child { border-bottom: none; }

/* ── Per-Prop Notes ── */
.prop-note-input-wrap {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.prop-note-input {
    flex: 1; background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px; padding: 10px 14px; color: #f0ece4;
    font-family: 'Inter', sans-serif; font-size: 0.88rem; outline: none;
}
.prop-note-input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}
.prop-note-add {
    padding: 10px 20px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff; font-weight: 700; font-size: 0.82rem;
    cursor: pointer; white-space: nowrap; transition: 0.2s;
}
.prop-note-add:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); }

/* ══════════ Notes Section ══════════ */
.notes-input-wrap {
    display: flex; gap: 12px; margin-bottom: 24px; align-items: flex-end;
}

.notes-input {
    flex: 1; background: #16161f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px; padding: 14px 16px; color: #f0ece4;
    font-family: 'Inter', sans-serif; font-size: 0.95rem;
    resize: vertical; outline: none;
}
.notes-input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.notes-add-btn {
    padding: 14px 28px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: 0.3s ease; white-space: nowrap;
}
.notes-add-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3); }

.notes-empty { color: #6b6760; text-align: center; padding: 40px; }

.note-item {
    background: #16161f; border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px; padding: 16px 20px; margin-bottom: 10px;
}

.note-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 8px;
}

.note-author {
    font-size: 0.78rem; font-weight: 700; color: #8b5cf6;
}
.note-date { font-size: 0.72rem; color: #6b6760; flex: 1; }
.note-delete {
    background: none; border: none; color: #6b6760; cursor: pointer;
    font-size: 0.8rem; padding: 2px 6px; border-radius: 4px;
    transition: 0.2s;
}
.note-delete:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

.note-text { font-size: 0.92rem; color: #a09c94; line-height: 1.6; white-space: pre-wrap; }

/* ══════════ Responsive ══════════ */
@media (max-width: 768px) {
    .topbar-inner { flex-direction: column; gap: 8px; }
    .topbar-actions { flex-wrap: wrap; justify-content: center; }
    .dash-overview { grid-template-columns: 1fr; }
    .dash-prop { flex-direction: row; }
    .dash-prop-left { min-width: 0; overflow: hidden; }
    .dash-prop-meta { gap: 6px; }
    .dash-prop-builder { display: none; }
    .notes-input-wrap { flex-direction: column; }

    .prop-detail-overlay { padding: 10px; align-items: flex-start; padding-top: 5vh; }
    .prop-detail-modal { padding: 20px; max-height: 88vh; border-radius: 14px; }
    .prop-detail-name { font-size: 1.3rem; }
    .prop-detail-gallery { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .prop-note-input-wrap { flex-direction: column; }
}
