/* Root Variables - Design Tokens */
:root {
    --bg-primary: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-bg-hover: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-active: rgba(255, 255, 255, 0.16);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Brand Colors & Accent Gradients */
    --accent-blue: #00d2ff;
    --accent-blue-rgb: 0, 210, 255;
    --accent-green: #00f2fe;
    --accent-purple: #7f00ff;
    
    /* Control States */
    --color-idle: #9ca3af;
    --color-working: #10b981;
    --color-break: #f59e0b;
    --color-lunch: #06b6d4;
    --color-danger: #ef4444;
    
    /* Font Weights */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Safe area insets for iPhone notch/Dynamic Island */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    display: flex;
    justify-content: center;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Decorative Background Elements */
.glass-bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.bg-circle-1 {
    top: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 80%);
}

.bg-circle-2 {
    bottom: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 80%);
}

.bg-circle-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-working) 0%, transparent 80%);
    opacity: 0.08;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1400px;
    padding: 2rem;
    padding-top: calc(2rem + var(--safe-top));
    padding-bottom: calc(2rem + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--card-border-active);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.logo-icon i {
    width: 24px;
    height: 24px;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 40%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--card-border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-idle);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.status-dot.pulse {
    animation: status-pulse 1.8s infinite alternate;
}

@keyframes status-pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 8px currentColor; }
}

.status-text {
    font-size: 0.85rem;
    font-weight: var(--fw-medium);
    white-space: nowrap;
}

/* Icon Buttons */
.icon-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.icon-button-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.icon-button-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.icon-button-small i {
    width: 16px;
    height: 16px;
}

/* Settings Panel */
.settings-panel {
    transition: var(--transition-smooth);
}

.settings-panel.hidden {
    display: none;
}

.settings-card {
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.75rem;
}

.settings-header h2 {
    font-size: 1.1rem;
    font-weight: var(--fw-semibold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-header h2 i {
    color: var(--accent-blue);
    width: 20px;
    height: 20px;
}

.close-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-button:hover {
    color: var(--text-primary);
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    min-width: 0;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

.primary-button {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-weight: var(--fw-semibold);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.primary-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.settings-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

.key-display-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.key-display-wrapper code {
    font-family: monospace;
    font-size: 1rem;
    color: var(--accent-green);
    letter-spacing: 0.05em;
    user-select: all;
    word-break: break-all;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-working);
    font-weight: var(--fw-medium);
}

.sync-status i {
    width: 14px;
    height: 14px;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
}

.dashboard-col-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Timer Card */
.timer-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.timer-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
}

.card-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.card-label {
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.live-date {
    font-size: 0.8rem;
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.time-block span:first-child {
    font-size: 3rem;
    font-weight: var(--fw-extrabold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.time-label {
    font-size: 0.65rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
}

.time-separator {
    font-size: 2.5rem;
    font-weight: var(--fw-light);
    color: var(--text-muted);
    transform: translateY(-8px);
    animation: blinker 1.5s infinite;
}

@keyframes blinker {
    50% { opacity: 0.3; }
}

.active-shift-details {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--card-border);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-item .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

.detail-item .value {
    font-size: 0.85rem;
    font-weight: var(--fw-semibold);
}

.detail-divider {
    width: 1px;
    background-color: var(--card-border);
}

/* Controls Card */
.controls-card h2 {
    font-size: 1.1rem;
    font-weight: var(--fw-semibold);
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-btn {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.btn-icon i {
    width: 20px;
    height: 20px;
}

.btn-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.btn-title {
    font-size: 1rem;
    font-weight: var(--fw-bold);
}

.btn-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Shift Start State */
.control-btn.shift-start {
    border-color: rgba(16, 185, 129, 0.3);
    background: radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.05), transparent);
}
.control-btn.shift-start .btn-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-working);
}
.control-btn.shift-start:hover {
    border-color: var(--color-working);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

/* Shift End State */
.control-btn.shift-end {
    border-color: rgba(239, 68, 68, 0.3);
    background: radial-gradient(circle at 90% 10%, rgba(239, 68, 68, 0.05), transparent);
}
.control-btn.shift-end .btn-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}
.control-btn.shift-end:hover {
    border-color: var(--color-danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.sub-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sub-controls .control-btn {
    padding: 0.75rem;
    border-radius: 12px;
    gap: 0.5rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sub-controls .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.sub-controls .btn-title {
    font-size: 0.85rem;
}

/* Break Button active state */
.control-btn.break-btn {
    border-color: rgba(245, 158, 11, 0.3);
}
.control-btn.break-btn .btn-icon {
    color: var(--color-break);
}
.control-btn.break-btn:not(:disabled):hover {
    border-color: var(--color-break);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}
.control-btn.break-active {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--color-break);
    animation: break-pulse 2s infinite alternate;
}

/* Lunch Button active state */
.control-btn.lunch-btn {
    border-color: rgba(6, 182, 212, 0.3);
}
.control-btn.lunch-btn .btn-icon {
    color: var(--color-lunch);
}
.control-btn.lunch-btn:not(:disabled):hover {
    border-color: var(--color-lunch);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
    transform: translateY(-2px);
}
.control-btn.lunch-active {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--color-lunch);
    animation: lunch-pulse 2s infinite alternate;
}

@keyframes break-pulse {
    0% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
    100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
}

@keyframes lunch-pulse {
    0% { box-shadow: 0 0 8px rgba(6, 182, 212, 0.2); }
    100% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.4); }
}

/* Metrics Section */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i {
    width: 24px;
    height: 24px;
}

.metric-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.metric-label {
    font-size: 0.7rem;
    font-weight: var(--fw-bold);
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    line-height: 1.2;
    margin: 0.1rem 0;
    font-variant-numeric: tabular-nums;
}

.metric-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Highlight Net Metric */
.highlight-metric {
    grid-column: span 2;
    background: radial-gradient(ellipse at bottom, rgba(0, 210, 255, 0.08) 0%, var(--card-bg) 70%);
    border-color: rgba(0, 210, 255, 0.2);
}

.net-icon { background: rgba(0, 210, 255, 0.1); color: var(--accent-blue); }
.gross-icon { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.break-icon { background: rgba(245, 158, 11, 0.1); color: var(--color-break); }
.lunch-icon { background: rgba(6, 182, 212, 0.1); color: var(--color-lunch); }

/* History Section */
.history-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.history-header h2 {
    font-size: 1.1rem;
    font-weight: var(--fw-semibold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-header h2 i {
    color: var(--accent-purple);
    width: 20px;
    height: 20px;
}

/* History Filters */
.history-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

.filter-row {
    display: flex;
    gap: 0.75rem;
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.filter-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    width: 100%;
    color-scheme: dark;
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.12);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-btn i {
    width: 14px;
    height: 14px;
}

.filter-btn.week-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
    background: rgba(127, 0, 255, 0.08);
}

.filter-btn.clear-btn:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
}

/* History Summary */
.history-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: var(--fw-semibold);
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.summary-title i {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.summary-item.highlight {
    position: relative;
}

.summary-item.highlight .summary-value {
    color: var(--accent-blue);
}

.summary-label {
    font-size: 0.65rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: var(--fw-bold);
    font-variant-numeric: tabular-nums;
}

.summary-break { color: var(--color-break); }
.summary-lunch { color: var(--color-lunch); }
.summary-net { color: var(--accent-blue); }

/* Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.history-table th, .history-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--card-border);
}

.history-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: var(--fw-semibold);
    white-space: nowrap;
}

.history-table tbody tr {
    transition: var(--transition-fast);
}

.history-table tbody tr:hover {
    background: var(--card-bg-hover);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
}

.empty-row td {
    padding: 2rem !important;
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.delete-btn:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.delete-btn i {
    width: 14px;
    height: 14px;
}

/* Mobile History Cards (hidden on desktop) */
.history-cards-mobile {
    display: none;
}

.mobile-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: 0.85rem;
}

.history-card-mobile {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
}

.history-card-mobile:last-child {
    margin-bottom: 0;
}

.hcm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--card-border);
}

.hcm-date {
    font-weight: var(--fw-bold);
    font-size: 0.95rem;
}

.hcm-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
    text-align: right;
}

.hcm-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.hcm-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.hcm-label {
    font-size: 0.6rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.hcm-value {
    font-size: 0.85rem;
    font-weight: var(--fw-bold);
    font-variant-numeric: tabular-nums;
}

.hcm-break { color: var(--color-break); }
.hcm-lunch { color: var(--color-lunch); }
.hcm-net { color: var(--accent-blue); }

.hcm-net-metric {
    background: rgba(0, 210, 255, 0.05);
    border-radius: 8px;
    padding: 0.3rem;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(10, 11, 16, 0.95);
    border: 1px solid var(--card-border-active);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    max-width: calc(100vw - 2rem);
}

.toast.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.toast-success { border-color: rgba(16, 185, 129, 0.4); color: #a7f3d0; }
.toast-error { border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.toast-info { border-color: rgba(0, 210, 255, 0.4); color: #e0f2fe; }

/* ==========================================
   RESPONSIVE - Tablet (max-width: 1024px)
   ========================================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-col-left {
        max-width: 100%;
    }
}

/* ==========================================
   RESPONSIVE - Mobile (max-width: 640px)
   ========================================== */
@media (max-width: 640px) {
    .app-container {
        padding: 0.75rem;
        padding-top: calc(0.75rem + var(--safe-top));
        padding-bottom: calc(0.75rem + var(--safe-bottom));
        gap: 1rem;
    }
    
    /* Header - Mobile */
    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        padding: 1rem;
        border-radius: 16px;
    }
    
    .logo-area {
        gap: 0.75rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .logo-icon i {
        width: 20px;
        height: 20px;
    }
    
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 0.7rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Glass Cards - Mobile */
    .glass-card {
        border-radius: 16px;
        padding: 1.25rem;
    }
    
    .glass-card:hover {
        /* Disable hover effects on mobile */
        border-color: var(--card-border);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    }
    
    /* Timer - Mobile */
    .timer-card {
        gap: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
    
    .timer-display {
        margin: 0.5rem 0;
        gap: 0.25rem;
    }
    
    .timer-display .time-block {
        width: 65px;
    }
    
    .timer-display .time-block span:first-child {
        font-size: 2.5rem;
    }
    
    .time-separator {
        font-size: 2rem;
    }
    
    .active-shift-details {
        padding: 0.6rem 0.75rem;
        border-radius: 10px;
    }
    
    /* Controls - Mobile */
    .controls-card h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .control-btn {
        padding: 0.85rem;
        border-radius: 14px;
        gap: 0.75rem;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .btn-title {
        font-size: 0.95rem;
    }
    
    .btn-desc {
        font-size: 0.7rem;
    }
    
    .sub-controls {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .sub-controls .control-btn {
        padding: 0.65rem 0.5rem;
    }
    
    .sub-controls .btn-desc {
        display: none;
    }
    
    /* Metrics - Mobile */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .highlight-metric {
        grid-column: span 2;
    }
    
    .metric-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
    }
    
    .metric-icon i {
        width: 20px;
        height: 20px;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .metric-label {
        font-size: 0.6rem;
    }
    
    .metric-sub {
        display: none;
    }
    
    /* History - Mobile: Hide table, show cards */
    .table-container {
        display: none;
    }
    
    .history-cards-mobile {
        display: block;
    }
    
    .history-header h2 {
        font-size: 1rem;
    }
    
    /* Filters - Mobile */
    .history-filters {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-actions {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex: 1;
        justify-content: center;
        padding: 0.55rem 0.7rem;
        font-size: 0.75rem;
    }
    
    /* Summary - Mobile */
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .summary-value {
        font-size: 1rem;
    }
    
    /* Settings - Mobile */
    .settings-card {
        border-radius: 16px;
    }
    
    .settings-header h2 {
        font-size: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .primary-button {
        width: 100%;
        text-align: center;
    }
    
    .key-display-wrapper code {
        font-size: 0.8rem;
    }
    
    /* Toast - Mobile */
    .toast {
        bottom: calc(1rem + var(--safe-bottom));
        left: 1rem;
        right: 1rem;
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }
    
    /* Footer - Mobile */
    .app-footer {
        font-size: 0.65rem;
        padding: 0.75rem 0;
    }
    
    /* Reduce background blur effects on mobile for performance */
    .bg-circle {
        filter: blur(60px);
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    .timer-display .time-block {
        width: 55px;
    }
    
    .timer-display .time-block span:first-child {
        font-size: 2rem;
    }
    
    .time-separator {
        font-size: 1.5rem;
    }
    
    .hcm-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .hcm-net-metric {
        grid-column: span 2;
    }
    
    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================
   PASSWORD MODAL & BLUR EFFECT
   ========================================== */
.app-blurred {
    filter: blur(20px) saturate(60%);
    pointer-events: none;
    user-select: none;
}

.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 9, 12, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: var(--transition-smooth);
}

.password-modal-hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.password-card {
    width: 90%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    text-align: center;
    border-color: var(--card-border-active);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.password-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.password-icon i {
    width: 24px;
    height: 24px;
}

.password-header h2 {
    font-size: 1.35rem;
    font-weight: var(--fw-bold);
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #fff, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.password-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.password-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.password-input-wrapper input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    text-align: center;
    min-width: 0;
    transition: var(--transition-fast);
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.password-error {
    color: var(--color-danger);
    font-size: 0.8rem;
    font-weight: var(--fw-medium);
    margin-top: 0.75rem;
}

/* Shake Animation */
.shake {
    animation: shake-anim 0.5s ease-in-out;
}

@keyframes shake-anim {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-10px); }
    30%, 60%, 90% { transform: translateX(10px); }
}

/* ==========================================
   SETTINGS - ACTIONS LIST & BUTTONS
   ========================================== */
.settings-actions-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.settings-action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--card-border);
}

.settings-action-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.action-desc {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
}

.action-desc strong {
    font-size: 0.9rem;
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.action-desc span {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.danger-button {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: var(--fw-semibold);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.danger-button:hover {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
    transform: translateY(-1px);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: var(--fw-semibold);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .settings-action-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .danger-button, .secondary-button {
        width: 100%;
        justify-content: center;
    }
    
    .password-card {
        padding: 2rem 1.25rem;
    }
    
    .password-input-wrapper {
        flex-direction: column;
    }
}
