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

:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;
}

/* ============================================
   THEME: Dubai - HARD WORK. NO EXCUSES.
   Black & white. Bold. Aggressive. Results only.
   ============================================ */
[data-theme="dubai"] {
    --background: 0 0% 0%;
    --foreground: 0 0% 100%;
    --card: 0 0% 5%;
    --card-foreground: 0 0% 100%;
    --primary: 0 0% 100%;
    --primary-foreground: 0 0% 0%;
    --secondary: 0 0% 10%;
    --secondary-foreground: 0 0% 100%;
    --muted: 0 0% 8%;
    --muted-foreground: 0 0% 60%;
    --accent: 0 0% 100%;
    --accent-foreground: 0 0% 0%;
    --destructive: 0 100% 50%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 20%;
    --input: 0 0% 8%;
    --ring: 0 0% 100%;
    --radius: 0;
}

[data-theme="dubai"] body {
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    background: black;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

[data-theme="dubai"] h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: white;
}

[data-theme="dubai"] h2 {
    font-weight: 900;
    letter-spacing: 0.1em;
    color: white;
}

[data-theme="dubai"] .timer-section,
[data-theme="dubai"] .analytics-section,
[data-theme="dubai"] .projects-form {
    border: 3px solid white;
    box-shadow: none;
    background: black;
}

[data-theme="dubai"] .tasks-section {
    border: none;
    box-shadow: none;
    background: black;
}

[data-theme="dubai"] .btn,
[data-theme="dubai"] .btn-logout,
[data-theme="dubai"] .btn-theme,
[data-theme="dubai"] .debug-link {
    background: black;
    color: white;
    border: 2px solid white;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0;
}

[data-theme="dubai"] .btn:hover,
[data-theme="dubai"] .btn-logout:hover,
[data-theme="dubai"] .btn-theme:hover,
[data-theme="dubai"] .debug-link:hover {
    background: white;
    color: black;
}

[data-theme="dubai"] .btn-start {
    background: white;
    color: black;
    font-weight: 900;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    letter-spacing: 0.15em;
}

[data-theme="dubai"] .btn-start:hover {
    background: hsl(120 100% 50%);
    border-color: hsl(120 100% 50%);
    color: black;
}

[data-theme="dubai"] .btn-stop {
    background: black;
    color: white;
    border: 2px solid white;
}

[data-theme="dubai"] .btn-stop:hover {
    background: hsl(0 100% 50%);
    border-color: hsl(0 100% 50%);
    color: white;
}

[data-theme="dubai"] .btn-complete {
    background: black;
    color: white;
    border: 2px solid white;
}

[data-theme="dubai"] .btn-complete:hover {
    background: white;
    color: black;
}

[data-theme="dubai"] .btn-icon {
    background: black;
    border: none;
    border-radius: 0;
}

[data-theme="dubai"] .btn-icon:hover {
    background: hsl(0 0% 20%);
}

[data-theme="dubai"] #timerDisplay {
    font-size: 4.5rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.1em;
}

[data-theme="dubai"] #taskInput {
    background: black;
    border: 2px solid white;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="dubai"] #taskInput::placeholder {
    color: hsl(0 0% 40%);
    text-transform: uppercase;
}

[data-theme="dubai"] table {
    border: 2px solid white;
}

[data-theme="dubai"] th {
    background: white;
    color: black;
    font-weight: 900;
    letter-spacing: 0.1em;
    border-bottom: 3px solid white;
}

[data-theme="dubai"] td {
    color: white;
    font-weight: 700;
    border-bottom: none;
}

[data-theme="dubai"] tbody tr {
    border-bottom: 1px solid hsl(0 0% 20%);
}

[data-theme="dubai"] tbody tr.task-completed {
    background: black;
    border-left: none;
}

[data-theme="dubai"] tbody tr.task-completed td {
    color: hsl(0 0% 50%);
}

[data-theme="dubai"] .tasks-section .section-header {
    padding: 0;
    margin: 0 0 0.75rem 0;
}

[data-theme="dubai"] tbody tr:hover {
    background: hsl(0 0% 10%);
}

[data-theme="dubai"] .today-total-card {
    border: 3px solid white;
    background: black;
    font-weight: 900;
    letter-spacing: 0.1em;
}

[data-theme="dubai"] .status-dropdown {
    background: black;
    color: white;
    border: 2px solid white;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0;
}

[data-theme="dubai"] .analytics-switch {
    border: 2px solid white;
    border-radius: 0;
    background: black;
}

[data-theme="dubai"] .switch-option {
    color: white;
    font-weight: 900;
    border-radius: 0;
}

[data-theme="dubai"] .switch-option.active {
    background: white;
    color: black;
}

[data-theme="dubai"] .section-header .debug-link {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
}

[data-theme="dubai"] input[type="text"],
[data-theme="dubai"] .project-field-group input[type="text"] {
    background: black;
    border: 1px solid #333333;
    color: white;
    border-radius: 0;
}

[data-theme="dubai"] input[type="color"],
[data-theme="dubai"] .project-field-color input[type="color"] {
    background: black;
    border: 1px solid #333333;
    border-radius: 0;
}

[data-theme="dubai"] .projects-instructions {
    color: hsl(0 0% 60%);
    text-transform: none;
    font-weight: 400;
}

[data-theme="dubai"] label {
    color: white;
    font-weight: 700;
}

[data-theme="dubai"] .projects-form h2,
[data-theme="dubai"] .tasks-section h2 {
    margin-bottom: 1rem;
}

[data-theme="dubai"] .projects-form .project-field-group input,
[data-theme="dubai"] .projects-form .project-submit {
    height: 42px;
}

[data-theme="dubai"] .projects-list {
    margin-top: 0;
}

[data-theme="dubai"] .pagination-controls {
    margin-bottom: 1rem;
}

/* ============================================
   THEME: A - Ultra Minimal Private Software
   Monospace. Lowercase. Bold = hierarchy.
   ============================================ */
[data-theme="a"] {
    --background: 0 0% 100%;
    --foreground: 0 0% 0%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 0%;
    --primary: 0 0% 0%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 98%;
    --secondary-foreground: 0 0% 0%;
    --muted: 0 0% 98%;
    --muted-foreground: 0 0% 50%;
    --accent: 0 0% 0%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 0% 30%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 88%;
    --input: 0 0% 98%;
    --ring: 0 0% 0%;
    --radius: 0px;
}

[data-theme="a"] body {
    font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: lowercase;
}

[data-theme="a"] h1 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0;
}

[data-theme="a"] h2 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: lowercase;
}

[data-theme="a"] .timer-section,
[data-theme="a"] .analytics-section,
[data-theme="a"] .projects-form {
    border: 1px solid hsl(0 0% 88%);
    box-shadow: none;
    background: white;
}

[data-theme="a"] .tasks-section {
    border: none;
    box-shadow: none;
    background: white;
}

[data-theme="a"] .btn,
[data-theme="a"] .btn-logout,
[data-theme="a"] .btn-theme,
[data-theme="a"] .debug-link {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: lowercase;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid hsl(0 0% 80%);
    background: white;
    color: black;
    padding: 0.4rem 0.75rem;
}

[data-theme="a"] .btn:hover,
[data-theme="a"] .btn-logout:hover,
[data-theme="a"] .btn-theme:hover,
[data-theme="a"] .debug-link:hover {
    background: white;
    color: black;
    border-color: black;
}

[data-theme="a"] .btn-start {
    background: black;
    color: white;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
}

[data-theme="a"] .btn-start:hover {
    background: hsl(0 0% 20%);
    color: white;
}

[data-theme="a"] .btn-stop,
[data-theme="a"] .btn-complete {
    background: white;
    color: black;
    border: 1px solid black;
}

[data-theme="a"] .btn-stop:hover,
[data-theme="a"] .btn-complete:hover {
    background: black;
    color: white;
}

[data-theme="a"] .btn-icon {
    font-size: 0.875rem;
    padding: 0.3rem 0.5rem;
    background: white;
    border: 1px solid hsl(0 0% 80%);
    border-radius: 0;
}

[data-theme="a"] .btn-icon:hover {
    border-color: black;
    background: white;
}

[data-theme="a"] #timerDisplay {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: "SF Mono", monospace;
}

[data-theme="a"] #taskInput {
    font-size: 0.8125rem;
    text-transform: lowercase;
    border: 1px solid hsl(0 0% 85%);
    border-radius: 0;
}

[data-theme="a"] table {
    border: 1px solid hsl(0 0% 88%);
    box-shadow: none;
}

[data-theme="a"] th {
    font-weight: 700;
    text-transform: lowercase;
    background: hsl(0 0% 97%);
    font-size: 0.75rem;
    padding: 0.625rem 1rem;
}

[data-theme="a"] td {
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
}

[data-theme="a"] .today-total-card {
    border: 1px solid hsl(0 0% 88%);
    box-shadow: none;
    font-weight: 700;
    font-size: 0.8125rem;
}

[data-theme="a"] .status-dropdown {
    font-size: 0.75rem;
    text-transform: lowercase;
    border: 1px solid hsl(0 0% 80%);
    border-radius: 0;
    padding: 0.35rem 0.5rem;
}

[data-theme="a"] .analytics-switch {
    border: 1px solid hsl(0 0% 85%);
    border-radius: 0;
}

[data-theme="a"] .switch-option {
    font-size: 0.75rem;
    text-transform: lowercase;
    border-radius: 0;
}

[data-theme="a"] .switch-option.active {
    background: black;
    color: white;
}

[data-theme="a"] input[type="text"],
[data-theme="a"] .project-field-group input[type="text"],
[data-theme="a"] input[type="color"],
[data-theme="a"] .project-field-color input[type="color"] {
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 0.8125rem;
}

[data-theme="a"] .projects-instructions {
    font-size: 0.75rem;
    color: hsl(0 0% 50%);
}

[data-theme="a"] label {
    font-size: 0.6875rem;
    font-weight: 700;
}

[data-theme="a"] .tasks-section .section-header {
    padding: 0;
    margin: 0 0 0.75rem 0;
}

[data-theme="a"] .projects-form h2 {
    margin-bottom: 1rem;
}

[data-theme="a"] tbody tr.task-completed {
    border-left: none;
}

[data-theme="a"] .projects-form .project-field-group input,
[data-theme="a"] .projects-form .project-submit {
    height: 42px;
}

[data-theme="a"] .projects-list {
    margin-top: 0;
}

[data-theme="a"] .pagination-controls {
    margin-bottom: 1rem;
}

/* ============================================
   THEME SWITCHER BUTTONS
   ============================================ */
.theme-switcher {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.75rem;
}

.btn-theme {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-theme:hover {
    background: #f5f5f5;
    color: #333;
}

.btn-theme.active {
    background: #1a1a2e;
    color: white;
    border-color: #1a1a2e;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    padding: 2rem;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-center {
    display: flex;
    justify-content: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0;
    color: hsl(var(--foreground));
}

.btn-logout {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border-color: hsl(var(--destructive));
}

.today-total-card {
    min-width: 180px;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.4);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    box-shadow:
        0 1px 3px rgb(0 0 0 / 0.08),
        0 1px 2px rgb(0 0 0 / 0.04);
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

/* Timer Section */
.timer-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 1px 3px 0 rgb(0 0 0 / 0.1),
        0 1px 2px -1px rgb(0 0 0 / 0.1);
}

#taskInput {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: all 0.2s;
}

#taskInput:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.1);
}

#taskInput:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

#timerDisplay {
    font-size: 3.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}

.timer-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.btn-start {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-start:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-stop {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-stop:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-complete {
    background: hsl(142 76% 36%);
    color: white;
}

.btn-complete:hover:not(:disabled) {
    background: hsl(142 76% 32%);
}

.btn-action {
    padding: 0.375rem 0.75rem;
    font-size: 0.813rem;
    margin-right: 0.25rem;
}

.btn-icon {
    padding: 0.25rem 0.4rem;
    font-size: 1rem;
    line-height: 1;
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-icon:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--ring));
}

.btn-icon-danger:hover {
    background: hsl(var(--destructive));
    border-color: hsl(var(--destructive));
}

.actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.btn-resume {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-resume:hover {
    opacity: 0.9;
}

.btn-edit {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
}

.btn-edit:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-delete {
    background: transparent;
    color: hsl(var(--destructive));
    border: 1px solid hsl(var(--border));
}

.btn-delete:hover {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

/* Tasks Table */
.tasks-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.section-header h2 {
    margin-bottom: 0;
}

.header-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.debug-link {
    font-size: 1rem;
    color: hsl(var(--primary));
    text-decoration: none;
    opacity: 1;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 0.5rem;
    background: hsl(var(--muted));
    border-radius: 4px;
}

.debug-link:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* Analytics */
.analytics-section {
    margin-top: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow:
        0 20px 25px -5px rgb(0 0 0 / 0.1),
        0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.analytics-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.analytics-actions .btn-analytics {
    white-space: nowrap;
}

.analytics-header h2 {
    margin-bottom: 0.25rem;
}

.analytics-subtitle {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
}

.analytics-content {
    margin-top: 1.25rem;
    transition: all 0.3s ease;
}

.analytics-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    margin-top: 0;
}

.btn-analytics {
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
}

.btn-analytics:hover {
    border-color: hsl(var(--ring));
}

.analytics-switch {
    display: inline-flex;
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    overflow: hidden;
    background: hsl(var(--muted));
}

.switch-option {
    border: none;
    background: transparent;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    transition: background 0.2s ease;
}

.switch-option.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* Daily Summary */
.daily-summary {
    margin: 1rem 0 0.5rem 0;
    background: hsl(var(--muted) / 0.3);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.75rem 1rem;
    font-size: 0.813rem;
}

.daily-summary-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.813rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.daily-summary-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
}

.daily-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.daily-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.daily-summary-date {
    font-size: 0.813rem;
    color: hsl(var(--muted-foreground));
    font-weight: 400;
}

.daily-summary-time {
    font-size: 0.813rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    font-variant-numeric: tabular-nums;
}

.daily-summary-empty {
    font-size: 0.813rem;
    color: hsl(var(--muted-foreground));
    margin: 0.25rem 0;
}

.daily-summary-chart-wrapper {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid hsl(var(--border));
    align-items: flex-end;
}

.daily-summary-chart {
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.daily-summary-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: var(--chart-height, 180px);
    min-height: var(--chart-height, 180px);
    padding-bottom: 0.5rem;
    background-image: repeating-linear-gradient(
        to top,
        hsl(var(--border) / 0.8),
        hsl(var(--border) / 0.8) 1px,
        transparent 1px,
        transparent var(--chart-grid-step, 24px)
    );
    width: 100%;
}

.daily-summary-chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 1.5rem;
    flex: 1 1 1.5rem;
}

.daily-summary-chart-fill {
    width: 100%;
    min-height: 0;
    border-radius: 6px 6px 0 0;
    background-image: repeating-linear-gradient(
        to top,
        hsl(var(--primary)),
        hsl(var(--primary)) 6px,
        hsl(var(--primary) / 0.85) 6px,
        hsl(var(--primary) / 0.85) 12px
    );
    transition: height 0.25s ease;
    height: var(--bar-height, 0px);
}

.daily-summary-chart-bar-goal .daily-summary-chart-fill {
    background-image: repeating-linear-gradient(
        to top,
        hsl(142 76% 36%),
        hsl(142 76% 36%) 6px,
        hsl(142 70% 45%) 6px,
        hsl(142 70% 45%) 12px
    );
}

.daily-summary-chart-bar-empty .daily-summary-chart-fill {
    background: transparent;
    border: 1px dashed hsl(var(--border));
    border-radius: 6px;
    height: 8px;
}

.daily-summary-chart-label-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding-top: 0.25rem;
    width: 100%;
}

.daily-summary-chart-label {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
    min-width: 1.5rem;
    text-align: center;
    flex: 1 1 1.5rem;
}

.daily-summary-chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: var(--chart-height, 180px);
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
}

.daily-summary-chart-axis-left {
    align-items: flex-end;
    text-align: right;
    padding-right: 0.25rem;
}

.daily-summary-chart-axis-right {
    align-items: flex-start;
    text-align: left;
    padding-left: 0.25rem;
}

.daily-summary-chart-axis-row {
    line-height: 1;
}

.daily-summary-chart-legend {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.project-chart-title {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.project-chart-wrapper {
    margin-top: 0.75rem;
}

.project-chart .daily-summary-chart-bars {
    background-image: none;
}

.project-chart-bar {
    display: flex;
    align-items: flex-end;
    min-width: 1.5rem;
    flex: 1 1 1.5rem;
}

.project-chart-stack {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    width: 100%;
    height: 100%;
}

.project-chart-segment {
    width: 100%;
    border-radius: 4px 4px 0 0;
    height: var(--segment-height, 6px);
    background: var(--segment-color, #000);
}

.project-chart-segment-empty {
    border: 1px dashed hsl(var(--border));
    border-radius: 4px;
    height: 8px;
    background: transparent;
}

.project-chart-bar-empty {
    opacity: 0.4;
}

.project-legend {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.project-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    background: hsl(var(--muted) / 0.5);
}

.project-legend-color {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: var(--project-color, #000);
    border: 1px solid hsl(var(--border));
}

.project-legend-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.project-legend-time {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
}

/* ============================================
   CALENDAR VIEW
   ============================================ */
.calendar-view-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}

.calendar-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.calendar-view-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.calendar-view-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-week-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    min-width: 160px;
    text-align: center;
}

.calendar-today-btn {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
}

.calendar-grid-container {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 0;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    background: hsl(var(--card));
}

.calendar-hour-labels {
    display: flex;
    flex-direction: column;
    border-right: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
}

.calendar-hour-label {
    height: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0.25rem 0.5rem 0 0;
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
}

.calendar-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
    min-width: 560px;
}

.calendar-day-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-right: 1px solid hsl(var(--border) / 0.5);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-day-header.calendar-day-today {
    background: hsl(var(--primary) / 0.1);
}

.calendar-day-name {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day-date {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-top: 0.125rem;
}

.calendar-day-today .calendar-day-date {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
}

.calendar-day-total {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: hsl(var(--primary));
    margin-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.calendar-body {
    position: relative;
    min-width: 560px;
    height: calc(48px * 24);
}

.calendar-hour-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.calendar-hour-row {
    height: 48px;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.calendar-hour-row:last-child {
    border-bottom: none;
}

.calendar-day-columns {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-column {
    position: relative;
    border-right: 1px solid hsl(var(--border) / 0.5);
}

.calendar-day-column:last-child {
    border-right: none;
}

.calendar-event {
    position: absolute;
    top: var(--event-top, 0);
    left: calc(var(--event-left, 0) + 2px);
    width: calc(var(--event-width, 100%) - 4px);
    height: var(--event-height, 0);
    min-height: 20px;
    background: var(--event-color, #000);
    border-radius: 4px;
    padding: 0.25rem 0.375rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
    z-index: 1;
}

.calendar-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.15);
    z-index: 10;
}

.calendar-event-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-time {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.125rem;
}

/* Calendar View - Theme: Dubai */
[data-theme="dubai"] .calendar-grid-container {
    border: 2px solid white;
}

[data-theme="dubai"] .calendar-hour-labels,
[data-theme="dubai"] .calendar-day-headers {
    background: black;
}

[data-theme="dubai"] .calendar-day-header.calendar-day-today {
    background: hsl(0 0% 15%);
}

[data-theme="dubai"] .calendar-day-today .calendar-day-date {
    background: white;
    color: black;
}

[data-theme="dubai"] .calendar-event {
    border-radius: 0;
}

[data-theme="dubai"] .calendar-view-title {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

[data-theme="dubai"] .calendar-day-total {
    color: white;
}

/* Calendar View - Theme: A */
[data-theme="a"] .calendar-grid-container {
    border: 1px solid hsl(0 0% 88%);
}

[data-theme="a"] .calendar-event {
    border-radius: 0;
}

[data-theme="a"] .calendar-event-title,
[data-theme="a"] .calendar-event-time {
    text-transform: lowercase;
}

[data-theme="a"] .calendar-view-title {
    text-transform: lowercase;
}

[data-theme="a"] .calendar-day-name {
    text-transform: lowercase;
}

/* Calendar View - Responsive */
@media (max-width: 768px) {
    .calendar-view-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-grid-container {
        grid-template-columns: 40px 1fr;
    }

    .calendar-hour-label {
        font-size: 0.625rem;
        padding-right: 0.25rem;
    }

    .calendar-body {
        overflow-x: auto;
    }
}

.pagination-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.btn-ghost {
    padding: 0.4rem 1rem;
    border: 1px solid hsl(var(--border));
    background: transparent;
    color: hsl(var(--foreground));
    border-radius: var(--radius);
    cursor: pointer;
}

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

.pagination-info {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}

.projects-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1rem;
}

.projects-instructions {
    font-size: 0.813rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

.project-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 220px;
}

.project-field-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
}

.project-field-group input[type="text"] {
    padding: 0.625rem 0.75rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.project-field-color {
    flex: 0 0 auto;
    min-width: 140px;
}

.project-field-color input[type="color"] {
    width: 100%;
    height: 42px;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 4px;
    background: hsl(var(--card));
}

.project-submit {
    flex: 0 0 auto;
}

.projects-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
}

.project-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-color-swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 1px solid hsl(var(--border));
    background: var(--project-color, #000);
}

.project-name-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.project-empty-state {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    padding: 1rem;
    border: 1px dashed hsl(var(--border));
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow:
        0 1px 3px 0 rgb(0 0 0 / 0.1),
        0 1px 2px -1px rgb(0 0 0 / 0.1);
}

thead {
    background: hsl(var(--muted));
    border-bottom: 1px solid hsl(var(--border));
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

tbody tr {
    border-bottom: 1px solid hsl(var(--border));
}

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

tbody tr:hover {
    background: hsl(var(--muted));
}

tbody tr.task-completed {
    background: hsl(143 85% 96%);
    border-left: 3px solid hsl(142 76% 36%);
}

tbody tr.task-completed:hover {
    background: hsl(143 85% 92%);
}

td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

/* Status dropdown */
.status-dropdown {
    padding: 0.375rem 0.625rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.813rem;
    font-weight: 500;
    cursor: pointer;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: all 0.2s;
}

.status-dropdown:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.1);
}

.status-dropdown:hover {
    border-color: hsl(var(--ring));
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .header-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header-left,
    .header-right {
        justify-content: center;
    }

    .today-total-card {
        width: 100%;
    }

    .analytics-section {
        padding: 1.25rem;
    }

    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .analytics-actions {
        width: 100%;
        justify-content: space-between;
    }

    .timer-section {
        padding: 1.5rem;
    }

    #timerDisplay {
        font-size: 2.5rem;
    }

    .timer-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    table {
        font-size: 0.75rem;
    }

    th,
    td {
        padding: 0.5rem;
    }
}
