/**
 * Yoga Foto Station - Uber Design System CSS
 * Precision geometric typography, monochrome luxury, crisp SVG iconography
 */

:root {
    --black: #000000;
    --carbon: #0a0a0a;
    --sidebar-bg: #09090b;
    --sidebar-hover: #18181b;
    --sidebar-active: #27272a;
    --sidebar-border: #1f1f23;
    --sidebar-text: #a1a1aa;
    --sidebar-text-active: #ffffff;
    
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    
    --ink: #0f172a;
    --ink-secondary: #475569;
    --muted: #64748b;
    
    --emerald: #059669;
    --emerald-bg: #ecfdf5;
    --emerald-border: #a7f3d0;
    
    --amber: #d97706;
    --amber-bg: #fffbeb;
    --amber-border: #fde68a;
    
    --red: #dc2626;
    --red-bg: #fef2f2;
    --red-border: #fecaca;

    --blue: #2563eb;
    --blue-bg: #eff6ff;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-modal: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0,0,0,0.2);
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
}

/* App Shell Layout */
.app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar - Uber Obsidian Dark */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 24px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 20px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #000000;
    display: grid;
    place-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255,255,255,0.08);
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #ffffff;
}
.brand-text small {
    display: block;
    color: #71717a;
    font-size: 9px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

.nav-label {
    font-size: 10px;
    color: #52525b;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0 10px 8px;
}

nav#nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--sidebar-text);
    text-align: left;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 11px;
    transition: all 0.15s ease;
}
.nav-item svg {
    color: #71717a;
    transition: color 0.15s ease;
}
.nav-item:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}
.nav-item:hover svg {
    color: #ffffff;
}
.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}
.nav-item.active svg {
    color: #ffffff;
}

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

.admin-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.02);
}
.avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: #27272a;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid #3f3f46;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-info b {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}
.admin-info small {
    display: block;
    color: #71717a;
    font-size: 10px;
}
.logo-btn {
    border: 0;
    background: none;
    color: #a1a1aa;
    text-decoration: underline;
    font-size: 10px;
    cursor: pointer;
}

.signout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #71717a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    margin-top: 6px;
}
.signout-btn:hover {
    color: #ef4444;
}

.version {
    font-size: 10px;
    color: #52525b;
    padding: 6px 8px 0;
}

/* Main Content Area */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* Topbar */
.topbar {
    height: 72px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.topbar-crumb {
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.topbar-crumb span {
    padding: 0 6px;
    color: #cbd5e1;
}
.topbar-crumb b {
    color: var(--ink);
}
.topbar h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--ink);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--ink-secondary);
}

/* Buttons - Uber Clean Design */
.btn {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 9px 15px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active {
    transform: scale(0.98);
}
.btn.primary {
    background: var(--black);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn.primary:hover {
    background: #27272a;
}
.btn.secondary {
    background: #ffffff;
    border-color: var(--border);
    color: var(--ink);
}
.btn.secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.btn.danger {
    background: var(--red-bg);
    border-color: var(--red-border);
    color: var(--red);
}
.btn.danger:hover {
    background: #fee2e2;
}
.btn.whatsapp {
    background: #25d366;
    color: #ffffff;
}
.btn.whatsapp:hover {
    background: #20bd5a;
}
.btn-small {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

/* Scrollable Content Container */
#pageContent.content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 32px 50px;
    scrollbar-gutter: stable;
}
#pageContent.content::-webkit-scrollbar {
    width: 8px;
}
#pageContent.content::-webkit-scrollbar-track {
    background: transparent;
}
#pageContent.content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
#pageContent.content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Section Header */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.section-head h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-head p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

/* Metric Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.metric {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.metric:hover {
    box-shadow: var(--shadow-card);
}
.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.metric-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: #f1f5f9;
    color: var(--ink);
    display: grid;
    place-items: center;
    border: 1px solid var(--border-light);
}
.metric-value {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin: 12px 0 4px;
}
.metric-note {
    font-size: 11px;
    color: var(--muted);
}

/* Colorful Month Summary refinement */
.month-summary {
    gap: 12px;
    margin-bottom: 20px;
}
.month-summary .metric {
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}
.month-summary .metric:nth-child(1) { background: #f8fafc; border-color: #cbd5e1; }
.month-summary .metric:nth-child(2) { background: #f0fdf4; border-color: #bbf7d0; }
.month-summary .metric:nth-child(2) .metric-icon { background: #dcfce7; color: #166534; }
.month-summary .metric:nth-child(3) { background: #eff6ff; border-color: #bfdbfe; }
.month-summary .metric:nth-child(3) .metric-icon { background: #dbeafe; color: #1e40af; }
.month-summary .metric:nth-child(4) { background: #fefce8; border-color: #fef08a; }
.month-summary .metric:nth-child(4) .metric-icon { background: #fef9c3; color: #854d0e; }

/* Panels & Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-subtle);
}
.panel h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--ink);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    margin: 0 -22px;
    padding: 0 22px;
}
table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}
th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--ink);
}
tr:last-child td {
    border-bottom: 0;
}
tr:hover td {
    background: #fbfcfd;
}
.name-cell {
    font-weight: 700;
    color: var(--ink);
}
.nowrap {
    white-space: nowrap;
}
.empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* Status Pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.pill.complete, .pill.paid {
    background: var(--emerald-bg);
    color: var(--emerald);
    border: 1px solid var(--emerald-border);
}
.pill.pending {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}
.pill.overdue, .pill.danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}
.pill.neutral {
    background: #f1f5f9;
    color: var(--ink-secondary);
    border: 1px solid var(--border);
}

/* Progress Bars */
.bar-list {
    display: grid;
    gap: 16px;
}
.bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 50px;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
}
.bar-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: var(--black);
    border-radius: var(--radius-full);
}
.bar-fill.emerald { background: var(--emerald); }
.bar-fill.amber { background: var(--amber); }

/* Filters & Inputs */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}
.filter-input, .filter-select, .field input, .field select, .field textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-input:focus, .filter-select:focus, .field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 1px var(--black);
}
.filters input {
    min-width: 220px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field.full-row {
    grid-column: 1 / -1;
}
.field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}
.field textarea {
    min-height: 80px;
    resize: vertical;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 100;
    animation: fadeIn 0.15s ease-out;
}
.modal {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--border);
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.modal-head h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
}
.xbtn {
    border: 0;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    color: var(--muted);
    display: grid;
    place-items: center;
}
.xbtn:hover {
    background: #e2e8f0;
    color: var(--ink);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

/* Calendar View */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}
.calendar-weekdays {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 8px;
}
.calendar-cell {
    min-height: 110px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    background: #ffffff;
    font-size: 12px;
}
.calendar-cell.blank {
    background: #f8fafc;
    border-style: dashed;
    border-color: #e2e8f0;
}
.calendar-event {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: transform 0.1s ease;
}
.calendar-event:hover {
    transform: translateY(-1px);
}
.calendar-event small {
    display: block;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 2px;
}

.calendar-event.event-wedding { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.calendar-event.event-engagement { background: #faf5ff; border-color: #e9d5ff; color: #6b21a8; }
.calendar-event.event-birthday { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.calendar-event.event-baby { background: #f0fdfa; border-color: #99f6e4; color: #115e59; }
.calendar-event.event-ceremony { background: #fefce8; border-color: #fef08a; color: #854d0e; }
.calendar-event.event-other { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }

/* Workflow Pipeline Cards */
.workflow-pipeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.workflow-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.workflow-card .step-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--muted);
}
.workflow-card select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    background: #fbfcfd;
}

/* Toast Notifications */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: var(--black);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Login View */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #000000;
    padding: 20px;
}
.login-card {
    background: #ffffff;
    padding: 40px;
    border-radius: var(--radius-lg);
    width: min(400px, 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.login-card h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.login-card .eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--muted);
}
.login-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}
.login-card input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
}

/* Utilities */
.hidden { display: none !important; }
.positive { color: var(--emerald) !important; font-weight: 700; }
.negative { color: var(--red) !important; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.link-btn {
    border: 0;
    background: none;
    color: var(--black);
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}
.link-btn:hover {
    text-decoration: underline;
}
.danger-text { color: var(--red) !important; }

/* Cropper styling */
.logo-crop-wrap { display: grid; gap: 12px; }
.logo-crop-stage {
    width: min(100%, 480px);
    height: 320px;
    margin: 0 auto;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.logo-crop-stage img { max-width: 100%; max-height: 100%; display: block; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .sidebar { width: 210px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
    .workflow-pipeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--sidebar-border); }
    .nav-label, .sidebar-bottom { display: none; }
    nav#nav { flex-direction: row; overflow-x: auto; gap: 6px; }
    .nav-item { white-space: nowrap; width: auto; padding: 8px 12px; }
    .topbar { height: auto; padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
    #pageContent.content { padding: 16px; }
    .cards { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .workflow-pipeline { grid-template-columns: 1fr; }
}
