/* ============================================
   KAKAO SCRAP ADMIN - MODERN WHITE THEME CSS
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #FAE100;
    --primary-dark: #E5CC00;
    --primary-light: #FFF9C4;
    --accent-color: #3B1E54;
    --accent-light: #6B4E8E;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F1F3F5;
    --bg-hover: #E9ECEF;

    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868E96;
    --text-light: #ADB5BD;

    --border-color: #DEE2E6;
    --border-light: #E9ECEF;

    --shadow-sm: 0 1px 2px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --info-color: #3B82F6;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1:focus, h2:focus, h3:focus {
    outline: none;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #FEFCE8 0%, #FEF9C3 50%, #FEF08A 100%);
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(250, 225, 0, 0.4);
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(250, 225, 0, 0.2);
}

.form-input::placeholder {
    color: var(--text-light);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    color: var(--error-color);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.error-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--accent-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 225, 0, 0.4);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR / NAV MENU
   ============================================ */

.sidebar {
    width: 260px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo svg {
    color: var(--primary-color);
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-menu {
    padding: 1rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--accent-color);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.user-avatar svg {
    width: 20px;
    height: 20px;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: var(--bg-hover);
    border-color: var(--error-color);
    color: var(--error-color);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-container {
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.header-content h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.header-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-stats {
    display: flex;
    gap: 1rem;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-button:hover {
    background: var(--bg-hover);
    border-color: var(--error-color);
    color: var(--error-color);
}

.logout-button svg {
    width: 16px;
    height: 16px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 1.5rem;
}

/* Panel Styles */
.panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.panel-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-header h2 svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.panel-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--accent-color);
}

.panel-badge.ai {
    background: linear-gradient(135deg, #E0E7FF, #C7D2FE);
    color: #4338CA;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ============================================
   DAILY WORKER CONFIRMATION CARDS
   ============================================ */

.daily-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}

.daily-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.date-info {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.date-day {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.date-weekday {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 500;
    background: var(--primary-light);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.daily-stats {
    display: flex;
    gap: 1rem;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mini-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mini-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.worker-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.worker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.worker-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.worker-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.worker-details {
    display: flex;
    flex-direction: column;
}

.worker-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.worker-messages {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.confirmation-rate {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rate-bar {
    width: 60px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.rate-value {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.rate-value.high {
    color: var(--success-color);
}

.rate-value.medium {
    color: var(--warning-color);
}

.rate-value.low {
    color: var(--error-color);
}

/* ============================================
   CHAT MESSAGES
   ============================================ */

.chat-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    cursor: pointer;
}

.chat-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Auto Scroll Toggle */
.auto-scroll-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.auto-scroll-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    transition: var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.auto-scroll-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
}

.auto-scroll-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chat-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.chat-date-divider span {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.375rem 1rem;
    border-radius: 9999px;
}

.chat-message {
    display: flex;
    gap: 0.625rem;
    max-width: 85%;
}

.chat-message.other {
    align-self: flex-start;
}

.chat-message.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
}

.chat-message.mine .message-content {
    align-items: flex-end;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    margin-left: 0.5rem;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    max-width: 100%;
}

.chat-message.other .message-bubble {
    background: var(--bg-tertiary);
    border-top-left-radius: 4px;
}

.chat-message.mine .message-bubble {
    background: var(--primary-color);
    border-top-right-radius: 4px;
}

.message-bubble p {
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message.other .message-bubble p {
    color: var(--text-primary);
}

.chat-message.mine .message-bubble p {
    color: var(--accent-color);
}

.message-time {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.chat-message.mine .message-time {
    margin-right: 0.5rem;
}

.chat-message.other .message-time {
    margin-left: 0.5rem;
}

/* ============================================
   DAILY SUMMARY CARDS
   ============================================ */

.summary-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.summary-date {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.date-main {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.date-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.summary-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.badge.messages {
    background: #DBEAFE;
    color: #1D4ED8;
}

.badge.users {
    background: #D1FAE5;
    color: #047857;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-text {
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--info-color);
}

.summary-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.summary-participants {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.participant-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.participant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.participant-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--text-muted);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.empty-state.small {
    padding: 1rem;
}

.empty-state.small svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   AUTH REDIRECT
   ============================================ */

.auth-redirect {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1.5rem;
}

.auth-redirect p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.auth-redirect button {
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: var(--accent-color);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.auth-redirect button:hover {
    background: var(--primary-dark);
}

/* ============================================
   BLAZOR ERROR UI
   ============================================ */

#blazor-error-ui {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--error-color);
    padding: 1rem;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    border-radius: var(--radius-md);
    display: none;
    z-index: 9999;
}

#blazor-error-ui .reload {
    color: var(--error-color);
    font-weight: 500;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}

/* ============================================
   FORM VALIDATION
   ============================================ */

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: var(--success-color);
}

.invalid {
    outline: none;
    border-color: var(--error-color) !important;
}

.validation-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============================================
   WEBSOCKET STATUS
   ============================================ */

.websocket-status {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    z-index: 100;
    transition: var(--transition-fast);
}

.websocket-status.connected {
    border-color: var(--success-color);
}

.websocket-status.disconnected {
    border-color: var(--error-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.websocket-status.connected .status-dot {
    background: var(--success-color);
}

.websocket-status.disconnected .status-dot {
    background: var(--error-color);
    animation: none;
}

.websocket-status.connected .status-text {
    color: var(--success-color);
}

.websocket-status.disconnected .status-text {
    color: var(--error-color);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    margin: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-header h3 svg {
    width: 20px;
    height: 20px;
    color: var(--warning-color);
}

.modal-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    gap: 0.75rem;
}

.modal-button {
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: var(--accent-color);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-button:hover {
    background: var(--primary-dark);
}

.modal-button.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.modal-button.secondary:hover {
    background: var(--bg-hover);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .summary-panel {
        grid-column: span 2;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .logo-text,
    .nav-item span,
    .user-name,
    .logout-btn span {
        display: none;
    }

    .nav-item {
        justify-content: center;
    }

    .main-content {
        margin-left: 80px;
    }

    .user-info {
        justify-content: center;
    }

    .logout-btn {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .summary-panel {
        grid-column: span 1;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-stats {
        justify-content: center;
    }

    .panel {
        max-height: none;
    }
}

/* ============================================
   CONFIRM LIST CARDS
   ============================================ */

.confirm-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.confirm-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.confirm-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.last-updated {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.check-items-count {
    display: flex;
    align-items: center;
}

.count-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--accent-color);
}

.check-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.check-item svg {
    width: 12px;
    height: 12px;
    color: var(--success-color);
    flex-shrink: 0;
}

.worker-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.worker-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.worker-status-item:hover {
    background: var(--bg-tertiary);
}

.worker-status-item .worker-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    min-width: 0;
}

.worker-status-item .worker-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.worker-status-item .worker-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.worker-status-item .worker-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.worker-stats-info {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.worker-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.progress-bar {
    width: 60px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.progress-value {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
}

.progress-value.complete {
    color: var(--success-color);
}

.progress-value.high {
    color: var(--success-color);
}

.progress-value.medium {
    color: var(--warning-color);
}

.progress-value.low {
    color: var(--error-color);
}

.status-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.status-badge.complete {
    background: #D1FAE5;
    color: #047857;
}

.status-badge.in-progress {
    background: #FEF3C7;
    color: #D97706;
}

.status-badge.not-started {
    background: #FEE2E2;
    color: #DC2626;
}

.status-badge.unknown {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
