/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
    --sidebar-width: 220px;
    --bottom-nav-height: 60px;
    --mobile-header-height: 56px;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #fff;
    color: #18181b;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: #fff;
    border-right: 1px solid #f0f0f0;
    z-index: 200;
    display: none;
    flex-direction: column;
}

@media (min-width: 768px) {
    .sidebar { display: flex; }
    .main-content { margin-left: var(--sidebar-width); }
}

.sidebar-brand {
    padding: 20px 20px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #18181b;
    letter-spacing: -0.3px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav {
    padding: 10px 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #71717a;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    margin-bottom: 2px;
}

.sidebar-link i {
    font-size: 16px;
}

.sidebar-link:hover {
    background: #f8f8f8;
    color: #18181b;
}

.sidebar-link.active {
    background: #18181b;
    color: #fff;
}

.sidebar-footer {
    padding: 12px 10px 16px;
    border-top: 1px solid #f0f0f0;
}

.sidebar-user-info {
    padding: 4px 12px 8px;
}

.sidebar-user-name {
    font-size: 12px;
    font-weight: 500;
    color: #52525b;
}

.sidebar-user-email {
    font-size: 11px;
    color: #a1a1aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Mobile header ── */
.mobile-header {
    height: var(--mobile-header-height);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f0f0f0;
    z-index: 100;
    padding: 0 16px;
    gap: 10px;
}

.mobile-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #18181b;
    letter-spacing: -0.3px;
}

.mobile-back-btn,
.mobile-action-btn {
    color: #71717a;
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.mobile-back-btn:hover,
.mobile-action-btn:hover {
    color: #18181b;
}

/* ── Main content ── */
.main-content {
    min-height: 100vh;
}

.desktop-page-header {
    padding: 24px 32px;
    border-bottom: 1px solid #f0f0f0;
}

.desktop-back-btn {
    color: #a1a1aa;
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.desktop-back-btn:hover { color: #18181b; }

.page-heading {
    font-size: 18px;
    font-weight: 600;
    color: #18181b;
}

.page-body {
    padding: 24px 16px;
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

@media (min-width: 768px) {
    .page-body {
        padding: 28px 32px 40px;
    }
}

/* ── Bottom nav ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #f0f0f0;
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #a1a1aa;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.1s;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active {
    color: #18181b;
}

/* ── Stat card ── */
.stat-card {
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}

.stat-value {
    font-family: 'DM Mono', monospace;
    font-size: 24px;
    font-weight: 500;
    color: #18181b;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ── Bar chart ── */
.bar-chart-wrap {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 112px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    background: #18181b;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
}

.bar.empty {
    background: #f4f4f5;
}

.bar-label {
    font-size: 9px;
    color: #a1a1aa;
    white-space: nowrap;
}

/* ── Project dot ── */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-sm {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ── User avatar ── */
.avatar {
    background: #18181b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-sm  { width: 32px; height: 32px; font-size: 13px; }
.avatar-md  { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 18px; }

/* ── Card list item ── */
.list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s, background 0.12s;
}

.list-item:hover {
    border-color: #e4e4e7;
    background: #fafafa;
    color: inherit;
}

/* ── Entry row ── */
.entry-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #fafafa;
}

.entry-date {
    font-size: 11px;
    color: #a1a1aa;
    width: 90px;
    flex-shrink: 0;
}

.entry-project {
    font-size: 12px;
    color: #52525b;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-note {
    font-size: 11px;
    color: #a1a1aa;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

@media (min-width: 768px) {
    .entry-note { display: block; }
}

.entry-hours {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #18181b;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Section label ── */
.section-label {
    font-size: 10px;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

/* ── Project accordion ── */
details.project-item {
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 8px;
}

details.project-item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    background: #fff;
    transition: background 0.1s;
}

details.project-item summary:hover {
    background: #fafafa;
}

details.project-item summary::-webkit-details-marker { display: none; }

.project-chevron {
    transition: transform 0.2s;
    color: #d4d4d8;
}

details.project-item[open] .project-chevron {
    transform: rotate(180deg);
}

.project-detail-body {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px 16px;
}

/* ── Form controls ── */
.form-label-sm {
    font-size: 11px;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    display: block;
}

.form-control, .form-select {
    font-size: 14px;
    border-color: #e4e4e7;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Outfit', sans-serif;
}

.form-control:focus, .form-select:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24,24,27,0.08);
}

.form-hint {
    font-size: 11px;
    color: #a1a1aa;
    margin-top: 5px;
}

/* ── Buttons ── */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    border-radius: 10px;
}

.btn-dark {
    background: #18181b;
    border-color: #18181b;
}

.btn-dark:hover {
    background: #3f3f46;
    border-color: #3f3f46;
}

/* ── Color picker ── */
.color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ── Auth pages ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #fff;
}

.auth-card {
    width: 100%;
    max-width: 360px;
}

.auth-title {
    font-size: 22px;
    font-weight: 600;
    color: #18181b;
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 14px;
    color: #a1a1aa;
    margin-bottom: 28px;
}

/* ── Mono numbers ── */
.mono {
    font-family: 'DM Mono', monospace;
}

/* ── Temp badge ── */
.badge-temp {
    font-size: 10px;
    font-weight: 500;
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
    padding: 2px 6px;
    border-radius: 6px;
}

/* ── Profile menu rows ── */
.menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #3f3f46;
    transition: background 0.1s;
    margin-bottom: 8px;
}

.menu-row:hover {
    background: #fafafa;
    color: #18181b;
}

.menu-row.danger {
    color: #ef4444;
}

.menu-row.danger:hover {
    background: #fef2f2;
}

/* ── Dismiss alert ── */
.alert {
    border-radius: 12px;
    font-size: 13px;
}

/* ── Demo credentials box ── */
.demo-box {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 28px;
}

.demo-box-label {
    font-size: 10px;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.demo-cred {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #71717a;
    margin-bottom: 3px;
}
