        :root {
            --color-daily: #10b981;
            --color-weekly: #3b82f6;
            --color-8week: #f97316;
            --color-quarterly: #ef4444;
            --color-annual: #a855f7;
            --color-bg: #f8fafc;
            --color-surface: #ffffff;
            --color-text: #1e293b;
            --color-text-light: #64748b;
            --color-border: #e2e8f0;
            --color-primary: #3b82f6;
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --color-error: #ef4444;
        }

        [data-theme="dark"] {
            --color-bg: #0f172a;
            --color-surface: #1e293b;
            --color-text: #f1f5f9;
            --color-text-light: #cbd5e1;
            --color-border: #334155;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: var(--color-bg);
            color: var(--color-text);
            transition: background-color 0.3s, color 0.3s;
        }

        body {
            padding: 16px;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            flex-wrap: wrap;
            gap: 16px;
        }

        .header h1 {
            font-size: 28px;
            font-weight: 700;
        }

        .model-badge {
            font-size: 0.85rem;
            color: #4a5568;
            margin-top: 4px;
            font-weight: 500;
        }

        .theme-toggle {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            white-space: nowrap;
        }

        .btn-timer,
        .btn-quick-action {
            color: white;
            padding: 16px 20px;
            font-size: 15px;
            font-weight: 700;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            transition: all 0.3s;
            min-height: 44px;
        }

        .btn-timer {
            background: linear-gradient(135deg, var(--color-primary), #6366f1);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }

        .btn-timer:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
        }

        .btn-quick-action {
            background: linear-gradient(135deg, var(--color-success), #059669);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }

        .btn-quick-action:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
        }

        .btn-timer:active,
        .btn-quick-action:active {
            transform: translateY(0);
        }

        .btn-log-past {
            background: var(--color-surface);
            border: 2px dashed var(--color-border);
            color: var(--color-text-light);
            padding: 12px 16px;
            font-size: 14px;
            transition: all 0.2s;
        }

        .btn-log-past:hover {
            border-color: var(--color-primary);
            color: var(--color-primary);
        }

        .string-life-container {
            background: linear-gradient(135deg, var(--color-surface), var(--color-bg));
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 16px;
            margin-top: 20px;
        }

        /* Session History */
        .session-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid var(--color-border);
        }

        .session-item:last-child {
            border-bottom: none;
        }

        .session-date {
            font-size: 13px;
            color: var(--color-text);
        }

        .session-duration {
            font-weight: 600;
            color: var(--color-primary);
        }

        .btn-delete-session {
            background: transparent;
            border: none;
            color: var(--color-text-light);
            font-size: 18px;
            cursor: pointer;
            padding: 4px 8px;
            min-height: 32px;
            min-width: 32px;
        }

        .btn-delete-session:hover {
            color: var(--color-error);
        }

        .string-life-bar {
            width: 100%;
            height: 20px;
            background: var(--color-border);
            border-radius: 10px;
            overflow: hidden;
            margin: 12px 0;
            position: relative;
        }

        .string-life-fill {
            height: 100%;
            transition: width 0.4s, background-color 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 600;
        }

        .string-life-fill.safe {
            background: linear-gradient(90deg, #10b981, #6ee7b7);
        }

        .string-life-fill.warning {
            background: linear-gradient(90deg, #f59e0b, #fbbf24);
        }

        .string-life-fill.danger {
            background: linear-gradient(90deg, #ef4444, #fca5a5);
        }

        /* String Health Ring */
        .string-health-ring {
            width: 120px;
            height: 120px;
            transform: rotate(-90deg);
            display: block;
            margin: 0 auto;
        }

        .ring-bg {
            stroke: var(--color-border);
        }

        .ring-progress {
            transition: stroke-dasharray 0.5s ease, stroke 0.3s ease;
        }

        .ring-text {
            font-size: 10px;
            fill: var(--color-text);
            font-weight: 700;
        }

        /* String Life Calculator Container */
        .string-life-ring-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            margin: 20px 0;
        }

        @media (max-width: 768px) {
            .header {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
            }

            .header > div {
                display: flex;
                flex-direction: column;
            }

            .theme-toggle {
                width: 100%;
            }
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            border-bottom: 2px solid var(--color-border);
            overflow-x: auto;
            flex-wrap: wrap;
        }

        .tab-btn {
            padding: 12px 16px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            color: var(--color-text-light);
            transition: all 0.3s;
            white-space: nowrap;
        }

        .tab-btn.active {
            color: var(--color-primary);
            border-bottom-color: var(--color-primary);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .alert-banner {
            background-color: var(--color-error);
            color: white;
            padding: 16px;
            border-radius: 8px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .alert-banner.warning {
            background-color: var(--color-warning);
        }

        .alert-banner.info {
            background-color: var(--color-primary);
        }

        .alert-banner.hidden {
            display: none;
        }

        .alert-icon {
            font-size: 20px;
        }

        .alert-content h3 {
            margin-bottom: 4px;
            font-size: 16px;
        }

        .grid-2 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .grid-3 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }

        .card {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .card h3 {
            font-size: 16px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .task-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .task-item {
            border: 1px solid var(--color-border);
            border-radius: 6px;
            padding: 12px;
            background: var(--color-bg);
            transition: all 0.2s;
        }

        .task-item.completed {
            opacity: 0.6;
            background: rgba(16, 185, 129, 0.05);
        }

        .task-item.completed-today {
            background: rgba(16, 185, 129, 0.1);
            border-left: 3px solid var(--color-success);
        }

        .task-item.completed-this-period {
            background: rgba(59, 130, 246, 0.05);
            border-left: 3px solid var(--color-primary);
        }

        .completion-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-top: 8px;
        }

        .completion-badge.today {
            background: rgba(16, 185, 129, 0.2);
            color: var(--color-success);
        }

        .completion-badge.this-week {
            background: rgba(59, 130, 246, 0.2);
            color: var(--color-primary);
        }

        .completion-badge.this-period {
            background: rgba(245, 158, 11, 0.2);
            color: var(--color-warning);
        }

        .last-completed-badge {
            display: inline-block;
            font-size: 11px;
            color: var(--color-text-light);
            padding: 2px 6px;
            background: var(--color-bg);
            border-radius: 4px;
            margin-top: 4px;
        }

        .relative-time {
            font-weight: 600;
            color: var(--color-text);
        }

        .relative-time.recent {
            color: var(--color-success);
        }

        .relative-time.overdue {
            color: var(--color-error);
        }

        .offline-indicator {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--color-text-light);
            padding: 6px 12px;
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: 6px;
        }

        .offline-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--color-success);
            animation: pulse 2s ease-in-out infinite;
        }

        .guitar-selector {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: 6px;
            font-size: 14px;
        }

        .guitar-selector label {
            color: var(--color-text-light);
            font-weight: 500;
        }

        .guitar-select {
            padding: 4px 8px;
            border: 1px solid var(--color-border);
            border-radius: 4px;
            background: var(--color-bg);
            color: var(--color-text);
            font-size: 14px;
            cursor: pointer;
        }

        .guitar-select:focus {
            outline: 2px solid var(--color-primary);
            outline-offset: 2px;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .task-header {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 8px;
        }

        .task-checkbox {
            width: 20px;
            height: 20px;
            margin-top: 2px;
            cursor: pointer;
            accent-color: var(--color-primary);
            flex-shrink: 0;
        }

        .task-info {
            flex: 1;
        }

        .task-name {
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 4px;
        }

        .task-duration {
            font-size: 12px;
            color: var(--color-text-light);
        }

        .task-dates {
            font-size: 11px;
            color: var(--color-text-light);
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 8px;
        }

        .expand-btn {
            background: none;
            border: none;
            color: var(--color-primary);
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            padding: 4px 0;
            text-align: left;
            width: 100%;
        }

        .expand-content {
            display: none;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--color-border);
        }

        .expand-content.show {
            display: block;
        }

        .expand-section {
            margin-bottom: 10px;
        }

        .expand-label {
            font-weight: 600;
            font-size: 12px;
            color: var(--color-text);
            margin-bottom: 4px;
        }

        .expand-text {
            font-size: 12px;
            color: var(--color-text-light);
            line-height: 1.4;
        }

        .progress-section {
            margin-bottom: 16px;
        }

        .progress-label {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: var(--color-border);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            transition: width 0.3s;
        }

        .color-daily { background-color: var(--color-daily); }
        .color-weekly { background-color: var(--color-weekly); }
        .color-8week { background-color: var(--color-8week); }
        .color-quarterly { background-color: var(--color-quarterly); }
        .color-annual { background-color: var(--color-annual); }

        .stat-card {
            background: linear-gradient(135deg, var(--color-surface), var(--color-bg));
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 16px;
            text-align: center;
        }

        .stat-value {
            font-size: 28px;
            font-weight: 700;
            margin: 8px 0;
        }

        .stat-label {
            font-size: 12px;
            color: var(--color-text-light);
        }

        .humidity-display {
            font-size: 32px;
            font-weight: 700;
            margin: 12px 0;
        }

        .humidity-display.safe { color: var(--color-success); }
        .humidity-display.warning { color: var(--color-warning); }
        .humidity-display.danger { color: var(--color-error); }

        .humidity-status {
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .form-group {
            margin-bottom: 12px;
        }

        .form-label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .keyboard-hint {
            font-size: 10px;
            font-weight: 400;
            color: var(--color-text-light);
            background: var(--color-bg);
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 8px;
        }

        /* String Life Factors */
        .string-factors .factor-row {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            padding: 4px 0;
            border-bottom: 1px solid var(--color-border);
        }

        .string-factors .factor-row:last-child {
            border-bottom: none;
        }

        input[type="text"],
        input[type="number"],
        input[type="date"],
        input[type="time"],
        select,
        textarea {
            width: 100%;
            padding: 8px;
            border: 1px solid var(--color-border);
            border-radius: 4px;
            background: var(--color-surface);
            color: var(--color-text);
            font-size: 13px;
            font-family: inherit;
        }

        textarea {
            resize: vertical;
            min-height: 80px;
        }


        .form-feedback {
            margin-top: 8px;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }

        .form-feedback.error {
            background: rgba(239, 68, 68, 0.1);
            color: var(--color-error);
            border-left: 3px solid var(--color-error);
        }

        .form-feedback.warning {
            background: rgba(245, 158, 11, 0.1);
            color: var(--color-warning);
            border-left: 3px solid var(--color-warning);
        }

        .form-feedback.success {
            background: rgba(16, 185, 129, 0.1);
            color: var(--color-success);
            border-left: 3px solid var(--color-success);
        }

        .button-group {
            display: flex;
            gap: 8px;
            margin-top: 12px;
            flex-wrap: wrap;
        }

        button {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.2s;
        }

        .btn-primary {
            background: var(--color-primary);
            color: white;
        }

        .btn-primary:hover {
            opacity: 0.9;
        }

        .btn-success {
            background: var(--color-success);
            color: white;
        }

        .btn-secondary {
            background: var(--color-border);
            color: var(--color-text);
        }

        .btn-secondary:hover {
            background: var(--color-border);
            opacity: 0.8;
        }

        .btn-danger {
            background: var(--color-error);
            color: white;
        }

        .table-responsive {
            overflow-x: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        th {
            text-align: left;
            padding: 10px;
            border-bottom: 2px solid var(--color-border);
            font-weight: 600;
            background: var(--color-bg);
        }

        td {
            padding: 10px;
            border-bottom: 1px solid var(--color-border);
        }

        .badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        .badge-success { background: rgba(16, 185, 129, 0.2); color: var(--color-success); }
        .badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--color-warning); }
        .badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--color-error); }

        .checklist-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px;
            margin-bottom: 8px;
            border: 1px solid var(--color-border);
            border-radius: 4px;
            background: var(--color-bg);
        }

        .checklist-item input[type="checkbox"] {
            margin-top: 4px;
            cursor: pointer;
        }

        .checklist-content {
            flex: 1;
        }

        .checklist-label {
            font-weight: 600;
            font-size: 13px;
            margin-bottom: 2px;
        }

        .checklist-note {
            font-size: 12px;
            color: var(--color-text-light);
        }

        /* Equipment List Styles */
        .equipment-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .equipment-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px;
            border: 1px solid var(--color-border);
            border-radius: 6px;
            background: var(--color-surface);
            transition: all 0.2s;
        }

        .equipment-item:hover {
            border-color: var(--color-primary);
            background: var(--color-bg);
        }

        .equipment-name {
            font-size: 13px;
            color: var(--color-text);
            flex: 1;
        }

        .btn-icon-delete {
            background: none;
            border: none;
            color: var(--color-error);
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
            padding: 4px 8px;
            margin-left: 12px;
            border-radius: 4px;
            transition: all 0.2s;
            min-width: 32px;
        }

        .btn-icon-delete:hover {
            background: rgba(239, 68, 68, 0.1);
            transform: scale(1.1);
        }

        .equipment-add {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--color-border);
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
            margin-bottom: 16px;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--color-border);
            border-radius: 4px;
            font-size: 11px;
            background: var(--color-bg);
            padding: 2px;
            gap: 2px;
        }

        .calendar-day.today {
            background: var(--color-primary);
            color: white;
            font-weight: 600;
        }

        .calendar-day.upcoming {
            background: rgba(59, 130, 246, 0.1);
            color: var(--color-primary);
        }

        .calendar-dots {
            display: flex;
            gap: 2px;
            justify-content: center;
        }

        .calendar-dot {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--color-text-light);
        }

        .calendar-dot.color-daily { background: var(--color-daily); }
        .calendar-dot.color-weekly { background: var(--color-weekly); }
        .calendar-dot.color-8week { background: var(--color-8week); }
        .calendar-dot.color-quarterly { background: var(--color-quarterly); }
        .calendar-dot.color-annual { background: var(--color-annual); }

        .calendar-dot-more {
            font-size: 8px;
            color: var(--color-text-light);
        }

        /* Calendar Agenda */
        .calendar-agenda {
            margin-top: 16px;
            border-top: 1px solid var(--color-border);
            padding-top: 16px;
        }

        .agenda-header {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 12px;
        }

        .agenda-day {
            margin-bottom: 12px;
            padding: 8px;
            background: var(--color-bg);
            border-radius: 6px;
        }

        .agenda-day.agenda-today {
            background: rgba(59, 130, 246, 0.1);
            border-left: 3px solid var(--color-primary);
        }

        .agenda-date {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 6px;
            color: var(--color-text);
        }

        .agenda-tasks {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .agenda-task {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
        }

        .agenda-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .agenda-dot.color-daily { background: var(--color-daily); }
        .agenda-dot.color-weekly { background: var(--color-weekly); }
        .agenda-dot.color-8week { background: var(--color-8week); }
        .agenda-dot.color-quarterly { background: var(--color-quarterly); }
        .agenda-dot.color-annual { background: var(--color-annual); }

        .agenda-task-name {
            flex: 1;
            color: var(--color-text);
        }

        .agenda-task-label {
            font-size: 10px;
            color: var(--color-text-light);
            background: var(--color-border);
            padding: 2px 6px;
            border-radius: 4px;
        }

        /* Maintenance History Timeline */
        .timeline {
            position: relative;
            padding-left: 20px;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 8px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--color-border);
        }

        .timeline-month-header {
            font-size: 12px;
            font-weight: 600;
            color: var(--color-text-light);
            margin: 16px 0 8px 0;
            text-transform: uppercase;
        }

        .timeline-event {
            display: flex;
            gap: 12px;
            margin-bottom: 12px;
            position: relative;
        }

        .timeline-event-icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            flex-shrink: 0;
            margin-left: -14px;
            z-index: 1;
        }

        .timeline-event-content {
            flex: 1;
            background: var(--color-bg);
            padding: 10px 12px;
            border-radius: 8px;
        }

        .timeline-event-date {
            font-size: 10px;
            color: var(--color-text-light);
            margin-bottom: 2px;
        }

        .timeline-event-title {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .timeline-event-details {
            font-size: 12px;
            color: var(--color-text-light);
        }

        .timeline-event-notes {
            font-size: 11px;
            color: var(--color-text-light);
            font-style: italic;
            margin-top: 4px;
        }

        .timeline-empty {
            padding: 20px;
            text-align: center;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: var(--color-surface);
            border-radius: 8px;
            padding: 24px;
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 16px;
        }

        .modal-close {
            position: absolute;
            top: 16px;
            right: 16px;
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--color-text-light);
        }

        .threshold-panel {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
            border-left: 4px solid var(--color-primary);
            padding: 16px;
            border-radius: 6px;
            margin-bottom: 16px;
        }

        .threshold-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid var(--color-border);
        }

        .threshold-item:last-child {
            border-bottom: none;
        }

        .threshold-label {
            font-size: 13px;
            font-weight: 600;
        }

        .threshold-value {
            font-size: 12px;
            color: var(--color-text-light);
            background: var(--color-bg);
            padding: 4px 8px;
            border-radius: 4px;
        }

        /* Empty State Styling */
        .empty-state {
            color: #718096;
            font-style: italic;
            font-size: 13px;
            line-height: 1.4;
        }

        .empty-state-cta {
            display: inline-block;
            margin-top: 8px;
            color: var(--color-primary);
            font-weight: 600;
            cursor: pointer;
            text-decoration: underline;
            font-size: 12px;
        }

        .empty-state-cta:hover {
            opacity: 0.8;
        }

        /* GS Mini Spec Indicators */
        .gs-mini-spec::before {
            content: "GS Mini";
            font-size: 0.7rem;
            background: #e2e8f0;
            padding: 0.1rem 0.3rem;
            border-radius: 3px;
            color: #4a5568;
            margin-right: 0.3rem;
            font-weight: 600;
        }

        /* Humidity Reference Legend */
        .humidity-reference {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
            flex-wrap: wrap;
            padding: 10px;
            background: var(--color-bg);
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
        }

        .ref-target {
            padding: 4px 8px;
            border-radius: 4px;
            background: rgba(16, 185, 129, 0.2);
            color: var(--color-success);
        }

        .ref-safe {
            padding: 4px 8px;
            border-radius: 4px;
            background: rgba(59, 130, 246, 0.2);
            color: var(--color-primary);
        }

        .ref-warning {
            padding: 4px 8px;
            border-radius: 4px;
            background: rgba(245, 158, 11, 0.2);
            color: var(--color-warning);
        }

        .ref-danger {
            padding: 4px 8px;
            border-radius: 4px;
            background: rgba(239, 68, 68, 0.2);
            color: var(--color-error);
        }

        /* Real-time Input Feedback */
        .input-safe {
            border-color: #48bb78 !important;
            background-color: rgba(72, 187, 120, 0.1) !important;
        }

        .input-warning {
            border-color: #ecc94b !important;
            background-color: rgba(236, 201, 75, 0.1) !important;
        }

        .input-danger {
            border-color: #f56565 !important;
            background-color: rgba(245, 101, 101, 0.1) !important;
        }

        /* Dark mode adjustments for input feedback */
        [data-theme="dark"] .input-safe {
            background-color: rgba(72, 187, 120, 0.2) !important;
        }

        [data-theme="dark"] .input-warning {
            background-color: rgba(236, 201, 75, 0.2) !important;
        }

        [data-theme="dark"] .input-danger {
            background-color: rgba(245, 101, 101, 0.2) !important;
        }

        /* Info Icon */
        .info-icon {
            display: inline-block;
            margin-left: 4px;
            font-size: 14px;
            color: var(--color-primary);
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.2s;
        }

        .info-icon:hover {
            opacity: 1;
        }

        /* Humidity Change Colors */
        .humidity-change-normal {
            color: var(--color-success);
        }

        .humidity-change-caution {
            color: var(--color-warning);
        }

        .humidity-change-danger {
            color: var(--color-error);
            font-weight: bold;
        }

        /* Playing Session Duration Modal */
        .duration-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .duration-btn {
            padding: 20px 16px;
            border: 2px solid var(--color-border);
            border-radius: 8px;
            background: var(--color-surface);
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .duration-btn:hover {
            border-color: var(--color-primary);
            background: rgba(59, 130, 246, 0.1);
        }

        .duration-time {
            font-size: 18px;
            font-weight: 700;
            color: var(--color-text);
        }

        .duration-label {
            font-size: 11px;
            color: var(--color-text-light);
        }

        /* Onboarding Modal */
        .onboarding-modal {
            z-index: 2000;
        }

        .onboarding-content {
            max-width: 600px;
            position: relative;
        }

        .onboarding-steps {
            display: flex;
            justify-content: center;
            gap: 12px;
            margin-bottom: 24px;
        }

        .step-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--color-border);
            transition: all 0.3s;
            cursor: pointer;
        }

        .step-dot.active {
            background: var(--color-primary);
            width: 32px;
            border-radius: 6px;
        }

        .step-dot.completed {
            background: var(--color-success);
        }

        .onboarding-step {
            display: none;
            animation: fadeIn 0.3s ease-in;
        }

        .onboarding-step.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .onboarding-step h2 {
            font-size: 22px;
            margin-bottom: 12px;
            color: var(--color-text);
        }

        .onboarding-step p {
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 8px;
        }

        .onboarding-actions {
            display: flex;
            gap: 8px;
            margin-top: 24px;
            flex-wrap: wrap;
        }

        .onboarding-actions button {
            flex: 1;
            min-width: 120px;
        }

        .onboarding-yn-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-top: 16px;
        }

        .btn-yn {
            padding: 16px;
            font-size: 15px;
            font-weight: 600;
            border: 2px solid var(--color-border);
            border-radius: 8px;
            background: var(--color-surface);
            color: var(--color-text);
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-yn:hover {
            border-color: var(--color-primary);
            background: rgba(59, 130, 246, 0.1);
        }

        .btn-yn.selected {
            border-color: var(--color-primary);
            background: rgba(59, 130, 246, 0.2);
            color: var(--color-primary);
        }

        /* Tablet breakpoint */
        @media (max-width: 768px) {
            .header {
                flex-direction: column;
                align-items: flex-start;
            }

            .tabs {
                gap: 4px;
            }

            .tab-btn {
                padding: 10px 12px;
                font-size: 12px;
            }

            .grid-2 {
                grid-template-columns: 1fr;
            }

            .grid-3 {
                grid-template-columns: 1fr;
            }

            .task-dates {
                grid-template-columns: 1fr;
            }
        }

        /* Mobile breakpoint - iPhone SE and smaller */
        @media (max-width: 480px) {
            body {
                padding: 12px;
            }

            .header h1 {
                font-size: 22px;
            }

            /* Hide keyboard hints on mobile - they're not useful */
            .keyboard-hint {
                display: none;
            }

            /* Make tabs horizontally scrollable with snap */
            .tabs {
                overflow-x: auto;
                overflow-y: hidden;
                scroll-snap-type: x mandatory;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                -ms-overflow-style: none;
                flex-wrap: nowrap;
                padding-bottom: 8px;
            }

            .tabs::-webkit-scrollbar {
                display: none;
            }

            .tab-btn {
                scroll-snap-align: start;
                min-height: 44px;
                min-width: 120px;
                padding: 12px 16px;
                font-size: 13px;
                flex-shrink: 0;
            }

            /* Ensure all touch targets are at least 44px */
            button {
                min-height: 44px;
                min-width: 44px;
                padding: 10px 16px;
            }

            .task-checkbox {
                width: 24px;
                height: 24px;
                min-width: 24px;
                min-height: 24px;
            }

            input[type="checkbox"] {
                min-width: 20px;
                min-height: 20px;
                width: 20px;
                height: 20px;
            }

            .theme-toggle {
                min-height: 44px;
                padding: 10px 16px;
            }

            /* Single column layouts on mobile */
            .grid-2, .grid-3 {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            /* Reduce padding on cards for more space */
            .card {
                padding: 16px;
            }

            /* Better button spacing on mobile */
            .button-group {
                flex-direction: column;
            }

            .button-group button {
                width: 100%;
            }

            /* Stack task dates vertically */
            .task-dates {
                grid-template-columns: 1fr;
                gap: 4px;
            }

            /* Better table scrolling */
            .table-responsive {
                -webkit-overflow-scrolling: touch;
            }

            table {
                font-size: 12px;
            }

            th, td {
                padding: 8px 6px;
            }

            /* Reduce stat card text size */
            .stat-value {
                font-size: 24px;
            }

            .humidity-display {
                font-size: 28px;
            }

            /* Modal adjustments */
            .modal {
                padding: 16px;
            }

            .modal-content {
                padding: 20px;
                max-height: 85vh;
            }

            /* Form inputs larger on mobile */
            input[type="text"],
            input[type="number"],
            input[type="date"],
            input[type="time"],
            select,
            textarea {
                padding: 10px;
                font-size: 16px; /* Prevents iOS zoom */
            }

            /* Calendar grid more compact on mobile */
            .calendar-grid {
                gap: 2px;
            }

            .calendar-day {
                font-size: 10px;
            }

            /* Onboarding mobile adjustments */
            .onboarding-yn-buttons {
                grid-template-columns: 1fr;
            }

            .onboarding-actions {
                flex-direction: column;
            }

            .onboarding-actions button {
                width: 100%;
            }

            .onboarding-step h2 {
                font-size: 20px;
            }
        }

        /* Extra small devices - iPhone SE 1st gen */
        @media (max-width: 375px) {
            .header h1 {
                font-size: 20px;
            }

            .tab-btn {
                min-width: 100px;
                padding: 12px 12px;
                font-size: 12px;
            }

            .card {
                padding: 12px;
            }

            body {
                padding: 8px;
            }
        }

        /* Inventory Styles */
        .restock-alert {
            background: rgba(245, 158, 11, 0.15);
            border: 1px solid var(--color-warning);
            border-radius: 8px;
            padding: 12px 16px;
            margin-bottom: 16px;
        }

        .alert-content {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 14px;
        }

        .alert-icon {
            font-size: 20px;
        }

        .alert-text {
            flex: 1;
            color: var(--color-text);
            font-weight: 500;
        }

        .alert-dismiss {
            background: none;
            border: none;
            color: var(--color-text-light);
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .alert-dismiss:hover {
            color: var(--color-text);
        }

        .inventory-card {
            background: var(--color-bg);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 12px;
        }

        .inventory-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .inventory-name {
            font-weight: 600;
            font-size: 15px;
            color: var(--color-text);
        }

        .btn-icon-edit {
            background: none;
            border: none;
            color: var(--color-text-light);
            font-size: 18px;
            cursor: pointer;
            padding: 4px 8px;
        }

        .btn-icon-edit:hover {
            color: var(--color-primary);
        }

        .inventory-details {
            display: flex;
            gap: 12px;
            align-items: center;
            margin-bottom: 12px;
            font-size: 12px;
        }

        .inventory-category {
            background: var(--color-surface);
            padding: 4px 8px;
            border-radius: 4px;
            color: var(--color-text-light);
            font-weight: 500;
        }

        .inventory-linked {
            color: var(--color-primary);
            font-weight: 500;
        }

        .inventory-controls {
            display: flex;
            align-items: center;
            gap: 16px;
            justify-content: center;
            margin: 12px 0;
        }

        .btn-count {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            width: 36px;
            height: 36px;
            border-radius: 6px;
            font-size: 20px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .btn-count:hover {
            background: var(--color-primary);
            color: white;
            border-color: var(--color-primary);
        }

        .inventory-count {
            font-size: 24px;
            font-weight: 700;
            color: var(--color-text);
            min-width: 40px;
            text-align: center;
        }

        .inventory-count.low-stock {
            color: var(--color-error);
        }

        .inventory-threshold {
            text-align: center;
            font-size: 11px;
            color: var(--color-text-light);
        }

        .difficulty-badge.easy {
            background: var(--color-success);
            color: white;
        }

        .difficulty-badge.medium {
            background: var(--color-warning);
            color: white;
        }

        .difficulty-badge.hard {
            background: var(--color-danger);
            color: white;
        }

        /* Login Screen */
        .login-screen {
            position: fixed;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--color-bg);
            z-index: 9999;
        }

        .login-card {
            text-align: center;
            padding: 40px 32px;
            background: var(--color-surface);
            border-radius: 16px;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
            max-width: 360px;
            width: 90%;
        }

        .login-card h1 {
            font-size: 24px;
            margin-bottom: 8px;
        }

        .login-card p {
            color: var(--color-text-light);
            margin-bottom: 24px;
        }

        .login-card input {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--color-border);
            border-radius: 8px;
            font-size: 16px;
            text-align: center;
            background: var(--color-bg);
            color: var(--color-text);
        }

        .login-error {
            color: var(--color-error);
            font-size: 13px;
            margin-top: 16px;
        }

        .btn-logout {
            background: none;
            border: 1px solid var(--color-border);
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            color: var(--color-text-light);
        }

        /* Print styles */
        @media print {
            body {
                background: white;
                color: black;
                padding: 0;
            }

            .header {
                border-bottom: 2px solid black;
                padding-bottom: 10px;
                margin-bottom: 20px;
            }

            .theme-toggle,
            .offline-indicator,
            .tabs,
            .btn-quick-action,
            .btn-timer,
            #alertContainer,
            .expand-btn,
            button,
            .modal,
            .button-group {
                display: none !important;
            }

            .tab-content {
                display: block !important;
                page-break-inside: avoid;
            }

            .card {
                border: 1px solid #ccc;
                page-break-inside: avoid;
                margin-bottom: 20px;
                box-shadow: none;
            }

            .task-item {
                border: 1px solid #ddd;
                page-break-inside: avoid;
            }

            .expand-content {
                display: block !important;
            }

            h1 {
                font-size: 24px;
            }

            h2, h3 {
                font-size: 18px;
                margin-top: 16px;
            }

            table {
                page-break-inside: avoid;
            }

            /* Show task checkboxes status */
            input[type="checkbox"]:checked::after {
                content: "✓";
            }
        }
