/* ============================================
   PTV Toolkits - Light Engineering UI
   Clean, Bright, Professional
   ============================================ */

:root {
    /* Light Color Palette */
    --bg-canvas: #ffffff;
    --bg-primary: #f6f8fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eaeef2;
    --bg-overlay: #f3f4f6;

    /* Border Colors - Soft but visible */
    --border-default: #d0d7de;
    --border-muted: #dce1e6;
    --border-subtle: #e8ecf0;

    /* Text Colors - Darker for readability */
    --text-primary: #131619;
    --text-secondary: #424a53;
    --text-muted: #656d76;
    --text-link: #0969da;

    /* Accent Colors */
    --accent-primary: #1a7f37;
    --accent-primary-hover: #2da44e;
    --accent-emphasis: #0969da;
    --accent-attention: #bf8700;
    --accent-danger: #d1242f;
    --accent-done: #8250df;

    /* Functional Colors */
    --success: #1a7f37;
    --success-bg: #dafbe1;
    --warning: #bf8700;
    --warning-bg: #fff8c5;
    --danger: #d1242f;
    --danger-bg: #ffebe9;
    --info: #0969da;
    --info-bg: #ddf4ff;

    /* Shadows - Soft and subtle */
    --shadow-sm: 0 1px 3px rgba(31, 35, 40, 0.06), 0 1px 2px rgba(31, 35, 40, 0.04);
    --shadow-md: 0 4px 12px rgba(31, 35, 40, 0.08), 0 2px 4px rgba(31, 35, 40, 0.04);
    --shadow-lg: 0 8px 24px rgba(31, 35, 40, 0.12), 0 4px 8px rgba(31, 35, 40, 0.06);

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 64px;
    --topbar-height: 56px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    /* Transitions */
    --transition-fast: 80ms cubic-bezier(0.33, 1, 0.68, 1);
    --transition-normal: 150ms cubic-bezier(0.33, 1, 0.68, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar - Clean Light Navigation
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    z-index: 100;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-muted);
    min-height: 56px;
    background: var(--bg-secondary);
}

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

.logo-icon {
    font-size: 18px;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-emphasis) 0%, var(--accent-done) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.toggle-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.toggle-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    white-space: nowrap;
    font-size: 14px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--info-bg);
    color: var(--accent-emphasis);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-emphasis);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    font-size: 15px;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-size: 15px;
}

.nav-group-header:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.nav-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform var(--transition-fast);
    opacity: 0.6;
}

.nav-arrow.expanded {
    transform: rotate(180deg);
}

.nav-group-items {
    padding-left: 8px;
    margin-top: 2px;
}

.nav-item.sub-item {
    padding: 8px 12px 8px 22px;
    font-size: 14px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-muted);
    background: var(--bg-secondary);
}

.version {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.top-bar {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    height: var(--topbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-muted);
    z-index: 50;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

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

.current-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    background: var(--bg-primary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}

.content-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* ============================================
   Home Page - Dashboard
   ============================================ */
.welcome-section {
    padding: 32px;
    background: linear-gradient(135deg, var(--accent-emphasis) 0%, var(--accent-done) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    color: white;
}

.welcome-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.welcome-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-default);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.tool-card-icon {
    font-size: 20px;
    width: 44px;
    height: 44px;
    background: var(--info-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emphasis);
}

.tool-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.tool-card-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.tool-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* ============================================
   Pomodoro Page - Timer Interface
   ============================================ */
.pomodoro-container {
    max-width: 720px;
    margin: 0 auto;
}

.pomodoro-timer-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-default);
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.timer-mode-tabs {
    display: inline-flex;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    margin-bottom: 36px;
    border: 1px solid var(--border-default);
}

.mode-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.mode-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.mode-tab.active {
    background: var(--bg-secondary);
    color: var(--accent-emphasis);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* Session Name Input */
.session-name-input {
    margin-bottom: 24px;
}

.session-name-input input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
    text-align: center;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.session-name-input input::placeholder {
    color: var(--text-muted);
}

.session-name-input input:focus {
    outline: none;
    border-color: var(--accent-emphasis);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
    background: var(--bg-secondary);
}

.session-name-input input:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.timer-display {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto 36px;
}

.timer-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s ease;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.timer-minutes,
.timer-seconds {
    font-size: 64px;
    font-weight: 300;
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1;
    letter-spacing: -0.02em;
}

.timer-separator {
    font-size: 56px;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1;
    font-family: var(--font-mono);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.timer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.timer-btn.primary {
    background: var(--accent-primary);
    color: white;
    min-width: 130px;
    border-color: var(--accent-primary);
}

.timer-btn.primary:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
}

.timer-btn.secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-default);
}

.timer-btn.secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

/* Pomodoro Stats */
.pomodoro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 20px;
    width: 44px;
    height: 44px;
    background: var(--success-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--info-bg);
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--warning-bg);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Pomodoro Settings */
.pomodoro-settings {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.pomodoro-settings h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomodoro-settings h3::before {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2359636e'%3E%3Cpath d='M8 0a8.2 8.2 0 0 1 .701.031C9.444.095 9.99.645 10.16 1.29l.288 1.107c.018.066.079.158.212.224.231.114.454.243.668.386.123.082.233.09.3.071l1.102-.302c.644-.177 1.392.02 1.796.672.403.653.333 1.5-.198 2.037l-.768.768a.31.31 0 0 0-.034.31c.062.187.108.38.14.579.041.236.02.322-.026.37l-.108.073-.795.454a.312.312 0 0 0-.118.38c.108.307.168.635.168.978 0 .343-.06.67-.168.978a.312.312 0 0 0 .118.38l.795.454.108.073c.046.048.067.134.026.37a3.61 3.61 0 0 1-.14.58.31.31 0 0 0 .034.309l.768.768c.531.537.601 1.384.198 2.037-.404.652-1.152.849-1.796.672l-1.102-.302c-.067-.019-.177-.011-.3.071a5.65 5.65 0 0 1-.668.386c-.133.066-.194.158-.212.224l-.288 1.107c-.17.645-.716 1.195-1.459 1.26a8.09 8.09 0 0 1-1.402 0c-.743-.065-1.289-.615-1.459-1.26l-.288-1.107c-.018-.066-.079-.158-.212-.224a5.738 5.738 0 0 1-.668-.386c-.123-.082-.233-.09-.3-.071l-1.102.302c-.644.177-1.392-.02-1.796-.672a1.734 1.734 0 0 1 .198-2.037l.768-.768a.31.31 0 0 0 .034-.31 3.618 3.618 0 0 1-.14-.579c-.041-.236-.02-.322.026-.37l.108-.073.795-.454a.312.312 0 0 0 .118-.38A3.61 3.61 0 0 1 3.69 8c0-.343.06-.67.168-.978a.312.312 0 0 0-.118-.38l-.795-.454-.108-.073c-.046-.048-.067-.134-.026-.37.032-.199.078-.392.14-.58a.31.31 0 0 0-.034-.309l-.768-.768c-.531-.537-.601-1.384-.198-2.037.404-.652 1.152-.849 1.796-.672l1.102.302c.067.019.177.011.3-.071.214-.143.437-.272.668-.386.133-.066.194-.158.212-.224l.288-1.107C6.01.645 6.556.095 7.299.03 7.53.01 7.764 0 8 0Zm-.571 7.429a.571.571 0 1 0 0 1.142.571.571 0 0 0 0-1.142Zm1.142 0a.571.571 0 1 0 0 1.142.571.571 0 0 0 0-1.142Z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.7;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-item label {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-item input {
    padding: 10px 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-family: var(--font-mono);
    transition: all var(--transition-fast);
}

.setting-item input:focus {
    outline: none;
    border-color: var(--accent-emphasis);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

.save-settings-btn {
    padding: 10px 18px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.save-settings-btn:hover {
    background: var(--accent-primary-hover);
}

/* Settings Toggles */
.settings-toggles {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.toggle-setting {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-setting input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-default);
    border-radius: 12px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-setting input[type="checkbox"]:checked + .toggle-slider {
    background: var(--accent-primary);
}

.toggle-setting input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Session History */
.session-history {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-default);
    margin-top: 16px;
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.history-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.history-header h3::before {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2359636e'%3E%3Cpath d='M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.75.75 0 1 1 1.06 1.06Z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.7;
}

.clear-history-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.clear-history-btn:hover {
    background: var(--danger-bg);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-primary);
    transition: all var(--transition-fast);
}

.history-item:hover {
    background: var(--bg-tertiary);
}

.history-item.work {
    border-left-color: var(--accent-primary);
}

.history-item.shortBreak {
    border-left-color: var(--accent-emphasis);
}

.history-item.longBreak {
    border-left-color: var(--accent-attention);
}

.history-icon {
    font-size: 20px;
    width: 42px;
    height: 42px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-default);
    margin-top: 2px;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-session-name {
    font-size: 13px;
    color: var(--accent-emphasis);
    font-weight: 500;
    background: var(--info-bg);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 3px;
}

.history-time-details {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.history-time-range {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 4px;
}

.history-duration {
    font-size: 13px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 600;
    background: var(--success-bg);
    padding: 4px 10px;
    border-radius: 4px;
}

.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

.history-empty p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
}

.history-empty .empty-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pomodoro-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar:hover {
        width: var(--sidebar-width);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }

    .content-area {
        padding: 16px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .timer-display {
        width: 200px;
        height: 200px;
    }

    .timer-minutes,
    .timer-seconds {
        font-size: 48px;
    }

    .timer-separator {
        font-size: 42px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .timer-mode-tabs {
        flex-direction: column;
        width: 100%;
    }
}

/* ============================================
   Animations
   ============================================ */
.timer-btn.primary:active {
    transform: scale(0.98);
}

/* Smooth page transitions */
.page {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling - Light Theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: rgba(9, 105, 218, 0.2);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-emphasis);
    outline-offset: 2px;
}

/* ============================================
   Timer Page - Countdown Timer Interface
   ============================================ */
.timer-container {
    max-width: 720px;
    margin: 0 auto;
}

.timer-main-card {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-default);
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* Timer Name Input */
.timer-name-input {
    margin-bottom: 24px;
}

.timer-name-input input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
    text-align: center;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.timer-name-input input::placeholder {
    color: var(--text-muted);
}

.timer-name-input input:focus {
    outline: none;
    border-color: var(--accent-emphasis);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
    background: var(--bg-secondary);
}

.timer-name-input input:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Time Selectors */
.timer-input-section {
    margin-bottom: 32px;
}

.time-selectors {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.time-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.time-selector label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.time-selector select {
    width: 80px;
    padding: 14px 8px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-family: var(--font-mono);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2359636e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.time-selector select:focus {
    outline: none;
    border-color: var(--accent-emphasis);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

.time-selector select:hover {
    border-color: var(--border-default);
    background-color: var(--bg-tertiary);
}

.time-separator-input {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

/* Preset Buttons */
.timer-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.preset-btn {
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.preset-btn:hover {
    background: var(--info-bg);
    border-color: var(--accent-emphasis);
    color: var(--accent-emphasis);
}

.preset-btn:active {
    transform: scale(0.98);
}

/* Timer Display - using blue accent for Timer */
.timer-ring-progress.timer-accent {
    stroke: var(--accent-emphasis);
}

.timer-display-text .timer-hours {
    font-size: 48px;
    font-weight: 300;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.timer-display-text .timer-unit {
    font-size: 24px;
    color: var(--text-muted);
    margin-right: 8px;
}

/* Timer Settings */
.timer-settings {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-default);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.timer-settings h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-settings h3::before {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2359636e'%3E%3Cpath d='M8 0a8.2 8.2 0 0 1 .701.031C9.444.095 9.99.645 10.16 1.29l.288 1.107c.018.066.079.158.212.224.231.114.454.243.668.386.123.082.233.09.3.071l1.102-.302c.644-.177 1.392.02 1.796.672.403.653.333 1.5-.198 2.037l-.768.768a.31.31 0 0 0-.034.31c.062.187.108.38.14.579.041.236.02.322-.026.37l-.108.073-.795.454a.312.312 0 0 0-.118.38c.108.307.168.635.168.978 0 .343-.06.67-.168.978a.312.312 0 0 0 .118.38l.795.454.108.073c.046.048.067.134.026.37a3.61 3.61 0 0 1-.14.58.31.31 0 0 0 .034.309l.768.768c.531.537.601 1.384.198 2.037-.404.652-1.152.849-1.796.672l-1.102-.302c-.067-.019-.177-.011-.3.071a5.65 5.65 0 0 1-.668.386c-.133.066-.194.158-.212.224l-.288 1.107c-.17.645-.716 1.195-1.459 1.26a8.09 8.09 0 0 1-1.402 0c-.743-.065-1.289-.615-1.459-1.26l-.288-1.107c-.018-.066-.079-.158-.212-.224a5.738 5.738 0 0 1-.668-.386c-.123-.082-.233-.09-.3-.071l-1.102.302c-.644.177-1.392-.02-1.796-.672a1.734 1.734 0 0 1 .198-2.037l.768-.768a.31.31 0 0 0 .034-.31 3.618 3.618 0 0 1-.14-.579c-.041-.236-.02-.322.026-.37l.108-.073.795-.454a.312.312 0 0 0 .118-.38A3.61 3.61 0 0 1 3.69 8c0-.343.06-.67.168-.978a.312.312 0 0 0-.118-.38l-.795-.454-.108-.073c-.046-.048-.067-.134-.026-.37.032-.199.078-.392.14-.58a.31.31 0 0 0-.034-.309l-.768-.768c-.531-.537-.601-1.384-.198-2.037.404-.652 1.152-.849 1.796-.672l1.102.302c.067.019.177.011.3-.071.214-.143.437-.272.668-.386.133-.066.194-.158.212-.224l.288-1.107C6.01.645 6.556.095 7.299.03 7.53.01 7.764 0 8 0Zm-.571 7.429a.571.571 0 1 0 0 1.142.571.571 0 0 0 0-1.142Zm1.142 0a.571.571 0 1 0 0 1.142.571.571 0 0 0 0-1.142Z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.7;
}

.timer-settings .settings-toggles {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    border-top: none;
    padding-top: 0;
}

.timer-settings .settings-toggles .toggle-setting {
    margin-bottom: 12px;
}

.timer-settings .settings-toggles .toggle-setting:last-child {
    margin-bottom: 0;
}

.on-zero-setting {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.on-zero-setting > label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 24px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.radio-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Timer History */
.timer-history {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.timer-history-item.completed {
    border-left-color: var(--accent-primary);
}

.timer-history-item.stopped {
    border-left-color: var(--accent-attention);
}

.history-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Timer Responsive */
@media (max-width: 768px) {
    .time-selectors {
        flex-direction: column;
        gap: 16px;
    }

    .time-separator-input {
        display: none;
    }

    .time-selector select {
        width: 100%;
        max-width: 200px;
    }

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

    .preset-btn {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }

    .timer-main-card {
        padding: 24px;
    }
}

/* ============================================
   Timer Focus Mode
   ============================================ */
.timer-page.focus-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--bg-canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    animation: fadeIn 0.3s ease;
}

.timer-container.focus-mode {
    max-width: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-main-card.focus-mode {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 40px;
    max-width: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Focus Mode Toggle Button */
.focus-mode-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.focus-mode-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-emphasis);
}

.timer-main-card.focus-mode .focus-mode-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

/* Focus Session Name */
.focus-session-name {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-align: center;
    max-width: 600px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Focus Mode Timer Display */
.timer-display.focus-mode {
    width: auto;
    height: auto;
    position: relative;
    margin: 0;
}

.timer-display-text.focus-mode {
    position: static;
    transform: none;
}

.timer-display-text.focus-mode .timer-hours {
    font-size: 140px;
    font-weight: 200;
    letter-spacing: -0.02em;
}

.timer-display-text.focus-mode .timer-unit {
    font-size: 60px;
    margin-right: 16px;
}

.timer-display-text.focus-mode .timer-minutes,
.timer-display-text.focus-mode .timer-seconds {
    font-size: 140px;
    font-weight: 200;
    letter-spacing: -0.02em;
}

.timer-display-text.focus-mode .timer-separator {
    font-size: 120px;
    font-weight: 200;
    margin: 0 8px;
}

/* Focus Mode Controls */
.timer-controls.focus-mode {
    margin-top: 60px;
}

.timer-controls.focus-mode .timer-btn {
    padding: 16px 36px;
    font-size: 18px;
}

.timer-controls.focus-mode .timer-btn.primary {
    min-width: 160px;
}

/* Focus Mode Responsive */
@media (max-width: 768px) {
    .timer-display-text.focus-mode .timer-hours,
    .timer-display-text.focus-mode .timer-minutes,
    .timer-display-text.focus-mode .timer-seconds {
        font-size: 80px;
    }

    .timer-display-text.focus-mode .timer-separator {
        font-size: 70px;
    }

    .timer-display-text.focus-mode .timer-unit {
        font-size: 36px;
    }

    .focus-session-name {
        font-size: 18px;
        margin-bottom: 24px;
    }

    .timer-controls.focus-mode {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .timer-display-text.focus-mode .timer-hours,
    .timer-display-text.focus-mode .timer-minutes,
    .timer-display-text.focus-mode .timer-seconds {
        font-size: 56px;
    }

    .timer-display-text.focus-mode .timer-separator {
        font-size: 48px;
    }

    .timer-display-text.focus-mode .timer-unit {
        font-size: 28px;
    }
}
