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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --mantine-primary: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gradient-primary);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#dashboardScreen {
    align-items: flex-start;
    padding: 24px 20px;
}

@media (max-width: 768px) {
    #dashboardScreen {
        padding: 16px 12px;
    }
}

/* Login Screen */
.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 32px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border: none;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    margin-top: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    border: none;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    border: none;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

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

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-large:hover:not(:disabled) {
    transform: translateY(-3px);
}

.reset-password-link {
    text-align: center;
    margin-top: 20px;
}

.reset-password-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.reset-password-link a:hover {
    text-decoration: underline;
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: var(--success-color);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Dashboard */
.dashboard-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-content h1 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.username {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-compact {
    padding: 10px 20px;
    font-size: 14px;
    width: auto;
}

.btn-icon-only {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: var(--primary-color);
    border: 2px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.btn-icon-only:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f97316;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.alert-warning .alert-icon {
    font-size: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.alert-text {
    color: #92400e;
    font-size: 14px;
    margin-bottom: 4px;
}

.alert-email code {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fef3c7;
    border: 1px dashed #f97316;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #b45309;
    margin: 4px 0;
    word-break: break-all;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--gradient-card);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 48px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
}

.stat-value.stat-small {
    font-size: 18px;
    font-weight: 500;
}

.stat-success .stat-value {
    color: var(--success-color);
}

.stat-danger .stat-value {
    color: var(--danger-color);
}

.stat-info .stat-value {
    color: var(--info-color);
}

.sheets-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.sheet-card-wrapper {
    display: flex;
    flex-direction: column;
}

.sheet-card {
    background: var(--gradient-card);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    gap: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sheet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.sheet-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

.sheet-card:hover::before {
    transform: scaleX(1);
}

.sheet-card-left {
    animation: slideInLeft 0.6s ease-out;
}

.sheet-card-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sheet-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sheet-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sheet-chip {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.sheet-chip.secondary {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.sheet-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-stat {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.mini-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.mini-stat .mini-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.mini-stat .mini-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mini-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.mini-success:hover {
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.mini-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.mini-danger:hover {
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.2);
}

.sheet-controls {
    margin-top: 0;
}

.schedule-section .compact-input {
    margin-top: 12px;
}

.schedule-section .form-control {
    width: 100%;
}

.schedule-pill {
    margin-top: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.schedule-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.schedule-pill div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.schedule-pill span {
    font-weight: 700;
    opacity: 0.95;
}

.panel-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel-card h2 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 12px;
}

.form-control {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Sheet ID Input Styling */
.form-label-large {
    display: block;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.sheet-id-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.sheet-id-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #fafafa;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sheet-id-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.sheet-id-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.sheet-id-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.sheet-id-info:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: translateX(4px);
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.info-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
    word-break: break-all;
}

.btn-update {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-icon {
    font-size: 16px;
}

.schedule-days-input {
    max-width: 200px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f9fafb;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    position: relative;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 12px;
    background: white;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-input:hover + .checkbox-custom {
    border-color: var(--primary-color);
}

.checkbox-input:focus + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkbox-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.schedule-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-info-label {
    font-weight: 600;
    opacity: 0.9;
}

.schedule-info-value {
    font-weight: 500;
    font-size: 14px;
}

.btn-save-schedule {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

/* Reset Memory Section */
.reset-memory-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.btn-reset-memory {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-reset-memory:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.btn-reset-memory:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-reset-memory:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-reset-memory .btn-icon {
    font-size: 16px;
}

.reset-memory-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

.form-help {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.status-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.info {
    background: #dbeafe;
    color: #1e40af;
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Errors Container */
.errors-container {
    margin-top: 16px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.errors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #fecaca;
}

.errors-title {
    font-weight: 600;
    color: #991b1b;
    font-size: 14px;
}

.btn-close-errors {
    background: none;
    border: none;
    font-size: 20px;
    color: #991b1b;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-close-errors:hover {
    background-color: #fee2e2;
}

.errors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.error-item {
    padding: 10px;
    background: #ffffff;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
}

.error-item-time {
    color: #6b7280;
    font-size: 11px;
    margin-bottom: 4px;
}

.error-item-message {
    color: #111827;
    font-weight: 500;
}

.error-item-details {
    color: #6b7280;
    font-size: 11px;
    margin-top: 4px;
}

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

.modal-content {
    background: var(--gradient-card);
    border-radius: 24px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--bg-color);
}

.modal-content form {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

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

.scanner-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.scanner-controls .btn {
    flex: 1;
    min-width: 150px;
}

/* Enhanced Sheet ID Input */
.sheet-id-input {
    font-size: 16px !important;
    letter-spacing: 0.5px;
}

.sheet-id-input:focus {
    border-width: 2px !important;
}


/* Mobile Responsive */
@media (max-width: 1024px) {
    .sheets-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .sheet-card {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 0 16px;
    }
    
    .dashboard-header {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 24px;
    }
    
    .header-content h1 {
        font-size: 22px;
    }
    
    .header-left {
        flex: 1;
    }
    
    .header-actions {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .sheets-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sheet-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    .sheet-card-header h3 {
        font-size: 1.25rem;
    }
    
    .sheet-id-container {
        flex-direction: column;
    }
    
    .sheet-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .scanner-controls {
        flex-direction: column;
    }
    
    .scanner-controls .btn {
        width: 100%;
    }
    
    .schedule-pill {
        flex-direction: column;
        gap: 8px;
    }
    
    .alert-card {
        flex-direction: column;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-compact {
        flex: 1;
    }
    
    .sheet-card {
        padding: 16px;
    }
    
    .form-label-large {
        font-size: 14px;
    }
    
    .sheet-id-input {
        font-size: 14px !important;
        padding: 12px 16px;
    }
    
    .btn-update {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Modal Notification System */
.modal-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-notification.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-notification.hide {
    opacity: 0;
}

.modal-notification-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-notification-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

/* Smaller, more elegant confirmation modal */
.modal-confirm .modal-notification-content {
    padding: 24px;
    max-width: 520px;
    gap: 16px;
}

.modal-notification.show .modal-notification-content {
    transform: scale(1) translateY(0);
}

.modal-notification[data-type="success"] .modal-notification-content {
    border-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.modal-notification[data-type="error"] .modal-notification-content {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.modal-notification[data-type="warning"] .modal-notification-content {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.modal-notification[data-type="info"] .modal-notification-content {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.modal-notification-icon {
    font-size: 48px;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: iconPulse 2s ease-in-out infinite;
}

/* Smaller icon for confirmation modal */
.modal-confirm .modal-notification-icon {
    font-size: 36px;
    width: 48px;
    height: 48px;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.modal-notification-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-notification-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modal-notification-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.modal-notification-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.modal-notification-body {
    flex: 1;
    min-width: 0;
}

/* More compact body for confirmation modal */
.modal-confirm .modal-notification-body {
    padding-top: 2px;
}

.modal-notification-title {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #111827;
}

.modal-notification-message {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    word-wrap: break-word;
    white-space: pre-line;
}

/* Smaller text for confirmation modal */
.modal-confirm .modal-notification-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.modal-confirm .modal-notification-message {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

.modal-notification-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.modal-notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111827;
    transform: rotate(90deg);
}

/* Confirmation Modal Styles */
.modal-confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.modal-confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
}

.modal-confirm-cancel {
    background: #f3f4f6;
    color: #374151;
}

.modal-confirm-cancel:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-confirm-ok {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.modal-confirm-ok:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.modal-confirm-ok:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .modal-notification {
        padding: 16px;
    }
    
    .modal-notification-content {
        padding: 24px;
        max-width: 100%;
    }
    
    .modal-notification-icon {
        font-size: 40px;
        width: 56px;
        height: 56px;
    }
    
    .modal-notification-title {
        font-size: 18px;
    }
    
    .modal-notification-message {
        font-size: 14px;
    }
    
    .modal-confirm-actions {
        flex-direction: column;
    }
    
    .modal-confirm-btn {
        width: 100%;
    }
}

/* Progress Panel */
.progress-panel {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    animation: progressPanelSlideIn 0.3s ease-out;
}

@keyframes progressPanelSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(14, 165, 233, 0.2);
}

.progress-icon {
    font-size: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.progress-title {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    color: #0c4a6e;
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(14, 165, 233, 0.2);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.progress-label {
    font-weight: 600;
    color: #075985;
    min-width: 80px;
}

.progress-value {
    flex: 1;
    color: #0c4a6e;
    font-weight: 500;
    word-break: break-word;
}

.progress-counter {
    color: #0284c7;
    font-size: 13px;
    font-weight: 600;
    background: rgba(14, 165, 233, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .progress-panel {
        padding: 16px;
    }
    
    .progress-item {
        flex-wrap: wrap;
    }
    
    .progress-label {
        min-width: 70px;
        font-size: 13px;
    }
    
    .progress-value {
        font-size: 13px;
    }
}

