* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.1);
    --success-color: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --warning-color: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --danger-color: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --info-color: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.1);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --red-hours: #fee2e2;
    --yellow-hours: #fef3c7;
    --green-hours: #d1fae5;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #f1f5f9 0%, var(--bg-color) 12rem);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Modern top nav – minimal, glass-style */
.navbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0.625rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.impersonation-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    width: 100%;
    order: -1;
}

.impersonation-banner span {
    flex: 1;
    font-weight: 600;
    color: #92400e;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .users-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .users-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.user-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-info strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-username {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.user-actions .btn {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    transition: color 0.15s ease, background 0.15s ease;
    display: inline-block;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-soft);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-soft);
    font-weight: 600;
}

/* Cross-module links (Timesheet ↔ Knowledge Base) – stand out with icon + button look */
.nav-link-module {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--primary-color);
    background: var(--primary-soft);
    color: var(--primary-color);
    font-weight: 700;
    padding: 0.5rem 0.875rem;
}

.nav-link-module .nav-link-module-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.nav-link-module:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.nav-link-module.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Login/Register Page */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2.25rem;
    background-color: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 10px 40px -10px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
}

.tab-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-lg) - 0.125rem);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s ease, background 0.15s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.error-message {
    color: #991b1b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
}

/* Modern page header – clean bar, no heavy title */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
    border-radius: var(--radius-md);
}

.page-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0;
}

.page-header .btn,
.page-header .calendar-header-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
}

.page-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.calendar-header-btn {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.calendar-header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-icon {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
}

.btn-icon:hover {
    background-color: var(--bg-color);
}

/* Calendar Styles */
.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    border-radius: var(--radius-lg);
}

.calendar-controls h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    min-width: 180px;
    text-align: center;
    color: var(--text-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.calendar-day-header {
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-day {
    aspect-ratio: 1;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    min-height: 100px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.calendar-day:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.red {
    background-color: var(--red-hours);
}

.calendar-day.yellow {
    background-color: var(--yellow-hours);
}

.calendar-day.green {
    background-color: var(--green-hours);
}

.calendar-day.holiday {
    background-color: #fff4e6;
    border-color: #ffd89b;
    position: relative;
}

.calendar-day.holiday::before {
    content: '🎉';
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.35;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.calendar-day.holiday>* {
    position: relative;
    z-index: 1;
}

.calendar-day.off-day {
    background-color: #fff4e6;
    border-color: #ffd89b;
    position: relative;
}

.calendar-day.off-day::before {
    content: '✈️';
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.35;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.calendar-day.off-day>* {
    position: relative;
    z-index: 1;
}

/* Off day with done entries - airplane center, checkmark next to day number */
.calendar-day.off-day.day-done::after {
    content: '✓';
    position: absolute;
    font-size: 1.3rem;
    color: #10b981;
    font-weight: bold;
    top: 0.5rem;
    left: 1.8rem;
    z-index: 1;
    pointer-events: none;
    line-height: 1;
}

/* Off day with pending entries - airplane center, no pending icon */
.calendar-day.off-day.day-pending::after {
    display: none;
}

.calendar-day.weekend {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
    font-weight: 600;
}

.calendar-day.day-pending {
    position: relative;
}

/* No pending icon displayed */
.calendar-day.day-pending:not(.off-day)::before {
    display: none;
}

.calendar-day.day-pending>* {
    position: relative;
    z-index: 1;
}

.calendar-day.day-done {
    position: relative;
}

/* Only show checkmark if not an off-day (off-days use ::after instead) */
.calendar-day.day-done:not(.off-day)::before {
    content: '✓';
    position: absolute;
    font-size: 1.3rem;
    color: #10b981;
    font-weight: bold;
    top: 0.5rem;
    left: 1.8rem;
    z-index: 1;
    pointer-events: none;
    line-height: 1;
}

.calendar-day.day-done>* {
    position: relative;
    z-index: 1;
}

.calendar-day.today .day-number {
    color: var(--primary-color);
    font-weight: 700;
}

.day-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.day-number {
    font-weight: 600;
    font-size: 1.1rem;
}

.hours-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 0.5rem;
    color: white;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hours-badge-red {
    background-color: #ef4444;
}

.hours-badge-yellow {
    background-color: #f59e0b;
}

.hours-badge-green {
    background-color: #10b981;
}

.hours-badge-overtime {
    background-color: #1f2937;
    color: white;
}

.hours-badge-container {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.day-customers {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.25rem;
    max-height: 110px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

.day-customers::-webkit-scrollbar {
    width: 3px;
}

.day-customers::-webkit-scrollbar-track {
    background: transparent;
}

.day-customers::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.customer-card {
    display: flex;
    align-items: center;
    padding: 0.2rem 0.35rem;
    pointer-events: none;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    line-height: 1.2;
    width: 100%;
    border-left: 3px solid #d1d5db;
    background-color: rgba(243, 244, 246, 0.5);
}

.customer-card.customer-pending {
    background-color: rgba(245, 158, 11, 0.15);
    border-left-color: var(--warning-color);
}

.customer-card.customer-exported {
    background-color: rgba(16, 185, 129, 0.15);
    border-left-color: var(--success-color);
}

.customer-card.customer-closed {
    background-color: rgba(59, 130, 246, 0.15);
    border-left-color: #3b82f6;
}

.customer-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary);
}

.closed-check {
    color: #3b82f6;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 0.25rem;
    flex-shrink: 0;
}

.closing-check {
    color: #000000;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 0.25rem;
    flex-shrink: 0;
}

.day-badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.25rem;
}

.badge {
    font-size: 1.2rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.badge-holiday {
    background-color: #f59e0b;
    color: white;
}

.badge-off-day {
    background-color: #0ea5e9;
    color: white;
}

.badge-pending {
    background-color: var(--warning-color);
    color: white;
}

.badge-done {
    background-color: var(--success-color);
    color: white;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

.legend-color.red {
    background-color: var(--red-hours);
}

.legend-color.yellow {
    background-color: var(--yellow-hours);
}

.legend-color.green {
    background-color: var(--green-hours);
}

/* Day Editor Styles */
.day-summary {
    margin-bottom: 1.5rem;
}

.hours-progress-bar {
    width: 100%;
    height: 32px;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    display: flex;
    align-items: center;
}

.hours-progress-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease, background-color 0.3s ease;
    min-width: 60px;
    position: relative;
    flex-shrink: 0;
}

.hours-progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.hours-overtime-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111827;
    transition: width 0.3s ease;
    min-width: 60px;
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    margin-left: 0;
}

.hours-overtime-fill .hours-progress-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.hours-progress-fill.hours-red {
    background-color: var(--red-hours);
}

.hours-progress-fill.hours-yellow {
    background-color: var(--yellow-hours);
}

.hours-progress-fill.hours-green {
    background-color: var(--green-hours);
}


.entries-container {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.entries-table th {
    background-color: #f8fafc;
    padding: 0.625rem 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.entries-table th:first-child {
    width: 35px;
}

.entries-table th:nth-child(2) {
    width: 200px;
    /* Client */
}

.entries-table th:nth-child(3),
.entries-table th:nth-child(4) {
    width: 90px;
    /* Time In, Time Out */
}

.entries-table th:nth-child(5) {
    width: 75px;
    /* Duration */
}

.entries-table th:nth-child(6) {
    width: 110px;
}

.entries-table th:nth-child(7) {
    width: 130px;
}

.entries-table th:nth-child(8) {
    width: 90px;
}

.entries-table th:nth-child(9) {
    width: 200px;
    /* Tasks/Notes - increased */
}

.entries-table th:last-child {
    width: 45px;
}

.entries-table td {
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    transition: background-color 0.12s ease;
}

.entries-table td input.time-input {
    max-width: 100%;
    box-sizing: border-box;
}

.entries-table tbody tr:hover {
    background-color: #f8fafc;
}

.entry-row.entry-conflict {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-left: 3px solid #ef4444;
}

.entry-row.entry-conflict:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

.conflict-warning {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.9rem;
    cursor: help;
    vertical-align: middle;
}

.time-input.time-error,
input.time-input.time-error {
    border: 2px solid #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    animation: shake 0.3s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.entry-row.editing {
    background-color: #eff6ff;
}

.text-input,
.select-input,
.time-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--card-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.text-input:hover,
.select-input:hover,
.time-input:hover {
    border-color: #cbd5e1;
}

.text-input:focus,
.select-input:focus,
.time-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: white;
}

.time-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
}

.time-input {
    min-width: 0;
    flex: 1;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.time-indicator {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 24px;
    text-align: left;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.time-indicator.time-am {
    color: #2563eb;
}

.time-indicator.time-pm {
    color: #dc2626;
}

/* Ensure 24-hour time format display */
input[type="time"] {
    font-variant-numeric: tabular-nums;
    position: relative;
}

/* Force 24-hour format and hide picker icon */
input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: text;
    position: absolute;
    right: 0;
    width: 20px;
    height: 100%;
}

/* Force 24-hour format (no AM/PM) */
input[type="time"] {
    color-scheme: light;
}

/* Status circle */
.status-cell {
    width: 35px;
    padding: 0.4rem !important;
    text-align: center;
}

.status-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 auto;
}

.status-circle.status-pending {
    background-color: var(--warning-color);
}

.status-circle.status-done {
    background-color: var(--success-color);
}

.status-circle.status-closed {
    background-color: #3b82f6;
}

/* Call ID - small, bold text */
.call-id-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Delete icon button */
.btn-delete-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
    color: var(--danger-color);
    transition: transform 0.2s;
}

.btn-delete-icon:hover {
    transform: scale(1.2);
    color: #dc2626;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
}

.btn-icon-small:hover {
    color: var(--primary-color);
}

#add-entry-btn {
    margin: 1rem;
    border-radius: var(--radius-md);
}

/* Export Styles */
.export-controls {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.export-controls label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.export-controls select {
    width: 100%;
    max-width: 400px;
}

.export-preview {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.export-table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.export-table {
    width: 100%;
    border-collapse: collapse;
}

.export-table th,
.export-table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.export-table th {
    background-color: var(--bg-color);
    font-weight: 600;
}

.export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.export-text-section {
    margin-top: 1rem;
}

.export-text-section label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.export-attendance-text {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

/* Calls Styles */
.calls-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.calls-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.calls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.call-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 200px;
    max-width: 300px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.call-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.call-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.call-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.call-card-footer.call-card-footer-stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.call-card-footer-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.call-client {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
}

.call-edit-btn {
    padding: 0.2rem 0.35rem;
    font-size: 0.85rem;
    min-width: auto;
    line-height: 1;
    border: 1px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.call-edit-btn:hover {
    background: var(--primary-color);
    color: white;
}

.call-level {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #3b82f6;
    color: white;
    flex-shrink: 0;
}

.call-id-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.call-id {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background-color: var(--bg-color);
    border-radius: 0.25rem;
    font-family: monospace;
}

.call-stats {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.call-id-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    margin: 0;
    width: 100%;
}

.call-status {
    display: block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    width: fit-content;
}

.call-status.pending {
    background-color: var(--warning-color);
    color: white;
}

.call-status.active {
    background-color: var(--success-color);
    color: white;
}

.call-status.closed {
    background-color: var(--text-secondary);
    color: white;
}

.call-actions {
    display: flex;
    gap: 0.5rem;
}

/* Holidays Styles */
.holidays-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.holidays-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.holidays-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.holidays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .holidays-grid {
        grid-template-columns: 1fr;
    }

    .holiday-card-compact {
        padding: 0.625rem;
        gap: 0.75rem;
    }

    .holiday-date-compact {
        min-width: 50px;
        padding: 0.375rem;
    }

    .holiday-month-day {
        font-size: 0.85rem;
    }

    .holiday-weekday {
        font-size: 0.7rem;
    }

    .holiday-name-compact {
        font-size: 0.85rem;
    }
}

.holiday-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.holiday-card-compact {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.holiday-card-compact:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.holiday-card-compact.holiday-past {
    opacity: 0.6;
}

/* Knowledge Base */
.kb-articles-list {
    margin-top: 1rem;
}

.kb-articles-header-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.kb-articles-header-row #kb-add-article-btn {
    margin-left: auto;
}

.kb-filter-select {
    min-width: 150px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 5.5L8 11l5.5-5.5H2.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.kb-filter-select:hover {
    border-color: #94a3b8;
}
.kb-filter-select:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.kb-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
}
.kb-refresh-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z'/%3E%3Cpath d='M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}
.kb-refresh-btn:hover .kb-refresh-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231e293b' viewBox='0 0 16 16'%3E%3Cpath d='M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z'/%3E%3Cpath d='M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z'/%3E%3C/svg%3E");
}
.kb-refresh-btn:disabled .kb-refresh-icon {
    opacity: 0.6;
}

.kb-search-input {
    min-width: 220px;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 0.6rem center;
    background-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.kb-search-input::placeholder {
    color: var(--text-secondary);
}

.kb-search-input:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* KB Articles table – clearer hierarchy, pills, and actions */
.kb-articles-table-wrap {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.kb-articles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.kb-articles-table th,
.kb-articles-table td {
    padding: 0.625rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.kb-articles-table thead th {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.kb-articles-table tbody tr.kb-tbl-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.kb-articles-table tbody tr.kb-tbl-row:nth-child(odd) {
    background: #ffffff;
}

.kb-articles-table tbody tr.kb-tbl-row:nth-child(even) {
    background: #fafbfc;
}

.kb-articles-table tbody tr.kb-tbl-row:hover {
    background: #f1f5f9 !important;
}

.kb-articles-table .kb-tbl-pill {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--primary-soft);
    border-radius: var(--radius-md);
}

.kb-articles-table .kb-tbl-pill-prod {
    color: var(--text-secondary);
    background: #f1f5f9;
}

.kb-articles-table .kb-tbl-title-cell {
    max-width: 280px;
}

.kb-articles-table .kb-tbl-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.kb-articles-table .kb-tbl-author {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.kb-articles-table .kb-tbl-verified-cell {
    text-align: center;
}

.kb-articles-table .kb-tbl-verified-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.kb-articles-table .kb-tbl-unverified {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.kb-articles-table .kb-tbl-actions {
    white-space: nowrap;
}

.kb-articles-table .kb-tbl-actions .btn-small {
    margin-right: 0.35rem;
    margin-bottom: 0.15rem;
}

.kb-empty {
    color: var(--text-secondary);
    padding: 1.5rem;
}

.kb-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}

.kb-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.kb-empty-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem 0;
}

.kb-empty-hint {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.kb-article-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kb-article-card.kb-verified {
    border-left: 4px solid var(--success-color);
}

.kb-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kb-card-title {
    font-weight: 600;
    color: var(--text-primary);
}

.kb-card-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.kb-card-preview {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.kb-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.kb-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.kb-badge-verified {
    background-color: var(--green-hours);
    color: #065f46;
}

/* KB Article View – readable, card-style layout */
.kb-view-article {
    padding: 0.25rem 0;
    animation: kb-view-fade-in 0.25s ease-out;
}

@keyframes kb-view-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.kb-view-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.kb-view-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.kb-view-badge.kb-view-category {
    color: #15803d;
    background: rgba(21, 128, 61, 0.12);
    border: 1px solid rgba(21, 128, 61, 0.25);
}

.kb-view-badge.kb-view-product {
    color: #0369a1;
    background: rgba(3, 105, 161, 0.12);
    border: 1px solid rgba(3, 105, 161, 0.25);
}

.kb-view-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #b45309;
    margin-left: 0.25rem;
}

.kb-view-author::before {
    content: '\270F ';
    color: #b45309;
    font-weight: normal;
    display: inline-block;
    transform: rotate(45deg);
}

.kb-view-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #065f46;
    background: var(--success-soft);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.kb-view-section {
    margin-bottom: 1.25rem;
    background: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.kb-view-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #e2e8f0;
}

/* Issue section – outline and tint match warning (amber) tag */
.kb-view-section.kb-view-issue {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(254, 243, 199, 0.4);
}

.kb-view-section.kb-view-issue:hover {
    border-color: var(--warning-color);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.kb-view-section.kb-view-issue .kb-view-section-title {
    border-left: 4px solid var(--warning-color);
    background: rgba(254, 243, 199, 0.5);
    color: #92400e;
}

/* Solution section – outline and tint match success (green) tag */
.kb-view-section.kb-view-solution {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(209, 250, 229, 0.4);
}

.kb-view-section.kb-view-solution:hover {
    border-color: var(--success-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.kb-view-section.kb-view-solution .kb-view-section-title {
    border-left: 4px solid var(--success-color);
    background: rgba(209, 250, 229, 0.6);
    color: #065f46;
}

.kb-view-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin: 0;
    padding: 0.625rem 1rem;
    background: #f1f5f9;
    border-left: 4px solid var(--border-color);
}

.kb-view-section.kb-view-issue .kb-view-section-title::before {
    content: '◆ ';
    opacity: 0.7;
}

.kb-view-section.kb-view-solution .kb-view-section-title::before {
    content: '✓ ';
    opacity: 0.9;
}

.kb-view-content {
    padding: 1.25rem 1.25rem;
}

.kb-view-text {
    margin: 0 0 0.75rem 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-primary);
}

.kb-view-content > .kb-view-text:first-child,
.kb-view-content > .kb-view-solution-text:first-child {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.kb-view-solution-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.kb-view-section strong {
    display: block;
    margin-bottom: 0.25rem;
}

.kb-view-resources {
    margin-top: 1.25rem;
    padding: 1rem 0 0;
    border-top: 1px dashed var(--border-color);
}

.kb-view-resources-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
}

.kb-view-attachment-list {
    margin: 0 0 0.75rem 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kb-view-attachment-list li {
    margin: 0;
}

.kb-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kb-view-link:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
    text-decoration: none;
}

.kb-view-external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9375rem;
    word-break: break-all;
    padding: 0.4rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kb-view-external-link::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.8;
}

.kb-view-external-link:hover {
    background: var(--primary-soft);
    border-color: var(--primary-color);
    text-decoration: none;
}

.kb-view-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(to top, #fafbfc, transparent);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1.5rem;
}

/* KB View – Comments: blue section, each comment like solution block */
.kb-view-comments-section {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.kb-view-comments-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
}

.kb-view-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Each comment card – blue outline/tint like solution block */
.kb-view-comment {
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.5);
    border-radius: var(--radius-lg);
    background: rgba(219, 234, 254, 0.4);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.kb-view-comment:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.kb-view-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 1rem 0.25rem;
    min-height: 1.75rem;
}

.kb-view-comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kb-view-comment-author {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    letter-spacing: 0.02em;
}

.kb-view-comment-body {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text-primary);
    padding: 0 1rem 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.kb-view-comment-body:first-of-type {
    padding-top: 0.25rem;
}

.kb-view-comment-actions {
    padding: 0 1rem 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kb-view-comment-edit-textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: var(--radius-md);
    resize: vertical;
    background: #fff;
}

.kb-view-comment-edit-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.kb-view-comments-empty,
.kb-view-comments-error {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
    padding: 0.5rem 0;
}

.kb-view-comments-error {
    color: var(--danger-color);
    font-style: normal;
}

/* New comment – light blue section at bottom */
.kb-view-new-comment-section {
    margin-top: 1.25rem;
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: var(--radius-lg);
    background: rgba(219, 234, 254, 0.5);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.kb-view-new-comment-section:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.kb-view-new-comment-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0.625rem 1rem;
    background: rgba(219, 234, 254, 0.8);
    border-left: 4px solid #2563eb;
    color: #1e40af;
}

.kb-view-new-comment-section .kb-view-comments-form {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kb-view-comment-textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    background: #fff;
}

.kb-view-comment-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.kb-form-section {
    margin-bottom: 1.25rem;
}

.kb-form-section-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.kb-form-part {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.kb-form-part-issue {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger-color);
}

.kb-form-part-solution {
    background-color: #f0fdf4;
    border-left: 4px solid var(--success-color);
}

.kb-form-part-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.kb-file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.kb-file-row input[type="file"] {
    max-width: 12rem;
}

.kb-file-or {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.kb-upload-status {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--success-color);
    margin-top: 0.25rem;
}

.kb-remove-issue-screenshot,
.kb-remove-solution-screenshot {
    margin-left: 0.5rem;
    vertical-align: middle;
    display: none; /* shown via JS when there is a screenshot */
}

.kb-attachment-list {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.kb-attachment-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.kb-attachment-item a {
    font-size: 0.9rem;
}

.kb-attachment-item .kb-attachment-remove {
    flex-shrink: 0;
}

.kb-view-image {
    margin: 1rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.kb-view-image img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kb-view-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.kb-manage-section {
    margin-bottom: 1.5rem;
}

.kb-manage-section:last-child {
    margin-bottom: 0;
}

.kb-manage-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.kb-manage-table th,
.kb-manage-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.kb-manage-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.kb-manage-table .btn-small {
    margin-right: 0.25rem;
}

.kb-cat-prod-page {
    max-width: none;
}

.kb-add-row {
    margin: 0 0 1rem 0;
}

.kb-category-blocks {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 900px) {
    .kb-category-blocks {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .kb-category-blocks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kb-category-block {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary, #fafafa);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.kb-category-name {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.kb-product-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
    flex: 1;
    min-height: 0;
}

.kb-product-item {
    padding: 0.25rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid var(--border-color);
    margin-bottom: 0.15rem;
    font-size: 0.875rem;
}

.kb-product-item.kb-product-empty {
    color: var(--text-secondary);
    font-style: italic;
    border-left-color: transparent;
}

.kb-category-block .kb-page-add-product {
    flex-shrink: 0;
    margin-top: auto;
}

.kb-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-cat-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.kb-cat-item:last-child {
    border-bottom: none;
}

.kb-cat-products {
    font-weight: normal;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.holiday-date-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.5rem;
    background-color: var(--bg-color);
    border-radius: 0.375rem;
    text-align: center;
}

.holiday-month-day {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.holiday-weekday {
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 600;
}

.holiday-weekday.weekday {
    color: #10b981;
    /* Green for weekdays */
}

.holiday-weekday.weekend {
    color: #ef4444;
    /* Red for weekends */
}

.holiday-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.holiday-name-compact {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-wrap: break-word;
}

.holiday-countdown {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.holiday-countdown.countdown-today {
    color: var(--primary-color);
    font-weight: 600;
}

.holiday-countdown.countdown-tomorrow {
    color: #f59e0b;
    font-weight: 600;
}

.holiday-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.holiday-date {
    font-weight: 600;
    font-size: 1.1rem;
}

.holiday-name {
    color: var(--text-secondary);
}

.btn-tiny {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-width: auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
}

/* Timeline View Styles */
.holidays-timeline {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 0;
}

.timeline-month {
    margin-bottom: 2.5rem;
}

.timeline-month:last-child {
    margin-bottom: 0;
}

.timeline-month-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.timeline-line {
    position: relative;
    padding-left: 2rem;
}

.timeline-line::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item-past {
    opacity: 0.7;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 2px solid var(--card-bg);
    z-index: 1;
}

.timeline-dot-upcoming {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    padding: 0.5rem;
    background-color: var(--bg-color);
    border-radius: 0.375rem;
}

.timeline-day {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.timeline-weekday {
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 600;
}

.timeline-weekday.weekday {
    color: #10b981;
}

.timeline-weekday.weekend {
    color: #ef4444;
}

.timeline-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.timeline-countdown {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.timeline-countdown.countdown-today {
    color: var(--primary-color);
    font-weight: 600;
}

.timeline-countdown.countdown-tomorrow {
    color: #f59e0b;
    font-weight: 600;
}

.timeline-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .timeline-line {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-dot {
        left: -1rem;
        width: 10px;
        height: 10px;
    }

    .timeline-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .timeline-date {
        min-width: 45px;
    }

    .timeline-name {
        width: 100%;
    }
}

/* Profile Styles */
.profile-form {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-compact-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .profile-compact-section {
        grid-template-columns: 1fr;
    }
}

.profile-compact-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.profile-compact-item h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.profile-compact-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-info-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.profile-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 80px;
}

.profile-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group-compact label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.text-input-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
}

.profile-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.profile-info {
    padding: 0.5rem;
    background-color: var(--bg-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.manager-calendar-header {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
}

.manager-calendar-header h3 {
    color: var(--text-primary);
}

.profile-form {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 2rem;
    max-width: 1200px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    border: 1px solid var(--border-color);
}

.modal.modal-wide {
    max-width: 960px;
    width: 95%;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, #fafbfc, transparent);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

.modal-close:hover {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Lite polish – visual only, no layout changes */
.modal {
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.modal-overlay {
    backdrop-filter: blur(4px);
    background-color: rgba(15, 23, 42, 0.4);
}
.kb-form-part {
    box-shadow: var(--shadow-sm);
}
.kb-view-section-title,
.kb-form-part-title {
    font-weight: 600;
}
.kb-badge {
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.kb-badge-verified {
    background-color: var(--success-soft);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.kb-category-block {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.kb-category-block:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.kb-product-item {
    transition: all 0.15s ease;
}
.kb-product-item:hover {
    padding-left: 0.75rem;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Warning Styles */
.warning-message {
    background-color: #fef3c7;
    border: 1px solid var(--warning-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.25rem;
    }

    .calendar-day {
        padding: 0.25rem;
        font-size: 0.875rem;
    }

    .entries-table {
        font-size: 0.75rem;
    }

    .entries-table th,
    .entries-table td {
        padding: 0.5rem;
    }
}