/* styles.css - Custom styling for HourTrack */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #121824;
    --bg-tertiary: #1e293b;
    --border-color: #293548;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;

    --primary-color: #e31b23;
    --primary-hover: #c61118;
    --brand-blue: #2b388f;
    --brand-green: #78903c;
    --brand-green-light: #b0c44c;
    --stop-color: #ef4444;
    --stop-hover: #dc2626;
    --success-color: #78903c;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.25), 0 2px 8px -1px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(255, 255, 255, 0.05) inset;
    --shadow-glow: 0 0 25px rgba(227, 27, 35, 0.25);

    --glass-bg: rgba(18, 24, 36, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-blur: blur(14px);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;
    --sidebar-width: 240px;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar Styles for Premium Feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
    border: 2px solid var(--bg-primary);
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

::selection {
    background: var(--primary-color);
    color: white;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(227, 27, 35, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(43, 56, 143, 0.04) 0%, transparent 60%);
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    align-self: flex-start;
    z-index: 10005;
    transition: var(--transition-normal);
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-navbar {
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.view-container {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* Hide inactive views */
.app-view {
    display: none;
}

.app-view.active {
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Sidebar Styles --- */
.sidebar-logo {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    gap: 10px;
}

.sidebar-logo img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
}

.sidebar-menu {
    list-style: none;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-spring);
    border: 1px solid transparent;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-left: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    padding-left: 13px;
}

.menu-item svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s var(--transition-spring);
}

.menu-item:hover svg {
    transform: scale(1.15);
}

.reports-submenu {
    list-style: none;
    padding-left: 36px;
    display: none;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.reports-submenu-item {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    border-radius: 6px;
}

.reports-submenu-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
    padding-left: 16px;
}

.reports-submenu-item.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    font-weight: 600;
    border-left: 2px solid var(--primary-color);
    border-radius: 0 6px 6px 0;
}

/* --- Header Styles --- */
.workspace-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13.5px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.workspace-selector:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #f43f5e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Timer Bar Component --- */
.timer-bar-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-premium), var(--shadow-md);
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.timer-bar-container:focus-within {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-premium), 0 0 25px rgba(255, 255, 255, 0.05);
}

.description-input-wrapper {
    flex: 1 1 auto;
    min-width: 180px;
    position: relative;
    display: flex;
    align-items: center;
}

.description-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    padding: 8px 36px 8px 0;
    font-weight: 500;
    transition: var(--transition-fast);
}

.description-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.8;
}

/* Dropdown triggers */
.selector-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border: 1px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    transition: var(--transition-spring);
}

.selector-trigger:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.selector-trigger.selected {
    border-style: solid;
    border-color: var(--glass-border);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.project-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

/* Billable toggle */
.billable-toggle {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    user-select: none;
    transition: var(--transition-spring);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.billable-toggle:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.billable-toggle.active {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

/* Manual Mode Time Range */
.manual-time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.manual-time-input {
    width: 78px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 10px;
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition-fast);
}

.manual-time-input:focus {
    border-color: var(--text-muted);
    outline: none;
}

.manual-date-picker {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

/* Active stopwatch display */
.stopwatch-display {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 90px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Action button */
.timer-btn {
    padding: 9px 26px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    min-width: 96px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-spring);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.timer-btn:active {
    transform: translateY(1px);
}

.timer-btn.start-btn {
    background: linear-gradient(135deg, var(--primary-color), #f43f5e);
    color: white;
}

.timer-btn.start-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), #e11d48);
}

.timer-btn.stop-btn {
    background: linear-gradient(135deg, var(--stop-color), #b91c1c);
    color: white;
    animation: buttonPulse 2s infinite;
}

.timer-btn.stop-btn:hover {
    background: linear-gradient(135deg, var(--stop-hover), #991b1b);
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.mode-switcher {
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mode-switcher:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dropdown-menu {
    position: absolute;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 260px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-search-wrapper {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-search {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
}

.dropdown-list-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.dropdown-list-item:hover,
.dropdown-list-item.selected {
    background-color: var(--bg-tertiary);
}

.dropdown-footer {
    padding: 8px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.1);
}

.create-inline-btn {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--primary-color);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition-fast);
}

.create-inline-btn:hover {
    background-color: var(--bg-tertiary);
}

/* --- Search and Filter Bar --- */
.filter-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.filter-input-wrapper {
    flex-grow: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-input {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.export-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover {
    background: var(--border-color);
}

/* --- Time Log List View --- */
.time-log-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.day-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 6px 4px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 6px;
}

.day-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-total-duration {
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 14px;
}

.log-entry-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    border: none;
}

/* Main row grid */
.log-row {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: grid;
    grid-template-columns: minmax(180px, 3fr) minmax(120px, 1.5fr) minmax(100px, 1.2fr) 40px minmax(130px, 1.5fr) 40px minmax(70px, 0.8fr) 40px 40px;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    transition: var(--transition-spring);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.log-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Editable field styling */
.editable-field {
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
    transition: var(--transition-fast);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editable-field:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

.editable-field input {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    outline: none;
}

.log-desc {
    color: var(--text-primary);
    font-weight: 500;
}

.log-desc.empty {
    color: var(--text-muted);
    font-style: italic;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    max-width: 100%;
}

.project-client-name {
    color: var(--text-muted);
    font-size: 10.5px;
    margin-left: 2px;
    font-weight: 400;
}

.tags-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-badge {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.billable-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.billable-indicator:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.billable-indicator.active {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.12);
}

.time-interval-range {
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
    font-weight: 500;
}

.time-entry-duration {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.row-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-spring);
}

.row-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: scale(1.1);
}

.row-action-btn:active {
    transform: scale(0.9);
}

.row-action-btn.play-btn:hover {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.15);
}

.row-action-btn.delete-btn:hover {
    color: var(--stop-color);
    background-color: rgba(239, 68, 68, 0.15);
}

/* --- Dashboard View & Analytics --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    min-height: 300px;
}

@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
}

/* --- Projects & Tags Manager Section --- */
.manager-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.manager-title {
    font-size: 18px;
    font-weight: 600;
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn:hover {
    background-color: var(--primary-hover);
}

.manager-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.manager-table th,
.manager-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.manager-table th {
    background-color: rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: var(--text-muted);
}

.manager-table tr:last-child td {
    border-bottom: none;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.secondary-btn:hover {
    background-color: var(--bg-tertiary);
}

/* --- Toast System --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.toast {
    background-color: #334155;
    border: 1px solid #475569;
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 280px;
    transform: translateY(100px);
    opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-action {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 11px;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* --- Calendar View Styling --- */

.calendar-control-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-view-switcher {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.switcher-btn {
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.switcher-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.switcher-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.switcher-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-nav-buttons {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.nav-arrow-btn {
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow-btn:hover {
    background-color: var(--border-color);
}

.nav-arrow-btn:first-child {
    border-right: 1px solid var(--border-color);
}

/* Calendar grid container layout */
.calendar-grid-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    min-height: 500px;
    box-shadow: var(--shadow-sm);
}

.calendar-header-row {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.time-header-cell {
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
}

.cal-zoom-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    padding: 0;
    line-height: 1;
    user-select: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.cal-zoom-btn:hover {
    background-color: var(--border-color);
    border-color: var(--text-muted);
}

.calendar-header-row.day-view-header .day-header-cell {
    align-items: flex-start;
    padding: 12px 20px;
    text-align: left;
}

.calendar-header-row.day-view-header .day-header-cell.today {
    background-color: transparent;
}

.day-header-title-date {
    font-size: 14px;
    font-weight: 600;
    color: #03a9f4;
}

.day-header-cell {
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    text-align: center;
}

.day-header-cell:last-child {
    border-right: none;
}

.day-header-cell.today {
    background-color: rgba(227, 27, 35, 0.04);
}

.day-header-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.day-header-cell.today .day-header-title {
    color: var(--primary-color);
}

.day-header-date {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

.day-header-cell.today .day-header-date {
    background-color: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-header-duration {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* Scroll area body */
.calendar-scroll-area {
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
}

.calendar-grid-body {
    display: grid;
    grid-template-columns: 60px 1fr;
    position: relative;
    --hour-height: 60px;
}

.time-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.time-cell {
    height: var(--hour-height);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
    padding-right: 8px;
    padding-top: 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
}

.lanes-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    position: relative;
    height: calc(12 * var(--hour-height));
    background-size: 100% var(--hour-height);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cline x1='0' y1='0' x2='100%25' y2='0' stroke='%23293548' stroke-width='1' stroke-dasharray='4,4'/%3E%3C/svg%3E");
}

.day-lane {
    position: relative;
    height: 100%;
    border-right: 1px solid var(--border-color);
    box-sizing: border-box;
}

.day-lane:last-child {
    border-right: none;
}

.day-lane:hover {
    background-color: rgba(255, 255, 255, 0.005);
}

/* Time cards absolute positioning */
.calendar-card {
    position: absolute;
    left: 6px;
    right: 6px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    z-index: 5;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.calendar-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
    z-index: 10;
}

.card-desc {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-project {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-duration {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Current time marker */
.current-time-marker {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #03a9f4;
    z-index: 8;
    pointer-events: none;
}

.current-time-marker::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #03a9f4;
}

/* Calendar Date Selector Pane Styles */
.date-quick-options .quick-option-item {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.date-quick-options .quick-option-item:hover,
.date-quick-options .quick-option-item.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.date-quick-options .quick-option-item.active {
    border-left-color: var(--primary-color);
}

.cal-day-cell {
    height: 26px;
    width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition-fast);
    margin: 1px auto;
    user-select: none;
    -webkit-user-select: none;
}

.cal-day-cell:hover {
    background-color: var(--bg-tertiary);
}

.cal-day-cell.other-month {
    color: rgba(255, 255, 255, 0.2);
}

.cal-day-cell.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    border-radius: 50%;
}

/* Days inside selected range — lighter fill between start and end */
.cal-day-cell.in-range {
    background-color: rgba(239, 68, 68, 0.25);
    color: var(--text-primary);
    border-radius: 0;
    font-weight: 500;
}

/* Make first/last of in-range row rounded on the outer edges */
.cal-day-cell.active {
    border-radius: 50% !important;
}

.cal-day-cell.today-marker {
    border: 1px solid var(--primary-color);
}

/* Date dropdown nav arrow hover */
#dashCalPrevMonthBtn:hover,
#dashCalNextMonthBtn:hover,
#calPrevMonthBtn:hover,
#calNextMonthBtn:hover,
#singleCalPrevMonthBtn:hover,
#singleCalNextMonthBtn:hover {
    background-color: var(--bg-tertiary) !important;
}

/* Modern Toggle Switch Slider */
.switch-container {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: .3s;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider-round {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input:checked+.slider-round:before {
    transform: translateX(20px);
    background-color: white;
}

/* --- Upgraded Dashboard & Team Activities Styles --- */

.project-dist-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.project-dist-row:last-child {
    border-bottom: none;
}

.project-dist-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
}

.project-dist-name-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-dist-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-family: monospace;
}

.project-dist-bar-wrapper {
    width: 100%;
    height: 6px;
    background-color: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.project-dist-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Team Activities list container */
#dashTeamActivitiesList {
    background-color: var(--bg-secondary);
}

.team-activity-row {
    background-color: var(--bg-secondary);
    display: grid;
    grid-template-columns: 1.1fr 1.8fr 1.5fr;
    padding: 10px 16px;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.team-activity-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.team-activity-member {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 10px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
}

.member-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-latest-activity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    overflow: hidden;
    width: 100%;
}

.activity-desc {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.activity-desc.empty {
    color: var(--text-muted);
    font-style: italic;
}

.activity-project-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-status-in-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--stop-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    width: fit-content;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--stop-color);
    border-radius: 50%;
    display: inline-block;
    animation: blinker 1.2s cubic-bezier(0.5, 0, 1, 1) infinite alternate;
}

@keyframes blinker {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.1;
    }
}

.activity-time-ago {
    font-size: 11px;
    color: var(--text-muted);
}

.team-activity-duration {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    width: 100%;
}

.activity-total-time {
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.stacked-progress-bar {
    flex-grow: 1;
    max-width: 200px;
    height: 16px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: filter 0.15s ease;
}

.stacked-progress-bar:hover {
    filter: brightness(1.1);
}

.stacked-segment {
    height: 100%;
    transition: width 0.4s ease;
}

/* Float-above interactive breakdown tooltip */
.team-activity-tooltip {
    position: absolute;
    background-color: #cbd5e1;
    color: #1e293b;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    pointer-events: none;
    font-size: 11px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: opacity 0.15s ease;
}

.team-activity-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #cbd5e1 transparent;
    display: block;
    width: 0;
}

/* Spinning circular arrow rotation */
@keyframes spin-cw {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinning-icon {
    animation: spin-cw 8s linear infinite;
    display: inline-block;
}

/* Custom dashboard dropdown elements scrollbars */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Premium Clockify Upgrade button and Icons */
.upgrade-btn:hover {
    background-color: #0274a4 !important;
}

.nav-icon {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-icon:hover {
    opacity: 1;
}

.load-more-btn:hover {
    background-color: var(--border-color) !important;
}

.sortable-header {
    transition: color 0.15s ease;
}

.sortable-header:hover {
    color: var(--text-primary);
}

/* --- Grouping & Nested Rows Styles --- */
.group-count-badge {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.group-count-badge:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.group-toggle-icon {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.group-toggle-icon:hover {
    color: var(--text-primary);
}

.group-toggle-icon.expanded {
    transform: rotate(90deg);
}

.log-row.nested-row {
    background-color: rgba(255, 255, 255, 0.005);
    border-left: 3px solid var(--border-color);
}

.log-row.nested-row:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.nested-row .log-desc {
    padding-left: 24px;
}

/* --- Pagination Controls Styles --- */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    background-color: transparent;
    user-select: none;
}

.pagination-left {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    overflow: hidden;
}

.pagination-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.pagination-nav-btn:hover:not(:disabled) {
    background-color: var(--bg-tertiary);
}

.pagination-nav-btn:disabled {
    color: var(--text-muted);
    opacity: 0.3;
    cursor: not-allowed;
    background-color: transparent;
}

.pagination-info-box {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0 16px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-select-wrapper {
    position: relative;
}

.pagination-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 68px;
    height: 36px;
    transition: var(--transition-fast);
}

.pagination-select-trigger:hover {
    background-color: var(--bg-tertiary);
}

.pagination-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    list-style: none;
    padding: 4px 0;
    margin: 0;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
}

.pagination-select-dropdown.active {
    display: block;
}

.pagination-select-dropdown li {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.pagination-select-dropdown li:hover {
    background-color: var(--bg-tertiary);
}

.pagination-select-dropdown li.active {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--primary-color);
}

.pagination-select-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Dashboard Layout Adjustments for Clockify Parity --- */

.dashboard-metrics-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 20px 0;
    width: 100%;
}

.dashboard-metrics-bar .metric-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dashboard-metrics-bar .metric-section:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.dashboard-metrics-bar .metric-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-metrics-bar .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.project-dist-row {
    display: grid;
    grid-template-columns: 1fr 90px 140px 60px;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.project-dist-row:last-child {
    border-bottom: none;
}

.project-dist-name {
    text-align: left;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-dist-duration {
    text-align: right;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.project-dist-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.project-dist-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.project-dist-pct {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Reports Specific CSS --- */
#reports-view .manager-table {
    border-collapse: collapse;
    border: none;
}

#reports-view .group-header-row {
    background-color: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

#reports-view .group-header-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

#reports-view .group-sub-row {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s;
}

#reports-view .group-sub-row:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

#reports-view .entry-count-badge {
    border: 1px solid var(--border-color);
}

.reports-quick-option-item:hover {
    background-color: var(--bg-tertiary);
}

.dropdown-menu .checkbox-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-menu .checkbox-item.select-all {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    padding-bottom: 8px;
}

.dropdown-header-label {
    user-select: none;
}

.dropdown-header-label span {
    pointer-events: auto;
}

/* --- Reports Filter Bar Restyling --- */
.reports-nav-bar {
    margin-bottom: 16px;
    background: transparent;
    padding: 0;
    border: none;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reports-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reports-type-btn {
    min-width: 140px;
    height: 36px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    transition: background-color 0.2s, border-color 0.2s;
}

.reports-type-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.reports-type-btn .dropdown-caret {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.reports-tab-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    height: 36px;
}

.reports-tab-btn {
    border: none;
    border-right: 1px solid var(--border-color);
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background-color: transparent;
    color: var(--text-muted);
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.reports-tab-btn:last-child {
    border-right: none;
}

.reports-tab-btn.active {
    background-color: #24323f;
    /* Dark blue-gray active state */
    color: #ffffff;
    font-weight: 600;
}

.reports-tab-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

/* Unified Filter Bar */
.reports-filter-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: stretch;
    margin-bottom: 20px;
    height: 46px;
    padding: 0;
    overflow: visible;
}

.reports-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 100%;
    cursor: pointer;
    background-color: transparent;
    border: none;
    border-right: 1px dotted rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    user-select: none;
    gap: 8px;
}

.reports-filter-item:first-of-type {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.reports-filter-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.reports-filter-item:last-of-type {
    border-right: none;
}

.reports-filter-item .dropdown-caret {
    width: 12px;
    height: 12px;
    color: var(--text-muted);
    margin-left: 4px;
    flex-shrink: 0;
}

.reports-filter-item.filter-label-btn {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.reports-apply-btn {
    margin-left: auto;
    margin-right: 12px;
    align-self: center;
    background-color: #0284c7;
    /* Clockify blue */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.reports-apply-btn:hover {
    background-color: #0274ae;
}

.reports-apply-btn.inactive {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    opacity: 0.5;
    pointer-events: none;
    box-shadow: none;
}

.filter-badge {
    position: absolute;
    top: -5px;
    right: 18px;
    background-color: #0284c7;
    /* Clockify blue */
    color: #ffffff;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    padding: 0 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.reports-export-option-item:hover {
    background-color: var(--bg-tertiary);
}

/* Reports Date Picker Dropdown Styles */
#reportsDateRangeDropdown {
    display: none;
    flex-direction: row;
}

#reportsDateRangeDropdown.active {
    display: flex !important;
}

.reports-quick-option-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.reports-quick-option-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.reports-quick-option-item.active {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-left: 3px solid var(--primary-color);
    padding-left: 13px;
}

.cal-day-cell {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 12px;
    position: relative;
    border-radius: 4px;
    transition: background-color 0.1s, color 0.1s;
    user-select: none;
}

.cal-day-cell:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.cal-day-cell.other-month {
    color: rgba(255, 255, 255, 0.15);
}

.cal-day-cell.start-date,
.cal-day-cell.end-date {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 50%;
}

.cal-day-cell.in-range {
    background-color: rgba(2, 132, 199, 0.15);
    border-radius: 0;
}

/* --- Detailed Reports View Styles --- */
#reports-detailed-container {
    animation: fadeIn 0.25s ease-out;
}

.detailed-row {
    transition: background-color 0.15s ease;
}

.detailed-row:hover {
    background-color: rgba(255, 255, 255, 0.015) !important;
}

/* Checkboxes */
.detailed-row td input[type="checkbox"],
#detailedReportsTable th input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0284c7;
    cursor: pointer;
}

/* Inline input fields */
.detailed-input-desc {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s, background-color 0.15s;
}

.detailed-input-desc:hover {
    border-color: var(--border-color);
    background-color: rgba(255, 255, 255, 0.02);
}

.detailed-input-desc:focus {
    border-color: #0284c7;
    background-color: var(--bg-tertiary);
    outline: none;
}

/* Billable toggle symbol */
.detailed-billable {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.detailed-billable:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.detailed-billable.active {
    color: #0284c7;
}

/* User Selection Column */
.detailed-user-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
    max-width: 180px;
    box-sizing: border-box;
    user-select: none;
}

.detailed-user-selector:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.detailed-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detailed-user-name {
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Date / Time edit field */
.detailed-time-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.15s, background-color 0.15s;
    user-select: none;
}

.detailed-time-display:hover {
    border-color: var(--border-color);
    background-color: rgba(255, 255, 255, 0.03);
}

.detailed-time-range {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: monospace;
}

.detailed-time-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* Time Edit inputs */
.detailed-time-edit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.detailed-time-edit-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.detailed-time-input {
    width: 60px;
    font-size: 11px;
    text-align: center;
    background: var(--bg-tertiary);
    color: white;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 4px;
}

/* Duration Edit field */
.detailed-duration-display {
    cursor: pointer;
    font-family: monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.15s, background-color 0.15s;
    user-select: none;
}

.detailed-duration-display:hover {
    border-color: var(--border-color);
    background-color: rgba(255, 255, 255, 0.03);
}

.detailed-input-duration {
    width: 70px;
    font-family: monospace;
    font-size: 12px;
    text-align: right;
    background: var(--bg-tertiary);
    color: white;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 6px;
}

/* Detailed table sorting headers visual indicator */
#detailedReportsTable th.sortable-header {
    transition: color 0.15s, background-color 0.15s;
}

#detailedReportsTable th.sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

#detailedReportsTable th.sortable-header.sorted-asc,
#detailedReportsTable th.sortable-header.sorted-desc {
    color: #0284c7;
    font-weight: 700;
}

/* Project selection on Detailed tab */
.detailed-project-badge-wrapper {
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    max-width: 100%;
    transition: background 0.15s;
}

.detailed-project-badge-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Tags selection on Detailed tab */
.detailed-tag-badge-wrapper {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    transition: background 0.15s;
}

.detailed-tag-badge-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Weekly Report styles */
#weeklyReportsTable {
    width: 100%;
    border-collapse: collapse;
}

#weeklyReportsTable th {
    padding: 12px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

#weeklyReportsTable td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Alignments for columns */
#weeklyReportsTable th:first-child,
#weeklyReportsTable td:first-child {
    text-align: left;
    min-width: 250px;
    padding-left: 20px;
}

#weeklyReportsTable th.weekly-day-header,
#weeklyReportsTable td.weekly-day-cell {
    text-align: center;
    width: 10%;
    font-family: monospace;
    font-size: 12px;
}

#weeklyReportsTable th:last-child,
#weeklyReportsTable td:last-child {
    text-align: right;
    width: 120px;
    font-family: monospace;
    font-weight: 600;
    padding-right: 20px;
}

/* Empty day cell dash styling */
.weekly-empty-dash {
    color: #475569;
    font-weight: 400;
}

/* Active day cell styling */
.weekly-active-time {
    color: var(--text-primary);
    font-weight: 500;
}

/* Weekly row index badge */
.weekly-row-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 12px;
    user-select: none;
    vertical-align: middle;
}

/* Project indicator styling */
.weekly-project-name {
    font-weight: 500;
    color: var(--text-primary);
    vertical-align: middle;
}

.weekly-project-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* User avatar in weekly view */
.weekly-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    margin-right: 8px;
    vertical-align: middle;
    user-select: none;
}

.weekly-user-name {
    font-weight: 500;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Total row styling */
.weekly-total-row {
    background-color: var(--bg-tertiary);
}

.weekly-total-row td {
    font-weight: 700 !important;
    color: var(--text-primary);
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

/* Weekly specific option selection highlights */
.weekly-groupby-option.active,
.weekly-showtime-option.active {
    background-color: var(--bg-tertiary);
    color: #0284c7;
    font-weight: 600;
}

/* Detailed Pagination Styles */
.detailed-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 12px 0;
}

.detailed-pagination-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.detailed-pagination-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.detailed-pagination-btn:hover:not([disabled]) {
    background-color: var(--bg-tertiary);
}

.detailed-pagination-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: transparent;
}

.detailed-pagination-label {
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

.detailed-pagination-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

.detailed-pagination-select-wrapper {
    display: flex;
    align-items: center;
}

.detailed-pagination-select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 8px 28px 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 8px auto;
    min-width: 54px;
    height: 34px;
    transition: border-color 0.2s;
}

.detailed-pagination-select:hover {
    border-color: var(--text-muted);
}

.detailed-pagination-select-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* --- Login Screen --- */
.login-container {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(227, 27, 35, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(43, 56, 143, 0.08) 0%, transparent 50%),
        #0b0f19;
    padding: 24px;
}

.login-container.active {
    display: flex;
}

.login-card {
    background: rgba(18, 24, 36, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 26px;
    animation: loginFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    margin-bottom: 4px;
}

.login-logo img {
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.login-logo-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-logo-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.login-input {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: var(--transition-normal);
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), #f43f5e);
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(227, 27, 35, 0.2);
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), #e11d48);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(227, 27, 35, 0.3);
}

.login-btn:active {
    transform: translateY(1px);
}

.login-error {
    color: #fca5a5;
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    display: none;
    line-height: 1.4;
}

.back-to-login:hover {
    color: var(--text-primary) !important;
}

#forgotPasswordLink:hover {
    opacity: 0.8;
}

.login-btn-ms:hover {
    background-color: #242424 !important;
    border-color: #444 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-btn-ms:active {
    transform: translateY(1px);
}

/* --- Loading Overlay Spinner Modal --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay .loading-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 220px;
    text-align: center;
}

.loading-overlay .loading-logo {
    width: 50px;
    height: 40px;
    object-fit: contain;
    animation: pulse 2s infinite ease-in-out;
}

.loading-overlay .loading-spinner {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(227, 27, 35, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

.loading-overlay .loading-message {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.96);
    }

    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

/* --- App Theme Variations --- */
body.theme-classic-dark {
    --bg-primary: #10141e;
    /* Distinct main content dark blue-gray */
    --bg-secondary: #07090d;
    /* Rich, dark sidebar & header */
    --bg-tertiary: #19202f;
    /* Slightly lighter content card background */
    --border-color: #202737;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #e31b23;
    --primary-hover: #c61118;
    --glass-bg: rgba(7, 9, 13, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
}

body.theme-light-pro {
    --bg-primary: #f1f5f9;
    /* Off-white/light-gray main content background */
    --bg-secondary: #ffffff;
    /* Pure white sidebar & header for clean contrast */
    --bg-tertiary: #e2e8f0;
    /* Slightly darker light-gray content cards */
    --border-color: #cbd5e1;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --primary-color: #0284c7;
    --primary-hover: #0369a1;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
}

body.theme-nordic-frost {
    --bg-primary: #1e293b;
    /* Slate blue main content background */
    --bg-secondary: #0f172a;
    /* Deep space slate for sidebar & header */
    --bg-tertiary: #334155;
    /* Slate card background */
    --border-color: #475569;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #14b8a6;
    --primary-hover: #0d9488;
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
}

body.theme-forest-spruce {
    --bg-primary: #131e18;
    /* Spruce dark green main content */
    --bg-secondary: #080d0a;
    /* Deep forest shadow for sidebar & header */
    --bg-tertiary: #203026;
    /* Middle green content cards */
    --border-color: #2b3d32;
    --text-primary: #f0fdf4;
    --text-muted: #86efac;
    --primary-color: #10b981;
    --primary-hover: #059669;
    --glass-bg: rgba(8, 13, 10, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
}

body.theme-sunset-aubergine {
    --bg-primary: #1c132d;
    /* Warm deep plum main content */
    --bg-secondary: #0f0a18;
    /* Dark shadow purple for sidebar & header */
    --bg-tertiary: #2a1b43;
    /* Plum content cards */
    --border-color: #3b255e;
    --text-primary: #fdfaff;
    --text-muted: #c084fc;
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --glass-bg: rgba(15, 10, 24, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
}

body.theme-carbon-gold {
    --bg-primary: #1f1f1f;
    /* Matte carbon gray main content */
    --bg-secondary: #121212;
    /* Sleek black carbon for sidebar & header */
    --bg-tertiary: #2e2e2e;
    /* Medium carbon cards */
    --border-color: #3a3a3a;
    --text-primary: #f3f3f3;
    --text-muted: #a3a3a3;
    --primary-color: #f59e0b;
    --primary-hover: #d97706;
    --glass-bg: rgba(18, 18, 18, 0.75);
    --glass-border: rgba(255, 255, 255, 0.07);
}

.theme-option:hover {
    background-color: var(--bg-tertiary) !important;
}

.theme-option.active {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-left: 3px solid var(--primary-color) !important;
}

/* --- Rich Project/Task Selector Dropdown Styles --- */
.dropdown-menu#projectDropdown {
    width: 320px !important;
    max-height: 480px !important;
}

.project-client-group {
    border-bottom: 1px solid var(--border-color);
}

.project-client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.02);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    user-select: none;
}

.project-client-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-client-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-client-toggle:hover {
    color: var(--text-primary);
}

.project-client-link {
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.project-client-link:hover {
    color: var(--text-primary);
}

.project-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background-color 0.15s;
}

.project-item-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.project-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-tasks-toggle {
    color: #0284c7;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    user-select: none;
}

.project-tasks-toggle:hover {
    color: #0ea5e9;
    text-decoration: underline;
}

.project-star-btn,
.task-star-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
}

.project-star-btn:hover,
.task-star-btn:hover {
    color: #f59e0b;
}

.project-star-btn.starred,
.task-star-btn.starred {
    color: #f59e0b;
}

.project-tasks-list {
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding-left: 20px;
}

.task-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.15s;
}

.task-item-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.create-task-inline-row {
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.1);
}

.create-task-input {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    outline: none;
}

.create-task-btn {
    background-color: #0284c7;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

.create-task-btn:hover {
    background-color: #0369a1;
}

/* AI Description Assistant Styles */
.ai-improve-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ai-improve-btn:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

#aiEnhancedDescription:focus {
    border-color: var(--primary-color);
}

#aiEnhancedDescription:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Hide Tags and Dollar Sign ($) Application-Wide
   ========================================================================== */
#tagSelectorTrigger,
#timerBillable,
.billable-indicator,
.billable-toggle,
.tags-container,
.tag-badge,
.tag-trigger-cell,
#tagDropdown,
.menu-item[data-view="tags"],
#tags-view,
#editEntryTagTrigger,
#customSwitchBillable,
label[for="editEntryBillable"],
#reportsTagTrigger,
#reportsBillableTimeContainer,
#bulkEditTagsBtn,
#bulkEditBillableBtn {
    display: none !important;
}

/* Approvals Badge & Nav */
#approvalsMenuItem .menu-item.active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}