* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    width: 100%;
}

body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
}

body.auth-page .container {
    width: 100%;
    max-width: 540px;
    margin: 0;
    display: flex;
    justify-content: center;
}

body.auth-page .login-card {
    margin: 0;
    width: 100%;
}

/* Phone keyboard: pin the card into the visible viewport above the keys. */
body.auth-page.keyboard-open {
    align-items: flex-start;
}

body.auth-page.keyboard-open .container {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--auth-vv-top, 0px);
    height: var(--auth-vv-height, 100dvh);
    max-width: none;
    margin: 0;
    padding: 0.5rem 1rem 0.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    box-sizing: border-box;
    overscroll-behavior: none;
}

body.auth-page.keyboard-open .login-card {
    padding: 1.15rem 1.35rem;
    width: min(100%, 500px);
}

body.auth-page.keyboard-open .form-group {
    margin-bottom: 0.75rem;
}

body.auth-page.keyboard-open .login-card h1 {
    margin-bottom: 0.25rem;
}

body.auth-page.keyboard-open .login-card h2 {
    margin-top: 0.25rem;
    margin-bottom: 0.6rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 1.5rem;
    margin: 0;
}

.navbar-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: color 0.2s;
}

.beta-badge,
.env-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12em 0.4em;
    border: 1px solid rgba(102, 126, 234, 0.35);
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(102, 126, 234, 0.08);
    color: #7b86c9;
    line-height: 1.2;
    flex-shrink: 0;
    vertical-align: middle;
}

.env-badge[hidden] {
    display: none;
}

.env-badge.env-preview {
    border-color: rgba(217, 119, 6, 0.45);
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.env-badge.env-live {
    border-color: rgba(5, 150, 105, 0.4);
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.login-brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 0.35rem;
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-title:hover {
    color: #5568d3;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links span {
    color: #666;
    font-weight: 500;
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.pseudo-login-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* Admin Pseudo Login Dropdown */
.admin-pseudo-login {
    position: relative;
}

.admin-pseudo-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-pseudo-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.admin-pseudo-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    max-height: 400px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.admin-pseudo-dropdown.active {
    display: flex;
}

.admin-pseudo-search {
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.admin-pseudo-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.admin-pseudo-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-pseudo-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.admin-pseudo-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.admin-pseudo-item:hover {
    background-color: #f9fafb;
}

.admin-pseudo-item:last-child {
    border-bottom: none;
}

.admin-pseudo-item-name {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.admin-pseudo-item-email {
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-pseudo-empty {
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.admin-pseudo-footer {
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.admin-return-btn {
    width: 100%;
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-return-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Dark mode for admin pseudo login dropdown */
html.dark-mode .admin-pseudo-search {
    border-top-color: #374151;
}

html.dark-mode .admin-pseudo-search input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .admin-pseudo-search input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

html.dark-mode .admin-pseudo-search input::placeholder {
    color: #9ca3af;
}

html.dark-mode .admin-pseudo-item {
    border-bottom-color: #374151;
}

html.dark-mode .admin-pseudo-item:hover {
    background-color: #374151;
}

html.dark-mode .admin-pseudo-item-name {
    color: #f3f4f6;
}

html.dark-mode .admin-pseudo-item-email {
    color: #9ca3af;
}

html.dark-mode .admin-pseudo-empty {
    color: #9ca3af;
}

html.dark-mode .admin-pseudo-footer {
    border-top-color: #374151;
    background-color: #111827;
}

/* Cards */
.login-card, .form-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.form-card {
    max-width: 800px;
}

.login-card h1, .form-card h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.login-org {
    margin: 0 0 0.35rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #764ba2;
}

.login-logo {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 0.85rem;
    object-fit: contain;
}

body.auth-page.keyboard-open .login-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Timed entry fields */
.timed-entry-toggle {
    margin-bottom: 1rem;
}

.timed-entry-toggle .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.timed-entry-toggle .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.time-fields-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.time-fields-container .form-group {
    margin-bottom: 1rem;
}

.time-fields-container .form-group:last-of-type {
    margin-bottom: 0.5rem;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group input[type="time"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="time"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.time-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

@media (max-width: 480px) {
    .time-inputs {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn[hidden] {
    display: none !important;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #c0392b;
    color: white;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex: 1;
}

/* Entry Type Toggle */
.entry-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: #f5f5f5;
    padding: 0.25rem;
    border-radius: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Messages */
.error-message, .success-message, .message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.error-message:empty,
.success-message:empty,
.message:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

.error-message {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.success-message {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.message {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.text-center {
    text-align: center;
    margin-top: 1rem;
}

.text-center a {
    color: #667eea;
    text-decoration: none;
}

.text-center a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.deadline-reminder {
    color: #666;
    font-style: italic;
}

.current-week-section, .previous-weeks-section {
    margin-bottom: 2rem;
}

.current-week-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-week-section h3, .previous-weeks-section h3 {
    color: white;
    margin-bottom: 0;
    font-size: 1.25rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.goals-section h3 {
    color: white;
    margin-bottom: 0;
    font-size: 1.25rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.current-week-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}

.current-week-toggle::before {
    content: '▼';
    display: block;
}

.current-week-toggle.collapsed::before {
    content: '▶';
}

.previous-weeks-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.previous-weeks-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}

.previous-weeks-toggle::before {
    content: '▼';
    display: block;
}

.previous-weeks-toggle.collapsed::before {
    content: '▶';
}

.summary-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.summary-item-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.weeks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.week-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.week-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.week-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.week-date {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.week-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: #667eea;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.week-toggle::before {
    content: '▶';
    display: block;
}

.week-toggle.expanded::before {
    content: '▼';
}

.week-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.week-summary-item {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.week-summary-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.week-summary-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #667eea;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Profile Page */
.profile-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.profile-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.profile-hint {
    margin: -0.25rem 0 1rem;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.45;
}

.team-email-row .form-group {
    margin-bottom: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.team-logins-table-wrap {
    overflow-x: auto;
    margin: 0 0 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.team-logins-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.9rem;
}

.team-logins-table th {
    position: relative;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 0.5rem 0.65rem;
    background: #f8f9fc;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.team-logins-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}

.team-logins-table tbody tr:last-child td {
    border-bottom: 0;
}

.team-logins-table tbody tr:hover td {
    background: #fafbff;
}

.team-logins-table input[type="text"],
.team-logins-table input[type="email"] {
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.15rem;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    box-shadow: none;
}

.team-logins-table input[type="text"]:focus,
.team-logins-table input[type="email"]:focus {
    outline: none;
    background: rgba(102, 126, 234, 0.08);
}

.team-name-cell {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.team-name-cell input {
    flex: 1;
    min-width: 0;
}

.team-logins-actions-col {
    width: 10rem;
    min-width: 10rem;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.team-logins-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    white-space: nowrap;
}

.team-logins-table col.team-logins-select-col,
.team-logins-table th.team-logins-select-col,
.team-logins-table td.team-logins-select-col {
    width: 48px;
    max-width: 48px;
    min-width: 48px;
}

.team-logins-table col.team-logins-name-col {
    width: 9.5rem;
}

.team-logins-table col.team-logins-email-col {
    width: auto;
}

.team-logins-table col.team-logins-lastLogin-col {
    width: 9.25rem;
}

.team-logins-last-login-col .team-last-login {
    display: block;
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-col-resizer {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
    touch-action: none;
}

.team-col-resizer::after {
    content: '';
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: 4px;
    width: 2px;
    border-radius: 1px;
    background: #c5cad3;
}

.team-col-resizer:hover::after,
.team-col-resizer:focus-visible::after,
.team-col-resizer.is-dragging::after {
    background: #667eea;
}

.team-col-resizer:focus-visible {
    outline: none;
}

body.team-col-resizing {
    cursor: col-resize;
    user-select: none;
}

body.team-col-resizing iframe,
body.team-col-resizing input {
    pointer-events: none;
}

.team-logins-table th.team-logins-select-col,
.team-logins-table td.team-logins-select-col {
    text-align: center;
    padding-left: 0.7rem;
    padding-right: 0.35rem;
    box-sizing: border-box;
    overflow: hidden;
}

.team-logins-select-col input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #667eea;
    cursor: pointer;
    vertical-align: middle;
}

.team-logins-select-col input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.team-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.7rem;
    background: #f8f9fc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.team-bulk-bar[hidden] {
    display: none !important;
}

.team-bulk-bar #teamBulkCount {
    flex: 1;
    min-width: 6rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4b5563;
}

.team-bulk-bar .btn {
    width: auto;
}

.team-bulk-bar .btn:disabled,
.team-bulk-dialog .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.team-bulk-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}

.team-bulk-dialog[hidden] {
    display: none !important;
}

body.team-bulk-dialog-open {
    overflow: hidden;
}

.team-bulk-dialog-card {
    width: min(100%, 28rem);
    max-height: min(90vh, 36rem);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.35rem 1.15rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.team-bulk-dialog-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.team-bulk-names {
    margin: 0.75rem 0 1rem;
    padding: 0.55rem 0.85rem;
    max-height: 10rem;
    overflow: auto;
    list-style: none;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.team-bulk-names li {
    padding: 0.28rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #eef0f4;
}

.team-bulk-names li:last-child {
    border-bottom: 0;
}

.team-bulk-names span {
    display: block;
    color: #6b7280;
    font-size: 0.78rem;
}

.team-bulk-confirm-label {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.88rem;
}

.team-bulk-dialog-card input[type="text"] {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.55rem 0.7rem;
    font-size: 1rem;
    letter-spacing: 0.04em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.team-bulk-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.team-bulk-dialog-actions .btn {
    width: auto;
}

.team-bulk-dialog .btn-primary:hover {
    transform: none;
    box-shadow: none;
}

.temp-password-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e4dcf8;
}

.temp-password-row:last-child {
    border-bottom: 0;
}

.temp-password-row code {
    margin: 0;
    font-size: 1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    flex: 0 0 2rem;
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

.btn-icon:hover:not(:disabled) {
    background: #f3f4f6;
    color: #111827;
}

.btn-icon.save-user-btn:hover:not(:disabled),
.btn-icon.btn-icon-approve:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.btn-icon-danger {
    color: #c0392b;
}

.btn-icon-danger:hover {
    background: #fdecea;
    color: #922b21;
    border-color: #e6b0aa;
}

.btn-icon.toggle-admin-btn.is-admin {
    color: #667eea;
    border-color: #c7d2fe;
    background: rgba(102, 126, 234, 0.1);
}

.btn-icon.toggle-admin-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.google-login-mark-compact {
    padding: 0.2rem;
}

.google-login-mark-compact svg {
    width: 14px;
    height: 14px;
}

.google-login-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: #3c4043;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 999px;
    padding: 0.12rem 0.42rem 0.12rem 0.28rem;
    line-height: 1;
    vertical-align: middle;
}

.google-login-mark svg {
    width: 12px;
    height: 12px;
    display: block;
    flex-shrink: 0;
}

.join-request-name .google-login-mark {
    margin-left: 0.35rem;
}

.add-person-open {
    display: inline-flex;
    align-items: center;
    width: auto;
    margin: 0.15rem 0 1rem;
    padding: 0.4rem 0.75rem;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: none;
}

.add-person-open:hover {
    background: #f8f9fc;
    color: #111827;
    transform: none;
    box-shadow: none;
}

.add-person-open[hidden] {
    display: none !important;
}

#addPersonPanel[hidden] {
    display: none !important;
}

#addPersonPanel .team-subhead {
    margin-top: 0.35rem;
}

.add-people-table col.add-people-admin-col,
.add-people-table th.add-people-admin-col,
.add-people-table td.add-people-admin-col {
    width: 4.25rem;
    text-align: center;
}

.add-people-table col.add-people-remove-col,
.add-people-table th.add-people-remove-col,
.add-people-table td.add-people-remove-col {
    width: 2.75rem;
    min-width: 2.75rem;
    text-align: right;
}

.add-people-table .add-user-admin {
    justify-content: center;
    min-height: 0;
}

.add-people-another {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-top: 1px solid #eef0f4;
    background: #fff;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: 0 0 10px 10px;
}

.add-people-another:hover {
    background: #fafbff;
    color: #111827;
}

.add-people-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0.55rem 0 1rem;
}

.add-people-submit,
.add-people-cancel {
    width: auto;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
}

.add-people-submit {
    background: #4b5563;
    color: #fff;
}

.add-people-submit:hover {
    background: #374151;
    transform: none;
    box-shadow: none;
}

.add-people-cancel {
    background: #fff;
    color: #4b5563;
    border-color: #e5e7eb;
}

.add-people-cancel:hover {
    background: #f8f9fc;
    color: #111827;
}

.add-user-admin label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
    margin: 0;
    min-height: 2.75rem;
}

.add-user-admin input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.team-subhead {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-people-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.5rem 0 0.5rem;
}

.team-people-head .team-subhead {
    margin: 0;
}

.team-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.32rem 0.65rem;
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.team-filter-toggle svg {
    width: 14px;
    height: 14px;
    display: block;
}

.team-filter-toggle:hover {
    background: #f8f9fc;
    color: #111827;
}

.team-filter-toggle.is-open,
.team-filter-toggle.is-active {
    border-color: #c7d2fe;
    color: #4f46e5;
    background: rgba(102, 126, 234, 0.08);
}

.team-filter-toggle[hidden] {
    display: none !important;
}

.team-filter-row th {
    background: #fff;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: normal;
}

.team-filter-row[hidden] {
    display: none !important;
}

.team-filter-input {
    width: 100%;
    margin: 0;
    padding: 0.32rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: none;
}

.team-filter-input:focus {
    outline: none;
    border-color: #a5b4fc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

#teamFilterEmpty[hidden] {
    display: none !important;
}

.join-requests-empty {
    margin: 0 0 1.25rem;
    color: #666;
}

.join-request-name {
    margin: 0;
    font-weight: 600;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.join-request-email {
    word-break: break-word;
}

.join-request-email,
.join-request-meta {
    margin: 0.15rem 0 0;
    color: #666;
    font-size: 0.8rem;
}

.join-request-note {
    margin: 0;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.team-logins-table .add-user-admin label {
    min-height: 0;
    justify-content: center;
}

.team-feedback:not(:empty) {
    position: sticky;
    top: 0.75rem;
    z-index: 40;
    margin: 0 0 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .team-feedback:not(:empty) {
        top: calc(48px + 0.5rem);
    }
}

.temp-password-card {
    background: #f3f0ff;
    border: 1px solid #c5b7f0;
    border-radius: 8px;
    padding: 1rem 1.15rem;
    margin: 0 0 1.25rem;
}

.temp-password-card p {
    margin: 0 0 0.5rem;
    color: #333;
}

.temp-password-card code {
    display: block;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    margin: 0.35rem 0 0.75rem;
    word-break: break-all;
}

.gmail-mail-card {
    background: #f7f8fc;
    border: 1px solid #d9deea;
    border-radius: 8px;
    padding: 1rem 1.15rem;
    margin: 0 0 1.25rem;
}

.gmail-mail-card p {
    margin: 0 0 0.75rem;
    color: #333;
}

.gmail-mail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.gmail-mail-actions .btn {
    width: auto;
}

@media (max-width: 700px) {
    .team-logins-table {
        min-width: 48rem;
    }

    .team-bulk-bar {
        align-items: stretch;
    }

    .team-bulk-bar .btn {
        flex: 1 1 auto;
    }
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: #888;
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.btn-google {
    width: 100%;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.2);
    transform: none;
}

.btn-google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-links {
    margin-top: 1.1rem;
}

.login-card > #authNotice {
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

#googleJoinWrap {
    margin-bottom: 0.25rem;
}

.optional-label {
    font-weight: 400;
    color: #777;
}

.login-card textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font: inherit;
    resize: vertical;
    min-height: 4.5rem;
}

.login-card textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Progress Comparison */
.progress-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.progress-item {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    overflow: visible;
    box-shadow: none;
}

.progress-item.clickable-progress-item {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

.progress-item.clickable-progress-item:hover {
    border-color: #667eea;
    box-shadow: none;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    min-width: 0;
}

.progress-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    text-transform: capitalize;
    flex-shrink: 1;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

.clear-week-button {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
    z-index: 10;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.progress-item:hover .clear-week-button {
    display: flex;
}

.clear-week-button:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.clear-week-button svg {
    width: 12px;
    height: 12px;
}

.progress-values {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.timer-icon-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.1s;
    line-height: 1;
}

.timer-icon-btn:hover {
    color: #5568d3;
    transform: scale(1.1);
}

.timer-icon-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.timer-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 32px;
    flex-shrink: 0;
}

.timer-btn-inline {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #667eea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 4px;
    box-sizing: border-box;
}

.timer-btn-inline:hover {
    color: #5568d3;
    background-color: rgba(0, 0, 0, 0.06);
}

.timer-btn-inline svg {
    display: block;
}

.timer-btn-inline.timer-icon {
    position: relative;
    padding: 0.5rem;
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
}

.timer-btn-inline.timer-icon svg {
    width: 16px;
    height: 16px;
    transition: opacity 0.2s;
}

.timer-btn-inline.timer-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='5 3 19 12 5 21 5 3' fill='black'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='black' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='5 3 19 12 5 21 5 3' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.timer-btn-inline.timer-icon:hover svg {
    opacity: 0;
}

.timer-btn-inline.timer-icon:hover::after {
    opacity: 1;
}

.timer-btn-inline.timer-stop {
    padding: 0.5rem;
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 4px;
}

.timer-btn-inline.timer-play {
    padding: 0.5rem;
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 4px;
}

.timer-btn-inline.timer-stop svg,
.timer-btn-inline.timer-play svg {
    width: 16px;
    height: 16px;
}

.timer-btn-inline.timer-reset,
.timer-btn-inline.timer-log {
    padding: 0.5rem;
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    position: relative;
}

.timer-btn-inline.timer-reset svg,
.timer-btn-inline.timer-log svg {
    width: 16px;
    height: 16px;
}

/* Timer log menu dropdown */
.timer-log-menu {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    z-index: 10000;
}

.timer-log-menu.timer-log-right {
    position: absolute;
    right: 0;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
}

.timer-btn-inline.timer-log-menu-btn {
    padding: 0.5rem;
    min-width: 32px;
    min-height: 32px;
    width: auto;
    height: 32px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.timer-btn-inline.timer-log-menu-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.timer-log-menu-arrow {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.7;
}

.timer-log-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 10001;
    display: none;
    overflow: hidden;
}

.timer-log-menu-dropdown.open {
    display: block;
}

.timer-log-menu-item {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    text-align: left;
    background: none;
    border: none;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.timer-log-menu-item:last-child {
    border-bottom: none;
}

.timer-log-menu-item:hover {
    background-color: #f5f5f5;
}

.timer-log-menu-item:active {
    background-color: #e8e8e8;
}

/* Timer note modal */
.timer-note-modal {
    max-width: 500px;
}

.timer-note-content {
    padding: 1rem 0;
}

.timer-note-time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.timer-note-time-label {
    font-weight: 500;
    color: #666;
}

.timer-note-time-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
}

.timer-note-input-section {
    margin-bottom: 1rem;
}

.timer-note-input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.timer-note-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.timer-note-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tagify styling for timer note input */
.timer-note-input.tagify,
.timer-note-input.tagify--mix .tagify__input {
    text-align: left !important;
    justify-content: flex-start !important;
    min-height: 2.5rem;
}

.timer-note-input.tagify--mix .tagify__input {
    line-height: 1.6 !important;
}

.timer-note-input.tagify--mix .tagify__tag {
    margin: 2px 4px 2px 0 !important;
    vertical-align: baseline;
}

.timer-note-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.timer-display-inline {
    font-size: 0.9rem;
    font-weight: 500;
    color: #667eea;
    min-width: 50px;
    user-select: none;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 32px;
    flex-shrink: 0;
}

.actual-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    white-space: nowrap;
    line-height: 1.2;
}

.progress-values .goal-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: inherit;
    white-space: nowrap;
    line-height: 1.2;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: #667eea;
    border-radius: 12px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 32px;
    flex-shrink: 0;
    min-width: 0;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.progress-footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 1;
}

.progress-percentage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.timer-controls {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-display {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    min-width: 60px;
}

.timer-buttons {
    display: flex;
    gap: 0.5rem;
}

.timer-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.timer-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.timer-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.timer-btn:active {
    transform: translateY(0);
}

.timer-btn.timer-start {
    background: #28a745;
}

.timer-btn.timer-start:hover {
    background: #218838;
}

.timer-btn.timer-stop {
    background: #dc3545;
}

.timer-btn.timer-stop:hover {
    background: #c82333;
}

.timer-btn.timer-reset {
    background: #6c757d;
}

.timer-btn.timer-reset:hover {
    background: #5a6268;
}

.timer-btn.timer-log {
    background: #667eea;
}

.timer-btn.timer-log:hover {
    background: #5568d3;
}

.no-goal-message {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
    padding: 0.25rem 0 0.5rem;
}

/* Goals Section */
.goals-section {
    margin-top: 2rem;
}

/* Logs Section */
.logs-section {
    margin-top: 2rem;
}

.logs-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logs-section h3 {
    color: white;
    margin-bottom: 0;
    font-size: 1.25rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.logs-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}

.logs-toggle::before {
    content: '▼';
    display: block;
}

.logs-toggle.collapsed::before {
    content: '▶';
}

/* Logs Filters */
.logs-filters {
    background: white;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logs-filters-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    user-select: none;
}

.logs-filters-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.logs-filters-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: #667eea;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}

.logs-filters-toggle::before {
    content: '▼';
    display: block;
}

.logs-filters-toggle.collapsed::before {
    content: '▶';
}

.logs-filters-content {
    padding: 1.5rem;
    display: block;
}

.logs-filters.collapsed .logs-filters-content {
    display: none;
}

.logs-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.logs-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logs-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.25rem;
}

.logs-filter-date-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logs-filter-date-input {
    flex: 1;
    min-width: 140px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.logs-filter-date-input:focus {
    outline: none;
    border-color: #667eea;
}

.logs-filter-select {
    min-width: 160px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
}

.logs-filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.logs-filter-date-separator {
    color: #999;
    font-size: 0.875rem;
}

.logs-filter-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logs-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #333;
    user-select: none;
}

.logs-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.logs-filter-tags {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem;
    background: #f8f9fa;
}

.logs-filter-tags-loading {
    color: #999;
    font-size: 0.875rem;
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
}

.logs-filter-tags-empty {
    color: #999;
    font-size: 0.875rem;
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
}

.logs-filters-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.logs-filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.logs-filter-btn-secondary {
    background: #6c757d;
    color: white;
}

.logs-filter-btn-secondary:hover {
    background: #5a6268;
}

@media (max-width: 768px) {
    .logs-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .logs-filter-date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logs-filter-date-separator {
        display: none;
    }
}

.logs-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logs-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.logs-table-header {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
    background: #f8f9fa;
    white-space: nowrap;
}

.logs-table-row {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
    height: auto;
    min-height: 2.5rem;
}

.logs-table-row:hover {
    background-color: #f8f9fa;
}

.logs-table-cell {
    padding: 0.75rem 1rem;
    color: #333;
    vertical-align: top;
}

.logs-table-date {
    white-space: nowrap;
    font-weight: 500;
    color: #667eea;
    min-width: 120px;
}

.logs-table-category {
    font-weight: 500;
    min-width: 140px;
}

.logs-table-time {
    white-space: nowrap;
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.logs-table-time:hover:not(.editing) {
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.logs-table-time.editing {
    background-color: rgba(102, 126, 234, 0.15);
}

.logs-time-wrapper {
    position: relative;
    padding: 0.25rem 0;
}

.logs-table-notes {
    color: #666;
    max-width: 300px;
    word-wrap: break-word;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    white-space: normal;
    overflow-wrap: break-word;
}

.logs-table-notes:hover:not(.editing) {
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.logs-table-notes.editing {
    background-color: rgba(102, 126, 234, 0.15);
}

.logs-notes-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.logs-notes-display {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.logs-table-empty {
    color: #999;
    font-style: italic;
}

.logs-save-btn-inline,
.logs-delete-btn-inline {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.logs-save-btn-inline {
    color: #667eea;
    opacity: 0;
}

.logs-delete-btn-inline {
    color: #dc3545;
    opacity: 0;
}

.logs-table-row:hover .logs-save-btn-inline,
.logs-table-row:hover .logs-delete-btn-inline {
    opacity: 1;
}

.logs-table-notes.editing .logs-save-btn-inline,
.logs-table-notes.editing .logs-delete-btn-inline {
    opacity: 0 !important;
    pointer-events: none !important;
}

.logs-save-btn-inline:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5568d3;
}

.logs-delete-btn-inline:hover {
    background: #ffeaea;
    color: #c82333;
}

.logs-time-edit-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logs-time-decrease,
.logs-time-increase {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #667eea;
    border-radius: 4px;
    background: white;
    color: #667eea;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.logs-time-decrease:hover,
.logs-time-increase:hover {
    background: #667eea;
    color: white;
}

.logs-time-decrease:active,
.logs-time-increase:active {
    transform: scale(0.95);
}

.logs-time-edit,
.logs-notes-edit {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #667eea;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.logs-time-edit {
    max-width: 100px;
    flex: 1;
}

.logs-notes-edit {
    min-width: 200px;
    max-width: 100%;
    box-sizing: border-box;
}

.logs-time-edit:focus,
.logs-notes-edit:focus {
    outline: none;
    border-color: #5568d3;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.logs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.logs-pagination-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    min-width: 36px;
    height: 36px;
}

.logs-pagination-btn:hover:not(:disabled) {
    background: #5568d3;
}

.logs-pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.logs-pagination-info {
    color: #666;
    font-size: 0.9rem;
}

.logs-empty {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

.goals-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.goals-section h3 {
    color: white;
    margin-bottom: 0;
    font-size: 1.25rem;
}

.goals-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}

.goals-toggle::before {
    content: '▼';
    display: block;
}

.goals-toggle.collapsed::before {
    content: '▶';
}

.goals-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: none;
}

.goals-section-header {
    position: relative;
}

.goals-tip-button,
.current-week-tip-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    padding: 0;
    margin-left: 0.5rem;
    border-radius: 4px;
    transition: opacity 0.2s;
    opacity: 1;
    vertical-align: middle;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    width: 20px;
    height: 20px;
}

.goals-tip-button svg,
.current-week-tip-button svg {
    width: 100%;
    height: 100%;
}

.goals-tip-button:hover,
.current-week-tip-button:hover {
    opacity: 0.8;
}

.goals-info-box,
.current-week-info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.goals-info-box small,
.current-week-info-box small {
    color: #1976d2;
    font-size: 0.75rem;
    display: block;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.goal-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}

.goal-item:hover {
    border-color: #667eea;
    box-shadow: none;
}

.goal-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
    font-weight: 500;
}

.goal-value-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.goal-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
    outline: none;
    cursor: text;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.goal-value.editing {
    background-color: #fff;
    border: none;
    padding: 0.25rem 0.5rem;
}

.goal-unit {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.goals-actions {
    margin-top: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: #667eea;
    margin: 0;
}

.error-modal {
    max-width: 400px;
}

.error-modal-content {
    padding: 1rem 0;
}

.error-modal-content .error-message {
    color: #d32f2f;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.error-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

/* Timer Note Modal (Save Timer) */
.timer-note-modal {
    max-width: 450px;
}

.timer-note-content {
    padding: 0.5rem 0;
}

.timer-note-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.timer-note-time-label {
    font-weight: 500;
    color: #333;
}

.timer-note-time-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
}

.timer-note-input-section {
    margin-bottom: 1rem;
}

.timer-note-input-section label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.timer-note-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
}

.timer-note-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.timer-note-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 0.5rem;
}

/* Quick Add Modal - Minimalist Design */
.quick-add-modal {
    max-width: 400px;
    padding: 1.5rem;
}

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

.quick-add-notes-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.1s;
    line-height: 1;
    border-radius: 6px;
    flex-shrink: 0;
}

.quick-add-notes-icon:hover {
    color: #5568d3;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.quick-add-notes-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.quick-add-notes-section {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.quick-add-notes-label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.quick-add-notes-input,
.quick-add-notes-input.tagify,
.tagify--mix .tagify__input,
#quickAddNotes.tagify .tagify__input {
    text-align: left !important;
    justify-content: flex-start !important;
}

/* Add vertical spacing between tags in mix mode */
.tagify--mix .tagify__input {
    line-height: 1.6 !important;
    min-height: auto;
}

.tagify--mix .tagify__tag {
    margin: 2px 4px 2px 0 !important;
    vertical-align: baseline;
}

/* Ensure tags in notes fields have proper spacing */
.logs-notes-edit.tagify--mix .tagify__input,
.logs-notes-edit.tagify--mix .tagify__tag {
    line-height: 1.6;
}

.logs-notes-edit.tagify--mix .tagify__tag {
    margin: 2px 4px 2px 0 !important;
}

.quick-add-notes-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
}

.quick-add-notes-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.quick-add-modal .modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.quick-add-modal .modal-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.quick-add-modal .modal-header .quick-add-week-total {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.quick-add-content {
    text-align: center;
}

.quick-add-today {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-add-value {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    display: block;
    line-height: 1.2;
}

.quick-add-date-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.quick-add-date-button {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.quick-add-date-button:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.quick-add-date-input {
    padding: 0.5rem 1rem;
    border: 1px solid #667eea;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #333;
    background: white;
    cursor: pointer;
    width: auto;
    min-width: 140px;
}

.quick-add-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.quick-add-label {
    font-size: 0.875rem;
    color: #666;
    display: inline;
}


.quick-add-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quick-add-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.quick-add-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.quick-add-btn:active {
    transform: scale(0.95);
}

.quick-add-input {
    width: 120px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: #333;
    transition: border-color 0.2s;
}

.quick-add-input:focus {
    outline: none;
    border-color: #667eea;
}

.quick-add-preview {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    min-height: 1.5rem;
}

.quick-add-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.quick-add-save-wrapper {
    flex: 0.6;
    display: flex;
    position: relative;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
}

.quick-add-save {
    flex: 1;
    margin-top: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    position: relative;
    color: transparent;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
}

.quick-add-save-wrapper .quick-add-save-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    color: white;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
}

.quick-add-save:hover {
    transform: none;
}

.quick-add-save-dropdown {
    background: #667eea;
    color: white;
    border: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    padding: 0 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.quick-add-save-dropdown:hover {
    background: #5568d3;
}

.quick-add-save-dropdown svg {
    display: block;
}

.quick-add-save-menu {
    position: fixed;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    min-width: 150px;
    overflow: hidden;
}

.quick-add-save-menu-item {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    color: #333;
    transition: background 0.2s;
    font-family: inherit;
}

.quick-add-save-menu-item:hover {
    background: #f5f5f5;
}

/* Mobile adjustments for quick-add modal */
@media (max-width: 768px) {
    .quick-add-modal {
        max-width: 90%;
        padding: 1.25rem;
    }

    .quick-add-value {
        font-size: 2.5rem;
    }

    .quick-add-btn {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .quick-add-input {
        width: 100px;
        font-size: 1.1rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        padding: 8px;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
    }

    .navbar {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }

    .navbar h1 {
        font-size: 1.25rem;
    }

    .nav-container {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0 10px;
    }

    .nav-links {
        width: auto;
        gap: 0.5rem;
        font-size: 0.875rem;
    }

    .nav-links span {
        font-size: 0.75rem;
    }
    
    /* Show admin badge on mobile */
    .admin-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
        margin-left: 0.3rem;
        color: #ffffff !important;
    }
    
    .pseudo-login-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
        margin-left: 0.3rem;
        color: #ffffff !important;
    }
    
    .admin-pseudo-dropdown {
        right: 0;
        left: auto;
        min-width: 250px;
        max-width: calc(100vw - 20px);
    }
    
    .admin-pseudo-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .dashboard-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .dashboard-header h2 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .deadline-reminder {
        font-size: 0.875rem;
    }

    .current-week-section, .previous-weeks-section, .logs-section {
        margin-bottom: 1rem;
    }

    .current-week-section h3, .previous-weeks-section h3, .goals-section h3, .logs-section h3 {
        font-size: 1rem;
    }

    .summary-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .summary-card h4 {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .summary-item {
        padding: 0.75rem 0.5rem;
    }

    .summary-item-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .summary-item-value {
        font-size: 1.5rem;
    }

    .progress-comparison {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        row-gap: 0.5rem;
        margin-top: 0.5rem;
        width: 100%;
        min-width: 0;
    }

    .goals-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        width: 100%;
        min-width: 0;
    }

    @media (min-width: 540px) {
        .progress-comparison,
        .goals-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    .progress-item {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.6rem;
        padding: 0.5rem 0.7rem;
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        min-height: 0;
        overflow: visible;
        position: relative;
        touch-action: pan-y;
    }

    .clear-week-button {
        top: 0.3rem;
        right: 0.3rem;
    }

    .progress-header {
        flex: 1 1 auto;
        margin-bottom: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.1rem;
        min-height: 0;
        min-width: 0;
    }
    
    .progress-label {
        width: auto;
        font-size: 0.85rem;
        text-align: left;
    }
    
    .progress-values {
        width: auto;
        justify-content: flex-start;
        gap: 0.125rem;
    }


    .actual-value {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .progress-values .goal-value {
        font-size: 0.9rem;
        font-weight: 600;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: inherit;
        white-space: nowrap;
    }

    .progress-bar-container,
    .no-goal-message {
        display: none;
    }

    .progress-percentage {
        display: none;
    }

    .timer-inline {
        gap: 0.3rem;
        flex-wrap: nowrap;
        height: 44px;
        flex: 0 0 auto;
        min-width: 0;
        overflow: visible;
        justify-content: flex-end;
    }

    .timer-display-inline {
        min-width: 3rem;
        font-size: 0.95rem;
        height: 44px;
        flex-shrink: 0;
        font-variant-numeric: tabular-nums;
    }

    .timer-btn-inline,
    .timer-btn-inline.timer-icon,
    .timer-btn-inline.timer-stop,
    .timer-btn-inline.timer-play,
    .timer-btn-inline.timer-reset,
    .timer-btn-inline.timer-log {
        padding: 0.3rem;
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .timer-btn-inline.timer-icon svg,
    .timer-btn-inline.timer-stop svg,
    .timer-btn-inline.timer-play svg,
    .timer-btn-inline.timer-reset svg,
    .timer-btn-inline svg {
        width: 22px;
        height: 22px;
    }

    .timer-btn-inline.timer-icon::after {
        width: 22px;
        height: 22px;
    }

    /* Floppy + dropdown is too small to tap. Show two Save buttons instead. */
    .timer-btn-inline.timer-log-menu-btn {
        display: none !important;
    }

    .progress-footer {
        gap: 0.4rem;
        height: auto;
        min-height: 0;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;
        min-width: 0;
        overflow: visible;
        position: relative;
        flex: 0 0 auto;
    }

    .progress-footer-left {
        gap: 0.4rem;
        min-width: 0;
        flex: 0 0 auto;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        overflow: visible;
    }
    
    .timer-log-menu,
    .timer-log-menu.timer-log-right,
    .timer-log-right {
        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        margin: 0.15rem 0 0;
        z-index: 2;
        justify-content: stretch;
    }

    .timer-log-menu-dropdown,
    .timer-log-menu-dropdown.open {
        display: flex !important;
        position: static;
        margin: 0;
        box-shadow: none;
        background: transparent;
        min-width: 0;
        width: 100%;
        gap: 0.5rem;
        border-radius: 0;
        overflow: visible;
        z-index: 2;
    }

    .timer-log-menu-item {
        flex: 1 1 0;
        text-align: center;
        border: 1px solid rgba(102, 126, 234, 0.35);
        border-radius: 8px;
        padding: 0.75rem 0.5rem;
        min-height: 44px;
        font-size: 0.9rem;
        font-weight: 600;
        color: #5568d3;
        background: rgba(102, 126, 234, 0.08);
    }

    .timer-log-menu-item:last-child {
        border-bottom: 1px solid rgba(102, 126, 234, 0.35);
    }

    html.dark-mode .timer-log-menu-item {
        color: #a5b4fc;
        background: rgba(129, 140, 248, 0.14);
        border-color: rgba(129, 140, 248, 0.4);
    }

    .goals-section {
        margin-top: 1rem;
    }

    .goals-card {
        padding: 1rem;
    }
    
    .logs-section {
        margin-top: 1rem;
    }
    
    .logs-card {
        padding: 1rem;
    }
    
    .logs-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .logs-table {
        font-size: 0.85rem;
    }
    
    .logs-table-header,
    .logs-table-cell {
        padding: 0.5rem 0.75rem;
    }
    
    .logs-table-date {
        min-width: 100px;
    }
    
    .logs-table-category {
        min-width: 120px;
    }
    
    .logs-table-time {
        min-width: 60px;
    }
    
    .logs-table-notes {
        max-width: 200px;
    }
    
    .logs-delete-btn-inline {
        opacity: 1;
        padding: 0.5rem;
    }
    
    
    .logs-time-edit-wrapper {
        gap: 0.15rem;
    }
    
    .logs-time-decrease,
    .logs-time-increase {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .logs-time-edit-wrapper {
        gap: 0.15rem;
    }
    
    .logs-time-decrease,
    .logs-time-increase {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .logs-time-edit {
        max-width: 80px;
    }
    
    .logs-notes-edit {
        min-width: 150px;
    }
    
    .logs-pagination {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .logs-pagination-info {
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }

    .goals-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .goal-item {
        padding: 0.75rem 0.5rem;
    }

    .goal-label {
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }

    .goal-value {
        font-size: 1.25rem;
    }

    .goal-unit {
        font-size: 0.75rem;
    }

    .login-card, .form-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    body.auth-page .login-card {
        margin: 0;
        width: 100%;
    }

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

    .week-card {
        padding: 1rem;
    }

    .week-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .week-summary-item {
        padding: 0.5rem;
    }

    .week-summary-label {
        font-size: 0.7rem;
    }

    .week-summary-value {
        font-size: 1.1rem;
    }
}

/* ============================================
   DARK MODE STYLES FOR MAIN CONTENT
   ============================================ */

/* Cards and containers */
html.dark-mode .card,
html.dark-mode .content-card,
html.dark-mode .dashboard-card,
html.dark-mode .form-card,
html.dark-mode .week-section {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html.dark-mode .card-header,
html.dark-mode .section-header {
    border-bottom-color: #374151;
}

/* Text colors */
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode .card-title,
html.dark-mode .section-title {
    color: #f3f4f6;
}

html.dark-mode p,
html.dark-mode .text-secondary,
html.dark-mode .help-text {
    color: #9ca3af;
}

/* Form elements */
html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .team-logins-table-wrap {
    background: #1f2937;
    border-color: #374151;
}

html.dark-mode .team-logins-table input[type="text"],
html.dark-mode .team-logins-table input[type="email"] {
    background: transparent;
    border: none;
    color: #f3f4f6;
}

html.dark-mode .team-logins-table input[type="text"]:focus,
html.dark-mode .team-logins-table input[type="email"]:focus {
    background: rgba(102, 126, 234, 0.2);
}

html.dark-mode .team-logins-table th {
    background: #111827;
    color: #9ca3af;
    border-bottom-color: #374151;
}

html.dark-mode .team-filter-row th {
    background: #1f2937;
}

html.dark-mode .team-filter-input {
    background: #111827;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .team-filter-input:focus {
    border-color: #818cf8;
    background: #111827;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

html.dark-mode .team-filter-toggle {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

html.dark-mode .team-filter-toggle:hover {
    background: #273244;
    color: #fff;
}

html.dark-mode .team-filter-toggle.is-open,
html.dark-mode .team-filter-toggle.is-active {
    border-color: #6366f1;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
}

html.dark-mode .team-logins-last-login-col .team-last-login {
    color: #9ca3af;
}

html.dark-mode .team-col-resizer:hover::after,
html.dark-mode .team-col-resizer:focus-visible::after,
html.dark-mode .team-col-resizer.is-dragging::after {
    background: #818cf8;
}

html.dark-mode .team-logins-table td {
    border-bottom-color: #374151;
}

html.dark-mode .team-logins-table tbody tr:hover td {
    background: #273244;
}

html.dark-mode .add-person-open,
html.dark-mode .add-people-cancel {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

html.dark-mode .add-person-open:hover,
html.dark-mode .add-people-cancel:hover {
    background: #273244;
    color: #fff;
}

html.dark-mode .add-people-another {
    background: #1f2937;
    color: #d1d5db;
    border-top-color: #374151;
}

html.dark-mode .add-people-another:hover {
    background: #273244;
    color: #fff;
}

html.dark-mode .add-people-submit {
    background: #6b7280;
}

html.dark-mode .team-bulk-bar #teamBulkCount {
    color: #d1d5db;
}

html.dark-mode .team-bulk-dialog-card {
    background: #1f2937;
    color: #f3f4f6;
}

html.dark-mode .team-bulk-names {
    background: #111827;
    border-color: #374151;
}

html.dark-mode .team-bulk-names li {
    border-bottom-color: #374151;
}

html.dark-mode .team-bulk-names span {
    color: #9ca3af;
}

html.dark-mode .team-bulk-dialog-card input[type="text"] {
    background: #374151;
    border: 1px solid #4b5563;
    color: #f3f4f6;
}

html.dark-mode .temp-password-row {
    border-bottom-color: #4b5563;
}

html.dark-mode .btn-icon {
    background: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}

html.dark-mode .btn-icon:hover {
    background: #374151;
    color: #fff;
}

html.dark-mode .btn-icon.save-user-btn:hover {
    background: rgba(102, 126, 234, 0.16);
}

html.dark-mode .btn-icon.toggle-admin-btn.is-admin {
    color: #a5b4fc;
    border-color: #4338ca;
    background: rgba(102, 126, 234, 0.16);
}

html.dark-mode .btn-icon-danger {
    color: #f87171;
}

html.dark-mode .btn-icon-danger:hover {
    background: rgba(192, 57, 43, 0.2);
    color: #fca5a5;
    border-color: #7f1d1d;
}

/* Catalogue page (bible-ministry) */
html.dark-mode .catalogue-detail-panel {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.08);
}
html.dark-mode .catalogue-detail-panel-close {
    color: #9ca3af;
}
html.dark-mode .catalogue-detail-panel-close:hover {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
}
html.dark-mode .catalogue-detail-placeholder {
    color: #9ca3af;
}
html.dark-mode .catalogue-detail-view .detail-label {
    color: #9ca3af;
}
html.dark-mode .catalogue-toolbar input[type="search"],
html.dark-mode .catalogue-toolbar select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}
html.dark-mode .catalogue-btn-new {
    background: #2383e2;
    color: #fff;
}
html.dark-mode .catalogue-btn-new:hover {
    background: #1a6fc7;
}
html.dark-mode .catalogue-count {
    color: #9ca3af;
}
html.dark-mode .catalogue-column-modal-panel {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.08);
}
html.dark-mode .catalogue-column-modal-header {
    border-bottom-color: rgba(255,255,255,0.1);
}
html.dark-mode .catalogue-column-search {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}
html.dark-mode .catalogue-column-item button:hover {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
}
html.dark-mode .catalogue-detail-form input,
html.dark-mode .catalogue-detail-form select,
html.dark-mode .catalogue-detail-form textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}
html.dark-mode .catalogue-detail-form label {
    color: #d1d5db;
}
html.dark-mode .property-panel__label {
    color: #9ca3af;
}
html.dark-mode .property-panel__icon {
    color: #9ca3af;
}

html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder {
    color: #6b7280;
}

html.dark-mode label {
    color: #d1d5db;
}

/* Buttons */
html.dark-mode .btn-secondary {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

html.dark-mode .btn-secondary:hover {
    background: #4b5563;
}

/* Tables */
html.dark-mode table {
    background: #1f2937;
}

html.dark-mode th {
    background: #111827;
    color: #9ca3af;
    border-color: #374151;
}

html.dark-mode td {
    border-color: #374151;
    color: #d1d5db;
}

html.dark-mode tr:hover {
    background: #374151;
}

/* Summary and progress cards */
html.dark-mode .summary-card {
    background: #1f2937;
}

html.dark-mode .summary-item {
    background: #374151;
}

html.dark-mode .summary-item-label {
    color: #9ca3af;
}

html.dark-mode .progress-item {
    background: #374151;
    border-color: #4b5563;
}

html.dark-mode .progress-item.clickable-progress-item:hover {
    border-color: #818cf8;
}

html.dark-mode .progress-label {
    color: #f3f4f6;
}

html.dark-mode .progress-values {
    color: #d1d5db;
}

html.dark-mode .progress-bar-container {
    background: #1f2937;
}

html.dark-mode .progress-percentage {
    color: #e5e7eb !important;
}

html.dark-mode .progress-footer {
    color: #9ca3af;
}

html.dark-mode .clear-week-button {
    background: rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.4);
    color: #818cf8;
}

html.dark-mode .clear-week-button:hover {
    background: rgba(129, 140, 248, 0.3);
    border-color: rgba(129, 140, 248, 0.6);
}

/* Goals section */
html.dark-mode .goals-card {
    background: #1f2937;
}

html.dark-mode .goal-item {
    background: #374151;
    border-color: #4b5563;
}

html.dark-mode .goal-item:hover {
    border-color: #818cf8;
}

html.dark-mode .goal-label {
    color: #9ca3af;
}

html.dark-mode .goal-value {
    color: #818cf8;
}

html.dark-mode .goal-value:focus {
    background: rgba(129, 140, 248, 0.1);
}

html.dark-mode .no-goal-message {
    color: #6b7280;
}

/* Logs section */
html.dark-mode .logs-card {
    background: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark-mode .logs-table-header {
    background: #111827;
    color: #9ca3af;
    border-bottom-color: #374151;
}

html.dark-mode .logs-table-row {
    border-bottom-color: #374151;
}

html.dark-mode .logs-table-row:hover {
    background-color: #374151;
}

html.dark-mode .logs-table-cell {
    color: #d1d5db;
}

html.dark-mode .logs-table-date {
    color: #818cf8;
}

html.dark-mode .logs-table-time {
    color: #818cf8;
}

html.dark-mode .logs-table-time:hover:not(.editing) {
    background-color: rgba(129, 140, 248, 0.2);
}

html.dark-mode .logs-table-time.editing {
    background-color: rgba(129, 140, 248, 0.25);
}

html.dark-mode .logs-table-notes {
    color: #9ca3af;
}

html.dark-mode .logs-table-notes:hover:not(.editing) {
    background-color: rgba(129, 140, 248, 0.1);
}

html.dark-mode .logs-table-notes.editing {
    background-color: rgba(129, 140, 248, 0.15);
}

html.dark-mode .logs-table-empty {
    color: #6b7280;
}

html.dark-mode .logs-filters {
    background: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark-mode .logs-filters-header {
    border-bottom-color: #374151;
}

html.dark-mode .logs-filters-header h4 {
    color: #f3f4f6;
}

html.dark-mode .logs-filters-toggle {
    color: #818cf8;
}

html.dark-mode .logs-filter-label {
    color: #9ca3af;
}

html.dark-mode .logs-filter-date-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .logs-filter-date-input:focus {
    border-color: #818cf8;
}

html.dark-mode .logs-filter-select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .logs-filter-select:focus {
    border-color: #818cf8;
}

html.dark-mode .logs-filter-date-separator {
    color: #6b7280;
}

html.dark-mode .logs-filter-checkbox-label {
    color: #d1d5db;
}

html.dark-mode .logs-filter-tags {
    background: #111827;
    border-color: #374151;
}

html.dark-mode .logs-filter-tags-loading,
html.dark-mode .logs-filter-tags-empty {
    color: #6b7280;
}

html.dark-mode .logs-filters-actions {
    border-top-color: #374151;
}

html.dark-mode .logs-filter-btn-secondary {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

html.dark-mode .logs-filter-btn-secondary:hover {
    background: #4b5563;
}

/* Subcategory breakdown styles */
.subcategory-expand-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #6b7280;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: transform 0.2s;
}

.subcategory-expand-btn:hover {
    color: #374151;
}

html.dark-mode .subcategory-expand-btn {
    color: #9ca3af;
}

html.dark-mode .subcategory-expand-btn:hover {
    color: #e5e7eb;
}

.subcategory-expand-btn svg {
    transition: transform 0.2s;
}

.subcategory-breakdown {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

html.dark-mode .subcategory-breakdown {
    border-top-color: #374151;
}

.subcategory-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

html.dark-mode .subcategory-breakdown-item {
    color: #9ca3af;
}

.subcategory-breakdown-name {
    flex: 1;
}

.subcategory-breakdown-time {
    font-weight: 500;
    color: #374151;
}

html.dark-mode .subcategory-breakdown-time {
    color: #e5e7eb;
}

.subcategory-breakdown-empty,
.subcategory-breakdown-error {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
}

html.dark-mode .subcategory-breakdown-empty,
html.dark-mode .subcategory-breakdown-error {
    color: #6b7280;
}

/* Subcategory column in logs table */
.logs-table-subcategory {
    min-width: 120px;
    max-width: 150px;
}

/* Subcategory filter styles */
.logs-filter-subcategories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.logs-filter-subcategories-empty {
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
}

html.dark-mode .logs-filter-subcategories-empty {
    color: #6b7280;
}

/* Quick-add subcategory styles */
.quick-add-subcategory-section {
    margin-bottom: 1rem;
}

.quick-add-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

html.dark-mode .quick-add-label {
    color: #e5e7eb;
}

.quick-add-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: #374151;
}

html.dark-mode .quick-add-select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.quick-add-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Week card for previous weeks */
html.dark-mode .week-card {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html.dark-mode .week-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

html.dark-mode .week-date {
    color: #f3f4f6;
}

html.dark-mode .week-toggle {
    color: #818cf8;
}

/* Week sections and time entries */
html.dark-mode .week-header {
    background: #111827;
    border-color: #374151;
}

html.dark-mode .week-title {
    color: #f3f4f6;
}

html.dark-mode .day-row {
    border-color: #374151;
}

html.dark-mode .day-row:hover {
    background: #374151;
}

html.dark-mode .day-name {
    color: #d1d5db;
}

html.dark-mode .day-date {
    color: #9ca3af;
}

/* Progress bars */
html.dark-mode .progress-bar {
    background: #374151;
}

/* Category colors stay the same but adjust backgrounds */
html.dark-mode .category-card {
    background: #1f2937;
    border-color: #374151;
}

/* Stats and metrics */
html.dark-mode .stat-value {
    color: #f3f4f6;
}

html.dark-mode .stat-label {
    color: #9ca3af;
}

/* Week summary */
html.dark-mode .week-summary {
    background: transparent;
    border-color: #374151;
}

html.dark-mode .week-summary-item {
    background: #374151;
    border: 1px solid #4b5563;
}

html.dark-mode .week-summary-value {
    color: #818cf8;
}

html.dark-mode .week-summary-label {
    color: #9ca3af;
}

/* Donut charts */
html.dark-mode .donut-center-text {
    fill: #f3f4f6;
}

/* Links */
html.dark-mode a:not(.btn):not(.nav-item):not(.sidebar-user-menu-item) {
    color: #818cf8;
}

html.dark-mode a:not(.btn):not(.nav-item):not(.sidebar-user-menu-item):hover {
    color: #a5b4fc;
}

/* Modal overlays */
html.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

html.dark-mode .modal {
    background: rgba(0, 0, 0, 0.7);
}

html.dark-mode .modal-content {
    background: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

html.dark-mode .modal-header {
    border-bottom-color: #374151;
}

html.dark-mode .modal-header h2,
html.dark-mode .modal-header h3 {
    color: #f3f4f6;
}

html.dark-mode .modal-close {
    color: #9ca3af;
}

html.dark-mode .modal-close:hover {
    color: #f3f4f6;
}

html.dark-mode .modal-footer {
    background: #111827;
    border-top-color: #374151;
}

/* Quick Add Modal dark mode */
html.dark-mode .quick-add-modal {
    background: #1f2937;
}

html.dark-mode .quick-add-modal .modal-header {
    border-bottom-color: #374151;
}

html.dark-mode .quick-add-week-total {
    color: #9ca3af;
}

html.dark-mode .quick-add-value {
    color: #818cf8;
}

html.dark-mode .quick-add-date-button {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

html.dark-mode .quick-add-date-button:hover {
    border-color: #818cf8;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
}

html.dark-mode .quick-add-date-input {
    background: #374151;
    border-color: #818cf8;
    color: #f3f4f6;
}

html.dark-mode .quick-add-label {
    color: #9ca3af;
}

html.dark-mode .quick-add-btn {
    background: #1f2937;
    border-color: #818cf8;
    color: #818cf8;
}

html.dark-mode .quick-add-btn:hover {
    background: #818cf8;
    color: #1f2937;
}

html.dark-mode .quick-add-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .quick-add-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

html.dark-mode .quick-add-preview {
    color: #9ca3af;
}

html.dark-mode .quick-add-notes-label {
    color: #9ca3af;
}

html.dark-mode .quick-add-notes-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .quick-add-notes-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

html.dark-mode .quick-add-notes-icon {
    color: #818cf8;
}

html.dark-mode .quick-add-notes-icon:hover {
    color: #a5b4fc;
    background: rgba(129, 140, 248, 0.2);
}

html.dark-mode .quick-add-save-menu {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

html.dark-mode .quick-add-save-menu-item {
    background: #1f2937;
    color: #d1d5db;
}

html.dark-mode .quick-add-save-menu-item:hover {
    background: #374151;
    color: #f3f4f6;
}

/* Timer Note Modal (Save Timer) dark mode */
html.dark-mode .timer-note-modal {
    background: #1f2937;
}

html.dark-mode .timer-note-time-display {
    background: #374151;
    border-color: #4b5563;
}

html.dark-mode .timer-note-time-label {
    color: #d1d5db;
}

html.dark-mode .timer-note-time-value {
    color: #818cf8;
}

html.dark-mode .timer-note-input-section label {
    color: #9ca3af;
}

html.dark-mode .timer-note-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

html.dark-mode .timer-note-input::placeholder {
    color: #6b7280;
}

html.dark-mode .timer-note-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

html.dark-mode .timer-note-footer {
    background: #111827;
    border-top-color: #374151;
}

/* Alerts and notifications */
html.dark-mode .alert {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

/* Empty states */
html.dark-mode .empty-state {
    color: #9ca3af;
}

/* Badges */
html.dark-mode .badge {
    background: #374151;
    color: #d1d5db;
}

/* Dividers */
html.dark-mode hr,
html.dark-mode .divider {
    border-color: #374151;
}

/* Scrollbar for dark mode */
html.dark-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html.dark-mode ::-webkit-scrollbar-track {
    background: #1f2937;
}

html.dark-mode ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

html.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Tagify dark mode */
html.dark-mode .tagify {
    --tags-border-color: #4b5563;
    --tags-hover-border-color: #6b7280;
    --tags-focus-border-color: #818cf8;
    --tag-bg: #4b5563;
    --tag-hover: #6b7280;
    --tag-text-color: #e5e7eb;
    --tag-text-color--edit: #f3f4f6;
    --tag-remove-btn-color: #9ca3af;
    --tag-remove-btn-bg--hover: #dc2626;
    --input-color: #f3f4f6;
    --placeholder-color: rgba(156, 163, 175, 0.6);
    --placeholder-color-focus: rgba(156, 163, 175, 0.4);
    background: #374151;
}

html.dark-mode .tagify__dropdown__wrapper {
    --tagify-dd-bg-color: #1f2937;
    --tagify-dd-text-color: #e5e7eb;
    background: #1f2937;
    border-color: #4b5563;
}

html.dark-mode .tagify__dropdown__item--active {
    background: #667eea;
}
