
/* =========================================
   DAYMARK — DARK PRODUCTIVITY DASHBOARD
   ========================================= */

:root {
    --bg: #11130f;
    --sidebar: #171a15;
    --panel: #1a1d18;
    --panel-hover: #20241d;
    --border: #2b3027;
    --text: #f0f2e9;
    --muted: #92998a;
    --lime: #c4f56a;
    --lime-dark: #a9dc4f;
    --high: #ff8178;
    --medium: #f1c66b;
    --low: #91c9ff;
    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

a {
    color: inherit;
    text-decoration: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Main layout */

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 245px;
    min-width: 245px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 52px;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--lime);
    color: #15180f;
    display: grid;
    place-items: center;
    font-size: 21px;
    font-weight: 900;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-label,
.eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.sidebar-label {
    margin: 0 0 12px 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 13px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-link:hover {
    background: var(--panel-hover);
    color: var(--text);
}

.nav-link.active {
    color: var(--lime);
    background: #272e1d;
}

.nav-icon {
    width: 21px;
    text-align: center;
    font-size: 18px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 17px 10px 0;
    border-top: 1px solid var(--border);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    color: var(--muted);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    flex-shrink: 0;
}

.sidebar-caption {
    color: #68705f;
    font-size: 11px;
    margin-top: 10px;
}

/* Main content */

.main-content {
    width: min(100%, 1500px);
    min-width: 0;
    margin: 0 auto;
    padding: 38px clamp(20px, 4vw, 58px);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin: 7px 0;
}

.accent-dot {
    color: var(--lime);
}

.header-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.date-clock {
    text-align: right;
    flex-shrink: 0;
}

.date-clock p {
    color: var(--muted);
    font-size: 12px;
}

.date-clock h2 {
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    margin: 2px 0;
}

.clock-label {
    color: var(--lime);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

/* Reminder banner */

.reminder-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px;
    margin-bottom: 25px;
    border: 1px solid #3a4729;
    border-radius: var(--radius);
    background:
        radial-gradient(
            circle at 95% 10%,
            rgba(196, 245, 106, 0.1),
            transparent 35%
        ),
        #1b2116;
}

.reminder-tag {
    color: var(--lime);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.reminder-content h2 {
    font-size: clamp(20px, 2.5vw, 27px);
    letter-spacing: -0.7px;
    margin: 5px 0;
}

.reminder-content p {
    color: var(--muted);
    font-size: 12px;
}

.reminder-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Buttons */

.btn {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 750;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--lime);
    color: #171b11;
}

.btn-primary:hover:not(:disabled) {
    background: var(--lime-dark);
}

.btn-secondary {
    background: #252a21;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: #30372a;
}

.btn-quiet {
    background: transparent;
    color: var(--muted);
    border-color: #3a422f;
}

.btn-quiet:hover:not(:disabled) {
    color: var(--text);
    background: #252a21;
}

/* Statistics */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 25px;
}

.stat-card {
    padding: 21px 23px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 0;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.stat-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

.stat-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #292f21;
    color: var(--lime);
    font-size: 16px;
}

.stat-number {
    font-size: 35px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -1px;
    margin: 13px 0 4px;
    font-variant-numeric: tabular-nums;
}

.stat-description {
    color: var(--muted);
    font-size: 11px;
}

.progress-track {
    height: 5px;
    background: #30352b;
    border-radius: 20px;
    overflow: hidden;
    margin: 7px 0 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--lime);
    transition: width 0.35s ease;
}

/* Workspace panels */

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 20px;
    align-items: start;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    min-width: 0;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.panel-heading h2 {
    font-size: 20px;
    letter-spacing: -0.5px;
    margin-top: 4px;
}

.panel-badge {
    background: #282d24;
    color: var(--muted);
    border: 1px solid #343a2e;
    border-radius: 7px;
    padding: 5px 9px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

/* Task form */

.task-form {
    margin-top: 25px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #151713;
}

.task-form label {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.1px;
    margin-bottom: 7px;
}

.task-form input,
.task-form select {
    width: 100%;
    min-width: 0;
    background: #20231d;
    color: var(--text);
    border: 1px solid #33382e;
    border-radius: 8px;
    padding: 11px 12px;
    outline: none;
}

.task-form input::placeholder {
    color: #686f60;
}

.task-form input:focus,
.task-form select:focus {
    border-color: var(--lime);
}

.form-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 13px;
    margin-top: 15px;
}

.priority-field {
    width: 140px;
    max-width: 50%;
}

.priority-field select {
    padding: 9px 10px;
    font-size: 12px;
}

.add-task-btn {
    white-space: nowrap;
}

/* Task list */

.task-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 25px 0 13px;
}

.task-list-heading h3 {
    font-size: 13px;
}

.task-list-heading span {
    color: var(--muted);
    font-size: 10px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #1d201a;
    transition: border-color 0.2s, background 0.2s;
}

.task-item:hover {
    border-color: #414a34;
    background: var(--panel-hover);
}

.task-item.completed {
    opacity: 0.65;
}

.task-checkbox {
    width: 17px;
    height: 17px;
    accent-color: var(--lime);
    flex-shrink: 0;
    cursor: pointer;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--muted);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.priority-badge {
    display: inline-block;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high {
    color: var(--high);
    background: #3a2422;
}

.priority-medium {
    color: var(--medium);
    background: #382f1e;
}

.priority-low {
    color: var(--low);
    background: #202e3a;
}

.task-date {
    color: var(--muted);
    font-size: 10px;
}

.delete-task {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #818878;
    font-size: 17px;
    transition: 0.2s ease;
}

.delete-task:hover {
    background: #392321;
    border-color: #5a302b;
    color: var(--high);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    padding: 30px 12px;
}

.empty-state strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
}

.empty-icon {
    color: var(--lime);
    font-size: 25px;
    margin-bottom: 5px;
}

/* Focus room */

.focus-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.focus-description {
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
}

.timer-container {
    display: grid;
    place-items: center;
    padding: 30px 0 24px;
}

.timer-ring {
    width: min(220px, 100%);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(
        var(--lime) 0deg,
        #39442a 0deg,
        #30352c 360deg
    );
    position: relative;
}

.timer-ring::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--panel);
}

.timer-inner {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-display {
    font-size: clamp(35px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.timer-mode {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.7px;
    margin-top: 7px;
}

.timer-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.timer-preset {
    padding: 9px 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #20231d;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.timer-preset:hover {
    color: var(--text);
}

.timer-preset.active {
    color: var(--lime);
    border-color: #566b35;
    background: #292f21;
}

.timer-actions {
    display: flex;
    gap: 9px;
    margin-top: 12px;
}

.timer-start-btn {
    flex: 1;
}

.timer-actions .btn-secondary {
    min-width: 80px;
}

.focus-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
    padding-top: 17px;
}

.focus-footer span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.focus-footer strong {
    color: var(--lime);
    font-size: 19px;
}

/* Daily history */

.history-panel {
    margin-top: 22px;
}

.history-description {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
}

.history-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: 25px;
    min-height: 145px;
}

.history-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 9px;
    min-width: 0;
}

.history-bar-track {
    width: min(38px, 100%);
    height: 100px;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: 7px;
    background: #262a22;
}

.history-bar {
    width: 100%;
    min-height: 3px;
    background: var(--lime);
    border-radius: 6px 6px 0 0;
    transition: height 0.3s ease;
}

.history-day-label {
    color: var(--muted);
    font-size: 10px;
}

.history-day-value {
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
}

.history-empty {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    padding: 22px 0 5px;
}

/* Footer */

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 18px 0 5px;
    border-top: 1px solid var(--border);
}

.footer-brand {
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 1.5px;
}

.app-footer p,
.app-footer span {
    color: var(--muted);
    font-size: 10px;
}

/* Responsive layout */

@media (min-width: 1500px) {
    .main-content {
        padding-top: 48px;
    }
}

@media (max-width: 1050px) {
    .sidebar {
        width: 205px;
        min-width: 205px;
        padding: 25px 14px;
    }

    .main-content {
        padding: 30px 22px;
    }

    .workspace-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .focus-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 20px;
        align-items: start;
    }

    .focus-panel .panel-heading,
    .focus-panel .focus-description,
    .focus-panel .focus-footer {
        grid-column: 1 / -1;
    }

    .timer-container {
        grid-row: span 2;
    }

    .timer-presets,
    .timer-actions {
        align-self: end;
    }
}

@media (max-width: 720px) {
    .app-container {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        min-width: 0;
        padding: 16px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .logo {
        margin-bottom: 18px;
    }

    .sidebar-section {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .sidebar-label {
        grid-column: 1 / -1;
        margin: 0 0 3px 5px;
    }

    .nav-link {
        padding: 9px;
        font-size: 11px;
        gap: 8px;
    }

    .nav-icon {
        font-size: 15px;
    }

    .sidebar-bottom {
        display: none;
    }

    .main-content {
        padding: 25px 16px;
    }

    .topbar {
        align-items: flex-start;
        gap: 12px;
    }

    .topbar h1 {
        font-size: 29px;
    }

    .header-subtitle {
        max-width: 220px;
        font-size: 11px;
    }

    .date-clock p {
        font-size: 10px;
    }

    .date-clock h2 {
        font-size: 19px;
    }

    .clock-label {
        font-size: 8px;
    }

    .reminder-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
        gap: 16px;
    }

    .reminder-content p {
        max-width: 350px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 17px 19px;
    }

    .stat-number {
        font-size: 29px;
        margin-top: 7px;
    }

    .panel {
        padding: 19px;
    }

    .focus-panel {
        display: block;
    }

    .timer-container {
        padding: 26px 0 20px;
    }

    .timer-ring {
        width: 205px;
    }

    .history-chart {
        gap: 5px;
    }

    .history-bar-track {
        width: min(28px, 100%);
    }

    .app-footer {
        justify-content: center;
        text-align: center;
        gap: 8px 15px;
    }
}

@media (max-width: 400px) {
    .main-content {
        padding: 20px 12px;
    }

    .topbar {
        flex-direction: column;
    }

    .date-clock {
        text-align: left;
    }

    .reminder-actions {
        width: 100%;
    }

    .reminder-actions .btn {
        flex: 1;
    }

    .task-list-heading span {
        display: none;
    }

    .form-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .priority-field {
        width: 100%;
        max-width: 100%;
    }

    .add-task-btn {
        width: 100%;
    }

    .history-day-label,
    .history-day-value {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
