:root {
    --primary: #252525;
    --background: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --accent: #007AFF;
    --danger: #FF3B30;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 24px;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

#app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--card-bg);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* --- Common --- */
.hidden {
    display: none !important;
}

/* --- Login / Front Page --- */
.header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.login-title {
    padding: 20px;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.user-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px;
    scrollbar-width: none;
}

.user-scroll-container::-webkit-scrollbar {
    display: none;
}

.user-card {
    flex: 0 0 140px;
    height: 160px;
    background: #FAFAFA;
    border-radius: var(--radius);
    border: 1px solid #EEEEEE;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 80px;
    height: 80px;
    background-color: #DDD;
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #FFF;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
}

.divider {
    height: 4px;
    background-color: #F0F0F0;
    border-radius: 2px;
    margin: 40px 20px;
    width: 100px;
    align-self: center;
}

.admin-section {
    padding: 20px;
    margin-top: auto;
}

.admin-card {
    background-color: #F8F9FA;
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid #EEE;
    cursor: pointer;
}

.admin-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.admin-placeholder-lines div {
    height: 10px;
    background: #E0E0E0;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* --- Modal --- */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    width: 90%;
    max-height: 80%;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Password Modal Specifics */
.password-modal {
    text-align: center;
}

.password-input {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    border: 2px solid #EEE;
    border-radius: 12px;
    font-size: 18px;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}

.password-input:focus {
    border-color: var(--accent);
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

/* --- Dashboard --- */
.dash-header {
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-greet-time h2 {
    margin: 0;
    font-size: 24px;
}

.user-greet-time p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.dash-icons {
    display: flex;
    gap: 15px;
    font-size: 20px;
    color: var(--text-main);
    align-items: center;
}

.current-task-card {
    margin: 0 20px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    /* To suggest it's clickable in empty state */
}

.task-status-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 10px;
}

.timer-display {
    font-size: 48px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 10px 0 30px 0;
}

.control-btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.control-btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    flex: 1;
}

.btn-pause {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-end {
    background: var(--card-bg);
    color: var(--text-main);
}

.task-adder-section {
    margin: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    text-align: center;
    border: 2px dashed #E0E0E0;
    cursor: pointer;
}

.task-adder-section:hover {
    background: #F9F9F9;
    border-color: #CCC;
}

.add-icon {
    font-size: 24px;
    color: var(--text-muted);
}

/* --- Task Selector Modal --- */
.task-selector-header {
    margin-bottom: 20px;
}

.search-bar {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #EEE;
    border-radius: 12px;
    font-size: 16px;
    background: #F5F5F5;
    outline: none;
    box-sizing: border-box;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.category-tab {
    padding: 8px 16px;
    background: #F0F0F0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
}

.category-tab.active {
    background: var(--primary);
    color: white;
}

.task-grid-scroll {
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding-right: 5px;
    /* space for scrollbar if any */
}

.task-item {
    background: #FAFAFA;
    aspect-ratio: 1;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #EEE;
    cursor: pointer;
}

.task-item:hover {
    border-color: var(--accent);
    background: #F0F8FF;
}

.task-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.task-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* Logout Button */
/* --- Reports Gauge --- */
.gauge-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.gauge-item {
    text-align: center;
    width: 100px;
}

.gauge-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(#EEE 0%, #EEE 100%);
    /* JS will update this */
    position: relative;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-inner {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge-value {
    font-weight: 700;
    font-size: 16px;
}

.gauge-target {
    font-size: 10px;
    color: #888;
}

.gauge-label {
    font-size: 14px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    margin-top: 5px;
    font-weight: bold;
}

.status-pass {
    background: #34C759;
}

.status-fail {
    background: #FF3B30;
}

/* --- Settings Modal --- */
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #F0F0F0;
}

.settings-label {
    font-weight: 600;
    font-size: 14px;
}

/* Inline Task Grid */
.inline-task-section {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.inline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.fab-add {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 28px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.fab-add:hover {
    transform: scale(1.1);
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

/* Shake Animation for Edit Mode */
@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(1deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-1deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.shake-anim {
    animation: shake 0.3s infinite;
    border: 1px dashed var(--accent) !important;
    background-color: #FFF8F0 !important;
}