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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 13px;
    height: 100vh;
    overflow: hidden;
}

#app {
    height: 100vh;
    display: flex;
}

.tutorial-spotlight-overlay {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: none;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--highlight-x, 50%) var(--highlight-y, 50%),
        transparent var(--highlight-radius, 100px),
        rgba(0, 0, 0, 0.6) calc(var(--highlight-radius, 100px) + 20px)
    );
    animation: spotlightFade 0.4s ease-out;
}

.page-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 9999;
    background: linear-gradient(90deg, #6366f1, #818cf8, #a5b4fc);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    pointer-events: none;
}

.page-progress-bar.active {
    opacity: 1;
    animation: progressBarRun 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes progressBarRun {
    0% { width: 0%; }
    60% { width: 75%; }
    85% { width: 90%; }
    100% { width: 100%; opacity: 0; }
}

@keyframes screenSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.landing-screen,
.home-screen,
.main-layout {
    animation: screenSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes spotlightFade {
    from {
        opacity: 0.3;
    }
    to {
        opacity: 1;
    }
}

.guided-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 87;
    pointer-events: none;
}

.guided-tour-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    pointer-events: auto;
    animation: fadeIn 0.4s ease-out;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.guided-tour-guide {
    position: absolute;
    pointer-events: auto;
    z-index: 88;
}

.guided-tour-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 0 solid transparent;
    border-top: 20px solid #3b82f6;
    left: -10px;
    top: -25px;
    animation: arrowBounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.guided-tour-text {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guided-tour-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.guided-tour-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
    line-height: 1.4;
}

.guided-tour-actions {
    display: flex;
    gap: 8px;
}

.guided-tour-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #3b82f6;
    color: white;
}

.guided-tour-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.guided-tour-btn.secondary {
    background: #e5e7eb;
    color: #374151;
}

.guided-tour-btn.secondary:hover {
    background: #d1d5db;
}

.demo-mode-container {
    position: fixed;
    inset: 0;
    z-index: 86;
    pointer-events: none;
}

.demo-highlight-overlay {
    position: fixed;
    top: var(--highlight-top, 0);
    left: var(--highlight-left, 0);
    width: var(--highlight-width, 100px);
    height: var(--highlight-height, 100px);
    border: 3px solid #3b82f6;
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.4);
    animation: demoPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 87;
}

@keyframes demoPulse {
    0%, 100% {
        box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.6), 0 0 50px rgba(59, 130, 246, 0.6);
    }
}

.demo-guide-box {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    z-index: 88;
    pointer-events: auto;
    max-width: 380px;
    animation: slideUp 0.4s ease-out;
}

.demo-guide-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 16px solid white;
    bottom: -14px;
    right: 40px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.1));
}

.demo-guide-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.demo-guide-content p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
}

.demo-step-indicator {
    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.demo-guide-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-btn {
    flex: 1;
    min-width: 70px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #e5e7eb;
    color: #374151;
}

.demo-btn:hover:not(:disabled) {
    background: #d1d5db;
    transform: translateY(-1px);
}

.demo-btn.primary {
    background: #3b82f6;
    color: white;
    flex: 1.2;
}

.demo-btn.primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.home-screen {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    background: #f3f4f6;
}

.dashboard-screen {
    padding: 0;
    background: #f3f4f6;
}

.dashboard-shell {
    width: 100%;
    min-height: 100vh;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    background: #f3f4f6;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.dashboard-page-title {
    font-size: 34px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.dashboard-logout-btn {
    border: 1px solid #c4d3e8;
    background: #ffffff;
    color: #1f4e83;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.dashboard-logout-btn:hover {
    background: #f2f7ff;
    border-color: #9bb8dc;
}

.dashboard-logout-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-avatar-initials {
    font-size: 15px;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1;
}

.dashboard-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-user-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.6;
    width: fit-content;
}

.badge-normal {
    background: #e5e7eb;
    color: #374151;
}

.badge-premium {
    background: #fef3c7;
    color: #92400e;
}

.badge-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.badge-admin {
    background: #ede9fe;
    color: #5b21b6;
}

.dashboard-main {
    padding: 22px 30px 36px;
    overflow-y: auto;
}

.dashboard-top-actions {
    margin-bottom: 22px;
}

.dashboard-create-btn {
    border: 0;
    border-radius: 9px;
    background: #2877eb;
    color: #ffffff;
    min-height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, box-shadow 0.16s ease;
    box-shadow: none;
}

.dashboard-create-btn svg {
    width: 14px;
    height: 14px;
}

.dashboard-create-btn span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.dashboard-create-btn:hover {
    background: #1e67d8;
}

.dashboard-create-btn.compact {
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    padding: 0 14px;
    margin-top: 4px;
}

.dashboard-create-btn.compact span {
    font-size: 14px;
    font-weight: 700;
}

.dashboard-footer {
    border-top: 1px solid #e5e7eb;
    background: #f3f4f6;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.landing-screen {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: 24px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    overflow: auto;
    background:
        radial-gradient(circle at 12% 12%, #d6ecff 0%, transparent 36%),
        radial-gradient(circle at 88% 22%, #ffe8be 0%, transparent 34%),
        linear-gradient(165deg, #f4f9ff 0%, #eef5ff 52%, #f8fcff 100%);
}

.landing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    color: #24466d;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.landing-brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
}

.landing-login-btn {
    border: 1px solid #c4d3e8;
    background: #ffffff;
    color: #1f4e83;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.landing-login-btn:hover {
    background: #f2f7ff;
    border-color: #9bb8dc;
}

.landing-hero {
    width: min(1120px, 100%);
    align-self: center;
    display: grid;
    grid-template-columns: 1fr minmax(400px, 520px);
    align-items: center;
    gap: 22px;
    margin-top: 12px;
}

.landing-hero-copy {
    display: grid;
    gap: 14px;
}

.landing-kicker {
    width: fit-content;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1d4f89;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e4efff;
}

.landing-hero h1 {
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.04;
    color: #15385e;
    max-width: 14ch;
}

.landing-hero p {
    font-size: 16px;
    line-height: 1.55;
    color: #425f80;
    max-width: 48ch;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.landing-start-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.34);
}

.landing-muted {
    font-size: 13px;
    color: #5e7694;
}

.landing-tutorial-preview {
    border: 1px solid #d3e1f0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(3px);
    box-shadow: 0 20px 40px rgba(29, 63, 103, 0.12);
    padding: 14px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: stretch;
}

.landing-tutorial-left {
    width: 170px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.landing-tutorial-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent 0%, #d6e5f5 16%, #d6e5f5 84%, transparent 100%);
    align-self: stretch;
    opacity: 0.95;
}

.landing-tutorial-head {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2d5d90;
}

.landing-tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.landing-step-card {
    position: relative;
    border: 1.5px solid #dbe7f4;
    border-radius: 10px;
    background: #f8fbff;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 16px 22px 1fr;
    gap: 6px;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
    user-select: none;
}

.landing-step-card:hover:not(.active) {
    border-color: #b6cfe8;
    background: #f2f7fe;
}

.landing-step-card.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.14);
    animation: none;
}

.landing-step-card.active .landing-step-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.landing-step-card.active .landing-step-num {
    color: #2563eb;
}

.landing-step-num {
    font-size: 10px;
    font-weight: 800;
    color: #8baac8;
    line-height: 1;
    justify-self: center;
    transition: color 0.2s;
}

/* Mouse arrow cursor on active step */
.landing-step-cursor {
    position: absolute;
    right: 7px;
    bottom: 5px;
    width: 14px;
    height: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
}

.cursor-svg {
    width: 14px;
    height: 18px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}

.cursor-ripple {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
}

.landing-step-card.active .landing-step-cursor {
    opacity: 1;
    animation: cursorClick 2s ease-in-out infinite;
}

.landing-step-card.active .cursor-ripple {
    animation: cursorRipple 2s ease-in-out infinite;
}

@keyframes cursorClick {
    0%, 100% { transform: scale(1); }
    22%       { transform: scale(0.78); }
    38%       { transform: scale(1); }
}

@keyframes cursorRipple {
    0%, 15%  { transform: scale(0); opacity: 0; }
    28%      { transform: scale(0.7); opacity: 0.85; }
    60%      { transform: scale(2.6); opacity: 0; }
    100%     { transform: scale(2.6); opacity: 0; }
}

.landing-step-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #e8f1ff;
    color: #2b64a2;
    display: inline-flex;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    align-items: center;
    justify-content: center;
}

.landing-step-icon svg {
    width: 13px;
    height: 13px;
}

.landing-step-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.landing-step-text strong {
    font-size: 11px;
    color: #1e3f66;
    white-space: nowrap;
}

.landing-step-text span {
    font-size: 10px;
    color: #5c7594;
    line-height: 1.3;
}

@keyframes landingStepFloat {
    0%, 100% { transform: translateY(0); box-shadow: 0 0 0 rgba(37,99,235,0); }
    50% { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37,99,235,0.08); }
}

/* ── Landing demo panel ─────────────────────────────── */
.landing-demo-panel {
    flex: 1;
    min-height: 220px;
    border: 1px solid #dce9f6;
    border-radius: 12px;
    background: #fbfdff;
    overflow: hidden;
}

.landing-demo-slide {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    animation: demoSlideIn 0.32s ease both;
    height: 100%;
    box-sizing: border-box;
}

@keyframes demoSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.demo-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #3d6b9a;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ─── Step 0: Employee list ──────────────────── */
.demo-emp-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.demo-emp-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: #2d4f70;
    opacity: 0;
    animation: empSlideIn 0.32s ease both;
}

.demo-emp-add {
    font-size: 10.5px;
    color: #2563eb;
    padding-left: 29px;
    opacity: 0;
    animation: empSlideIn 0.32s ease both;
}

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

.demo-emp-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 7.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.emp-av-1 { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.emp-av-2 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.emp-av-3 { background: linear-gradient(135deg, #059669, #34d399); }

.demo-emp-name {
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-emp-badge {
    font-size: 8.5px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #e8f0fb;
    color: #3a5f8a;
    white-space: nowrap;
    font-weight: 600;
}

/* ─── Step 1: Column creation ──────────────── */
.demo-th-day {
    background: #e8f0fb;
    color: #3a5f8a;
    font-size: 8.5px;
    font-weight: 700;
    padding: 3px 4px;
    text-align: left;
    border: 1px solid #d4e3f5;
    white-space: nowrap;
}

.demo-col-th {
    font-size: 8.5px;
    font-weight: 700;
    padding: 3px 4px;
    text-align: center;
    border: 1px solid #d4e3f5;
    opacity: 1;
    white-space: nowrap;
}

.demo-col-th small {
    display: block;
    font-size: 7px;
    font-weight: 500;
    opacity: 0.75;
    letter-spacing: 0;
    text-transform: none;
}

.demo-cth-1 { animation-delay: 0.1s; }
.demo-cth-2 { animation-delay: 0.34s; }
.demo-cth-3 { animation-delay: 0.58s; }

.landing-demo-slide.is-creating .demo-col-th {
    opacity: 0;
    visibility: hidden;
    animation: colBounceIn 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.landing-demo-slide.is-creating .demo-cth-1 { animation-delay: 0.08s; }
.landing-demo-slide.is-creating .demo-cth-2 { animation-delay: 0.28s; }
.landing-demo-slide.is-creating .demo-cth-3 { animation-delay: 0.48s; }

@keyframes colBounceIn {
    0%   { opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.6); }
    1%   { visibility: visible; }
    100% { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
}

.col-nobet {
    background: #e8f0fb;
    color: #3a5f8a;
}

.col-mesai {
    background: #e8f0fb;
    color: #3a5f8a;
}

/* Skeleton rows for step 1 */
.demo-skel-row td {
    border: 1px solid #e9f0f8;
    padding: 3px 4px;
}

.demo-day-skel {
    width: 28px;
    background: #edf2f9;
}

.demo-cell-skel {
    background: repeating-linear-gradient(90deg, #f0f4fb 0, #e4ecf7 50%, #f0f4fb 100%);
    background-size: 200% 100%;
    animation: skelShimmer 1.4s ease-in-out infinite;
}

@keyframes skelShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Step 2: Mini 15-day schedule ───────── */
.demo-slide-sched {
    padding: 8px !important;
}

.demo-sched-wrap {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    border-radius: 6px;
    scrollbar-width: none;
}

.demo-sched-wrap::-webkit-scrollbar { display: none; }

.demo-sched-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
}

.demo-sched-table th {
    background: #e8f0fb;
    color: #3a5f8a;
    font-size: 8.5px;
    font-weight: 700;
    padding: 3px 4px;
    text-align: center;
    border: 1px solid #d4e3f5;
    position: sticky;
    top: 0;
    z-index: 1;
}

.demo-sched-full tbody tr {
    opacity: 1;
}

@keyframes rowReveal {
    from { opacity: 0; transform: scaleY(0.4); }
    to   { opacity: 1; transform: scaleY(1); }
}

/* Magic shimmer sweep over the table */
.demo-sched-full {
    position: relative;
}

.demo-sched-full::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(99, 102, 241, 0.07) 44%,
        rgba(148, 130, 240, 0.18) 50%,
        rgba(99, 102, 241, 0.07) 56%,
        transparent 100%);
    animation: none;
    pointer-events: none;
    z-index: 2;
}

.landing-demo-slide.is-filled .demo-sched-full::after {
    animation: magicSweep 1.1s ease-in-out both;
}

@keyframes magicSweep {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* Weekend / holiday rows */
.demo-sched-full tbody tr.is-weekend td {
    background: #e7eef8;
}

.demo-sched-full tbody tr.is-holiday td {
    background: #fee2e2;
}

.demo-sched-full tbody tr.is-holiday .demo-day {
    color: #991b1b;
}

/* Day cell */
.demo-day {
    font-weight: 600;
    color: #4a6a8a;
    background: #f0f5fb;
    padding: 2px 4px;
    text-align: left;
    border: 1px solid #e4edf8;
    white-space: nowrap;
    display: flex;
    gap: 3px;
    align-items: baseline;
}

.d-num {
    font-size: 9px;
    font-weight: 700;
    color: #2d4f6e;
}

.d-name {
    font-size: 7.5px;
    color: #7a9ab8;
}

/* Data cells */
.mc {
    text-align: center;
    padding: 2px 3px;
    border: 1px solid #e4edf8;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mc-nobet {
    background: transparent;
    color: #3a5f8a;
}

.mc-mesai {
    background: transparent;
    color: #3a5f8a;
}

.demo-fill-cell {
    position: relative;
    color: transparent;
}

.demo-fill-cell::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 6px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, #ecf3fb 0%, #dfeaf8 50%, #ecf3fb 100%);
    background-size: 180% 100%;
    opacity: 0;
}

.landing-demo-slide.is-creating .demo-fill-cell {
    color: transparent;
}

.landing-demo-slide.is-creating .demo-fill-cell::before {
    opacity: 0;
    animation: none;
}

.landing-demo-slide.is-creating .demo-sched-full tbody td:nth-child(2),
.landing-demo-slide.is-creating .demo-sched-full tbody td:nth-child(3),
.landing-demo-slide.is-creating .demo-sched-full tbody td:nth-child(4) {
    opacity: 0;
    visibility: hidden;
    transform: scaleX(0.2);
    transform-origin: left center;
    animation: columnInsert 0.35s ease forwards;
}

.landing-demo-slide.is-creating .demo-sched-full tbody td:nth-child(2) { animation-delay: 0.08s; }
.landing-demo-slide.is-creating .demo-sched-full tbody td:nth-child(3) { animation-delay: 0.28s; }
.landing-demo-slide.is-creating .demo-sched-full tbody td:nth-child(4) { animation-delay: 0.48s; }

@keyframes columnInsert {
    0%   { opacity: 0; visibility: hidden; transform: scaleX(0.2); }
    1%   { visibility: visible; }
    100% { opacity: 1; visibility: visible; transform: scaleX(1); }
}

.landing-demo-slide.is-filled .demo-fill-cell {
    color: inherit;
    animation: cellFillIn 0.32s ease both;
}

.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(1) .demo-fill-cell { animation-delay: 0.06s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(2) .demo-fill-cell { animation-delay: 0.11s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(3) .demo-fill-cell { animation-delay: 0.16s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(4) .demo-fill-cell { animation-delay: 0.21s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(5) .demo-fill-cell { animation-delay: 0.26s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(6) .demo-fill-cell { animation-delay: 0.31s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(7) .demo-fill-cell { animation-delay: 0.36s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(8) .demo-fill-cell { animation-delay: 0.41s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(9) .demo-fill-cell { animation-delay: 0.46s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(10) .demo-fill-cell { animation-delay: 0.51s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(11) .demo-fill-cell { animation-delay: 0.56s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(12) .demo-fill-cell { animation-delay: 0.61s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(13) .demo-fill-cell { animation-delay: 0.66s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(14) .demo-fill-cell { animation-delay: 0.71s; }
.landing-demo-slide.is-filled .demo-sched-full tbody tr:nth-child(15) .demo-fill-cell { animation-delay: 0.76s; }

@keyframes cellFillIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.landing-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.landing-highlight-card {
    border: 1px solid #d3e0ef;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 5px;
}

.landing-highlight-card strong {
    font-size: 13px;
    color: #1d3f67;
}

.landing-highlight-card span {
    font-size: 12px;
    line-height: 1.45;
    color: #597291;
}

@media (max-width: 960px) {
    .landing-screen {
        grid-template-rows: auto auto auto;
        align-content: start;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .landing-hero h1 {
        max-width: 18ch;
    }

    .landing-highlights {
        grid-template-columns: 1fr;
    }

    .landing-tutorial-preview {
        flex-direction: column;
    }

    .landing-tutorial-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, transparent 0%, #d6e5f5 20%, #d6e5f5 80%, transparent 100%);
    }

    .landing-tutorial-left {
        width: 100%;
        padding-right: 0;
    }

    .landing-tutorial-steps {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .landing-step-card {
        flex: 1;
        min-width: 130px;
    }

    .landing-demo-panel {
        min-height: 180px;
    }

    .dashboard-screen {
        padding: 10px;
    }

    .dashboard-shell {
        min-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .dashboard-header {
        padding: 12px;
    }

    .dashboard-main {
        padding: 12px;
    }

    .dashboard-footer {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
    }
}

.home-card {
    width: min(620px, calc(100vw - 28px));
    border: 1px solid #d8e4f3;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 26px 60px rgba(27, 49, 76, 0.16);
    padding: 28px 24px;
    display: grid;
    gap: 12px;
}

.home-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #3b6aa0;
}

.home-card h1 {
    font-size: 28px;
    line-height: 1.15;
    color: #1f3550;
}

.home-card p {
    font-size: 14px;
    color: #4f657d;
    line-height: 1.5;
}

.home-create-row {
    margin: 4px 0 12px;
}

.home-create-card {
    width: 160px;
    min-height: 80px !important;
}

.home-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.home-btn {
    border: 1px solid #c6d4e5;
    background: #fff;
    color: #324d68;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.home-btn.primary {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.home-btn:hover {
    background: #f2f7ff;
}

.home-btn.primary:hover {
    background: #1942b7;
}

.home-btn.secondary {
    border-color: #9ca3af;
    background: #f3f4f6;
    color: #6b7280;
}

.home-btn.secondary:hover {
    background: #e5e7eb;
}

.project-home-card {
    width: min(920px, calc(100vw - 28px));
}

.project-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

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

@media (min-width: 860px) {
    .project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.project-section {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    min-height: unset;
    display: block;
}

.project-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.project-section-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #1f2937;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.project-section-add-btn {
    border: 0;
    background: transparent;
    color: #2877eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.project-card-btn {
    width: 100%;
    border: 1px solid #e1e4ea;
    background: #f2f3f5;
    border-radius: 12px;
    min-height: 86px;
    padding: 11px;
    text-align: left;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: none;
}

.project-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
    border-color: #d4d9e1;
}

.project-card-btn.add {
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #ffffff;
    border-style: dashed;
    border-color: #d8dee4;
    gap: 6px;
}

.project-plus {
    font-size: 28px;
    line-height: 1;
    color: #8c959f;
}

.project-card-calendar-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #efefef;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-card-calendar-icon svg {
    width: 18px;
    height: 18px;
}

.project-card-content {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.project-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-sub {
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
}

.project-card-name {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.project-card-actions {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
}

.project-mini-btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 7px;
    width: 22px;
    height: 22px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.project-mini-btn svg {
    width: 12px;
    height: 12px;
}

.project-mini-btn.icon-btn {
    line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
    .project-mini-btn:hover {
        color: #2877eb;
        background: transparent;
    }

    .project-mini-btn.danger:hover {
        color: #dc2626;
        background: transparent;
    }
}

.project-mini-btn.danger {
    color: #9ca3af;
    background: transparent;
    border: none;
}

.project-empty-state {
    min-height: 300px;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 32px 18px;
    text-align: center;
    background: rgba(249, 250, 251, 0.68);
}

.project-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #f3f4f6;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-empty-icon svg {
    width: 26px;
    height: 26px;
}

.project-empty-state h2 {
    font-size: 18px;
    color: #111827;
}

.project-empty-state p {
    max-width: 340px;
    color: #6b7280;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .dashboard-header {
        padding: 14px 16px;
    }

    .dashboard-page-title {
        font-size: 28px;
    }

    .dashboard-main {
        padding: 16px 14px 24px;
    }

    .dashboard-create-btn {
        min-height: 34px;
        font-size: 12px;
    }

    .dashboard-create-btn span {
        font-size: 12px;
    }

    .project-section {
        padding: 0;
    }

    .project-section-title {
        font-size: 16px;
    }

    .project-section-add-btn {
        font-size: 12px;
    }

    .project-card-btn {
        min-height: 90px;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .project-card-calendar-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .project-card-title {
        font-size: 13px;
    }

    .project-card-name {
        font-size: 10px;
    }

    .project-card-actions {
        right: 7px;
        bottom: 6px;
    }
}

.main-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100vh;
    min-width: 0;
    overflow: hidden;
}

.canvas-top-header {
    height: 52px;
    min-height: 52px;
    border: 1px solid rgba(181, 205, 231, 0.8);
    background: rgba(250, 253, 255, 0.62);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(32, 62, 96, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin: 0;
    position: relative;
    z-index: 5;
}

.canvas-top-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #274a70;
}

.canvas-top-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.canvas-top-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.canvas-top-btn {
    border: 1px solid #c6d8eb;
    background: rgba(255, 255, 255, 0.7);
    color: #2e5278;
    border-radius: 9px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.canvas-top-btn:hover {
    border-color: #98b8db;
    background: rgba(238, 245, 255, 0.9);
}

.canvas-top-btn.danger {
    border-color: #efc6c6;
    color: #8b2d2d;
    background: rgba(255, 245, 245, 0.72);
}

.canvas-top-btn.danger:hover {
    border-color: #e3aaaa;
    background: rgba(255, 236, 236, 0.9);
}

.canvas-workspace {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow: hidden;
    border-top: 1px solid #d8dee4;
    background: #f6f8fa;
    padding: 10px;
    gap: 10px;
}

.canvas-workspace > * {
    min-height: 0;
}

.left-panel {
    width: 250px;
    min-width: 250px;
    flex: 0 0 250px;
    order: 1;
    background: #ffffff;
    border: 1px solid #d0d7de;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(27, 31, 36, 0.06);
    transition: width 0.2s ease, min-width 0.2s ease, flex-basis 0.2s ease;
}

.left-panel.emp-list-collapsed {
    width: 72px;
    min-width: 72px;
    flex: 0 0 72px;
}

.emp-collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #6b8da8;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}

.emp-collapse-btn:hover {
    color: #245fca;
}

.emp-stats-summary {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 0 3px;
    color: #5f7894;
}

.emp-load-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 4px 0 0;
}

.emp-load-pill span {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    color: var(--emp-load-ink, #25415f);
    border: 1px solid var(--emp-load-border, rgba(45, 75, 108, 0.18));
    line-height: 1;
    white-space: nowrap;
}

.emp-stats-summary.low { color: #713f12; }
.emp-stats-summary.done { color: #166534; }
.emp-stats-summary.mid { color: #064e3b; }
.emp-stats-summary.extra { color: #7f1d1d; }

.emp-list-collapsed .emp-name {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 44px;
}

.emp-list-collapsed .emp-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
}

.left-header {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #57606a;
    border-bottom: 1px solid #d8dee4;
    background: #f6f8fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-header-logout {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.left-header-logout:hover {
    background: rgba(0, 0, 0, 0.1);
}

.emp-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 7px;
    background: transparent;
}

.emp-manual-card {
    margin: 8px;
    margin-bottom: 4px;
    padding: 10px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #f6f8fa;
    display: grid;
    gap: 8px;
}

.emp-manual-title {
    font-size: 11px;
    font-weight: 700;
    color: #24292f;
}

.emp-import-prev-btn {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    color: #24292f;
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(27, 31, 36, 0.06);
}

.emp-import-prev-btn small {
    font-size: 10px;
    font-weight: 600;
    color: #57606a;
}

.emp-manual-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.emp-manual-type-toggle {
    min-width: 62px;
    height: 30px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: #24292f;
    background: #ffffff;
    cursor: pointer;
    white-space: nowrap;
}

.emp-manual-input {
    width: 100%;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 11px;
    color: #24292f;
    background: #fff;
}

.emp-manual-input:focus {
    outline: none;
}

.emp-manual-input:focus-visible {
    border-color: #0969da;
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.14);
}

.emp-manual-add-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border: 1px solid #1f6feb;
    background: #1f6feb;
    color: #fff;
    border-radius: 8px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.emp-manual-add-btn:focus {
    outline: none;
}

.emp-manual-add-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.22);
}

@media (hover: hover) and (pointer: fine) {
    .emp-import-prev-btn:hover {
        border-color: #8c959f;
        background: #ffffff;
    }

    .emp-manual-type-toggle:hover {
        background: #f3f4f6;
        border-color: #8c959f;
    }

    .emp-manual-add-btn:hover {
        background: #0969da;
    }
}

.left-month-summary {
    border-top: 1px solid #d8dee4;
    background: #f6f8fa;
    padding: 8px;
}

.left-month-summary-title {
    font-size: 11px;
    font-weight: 700;
    color: #24292f;
}

.left-month-summary-detail-btn {
    float: right;
    border: 1px solid #cbd9e8;
    background: #fff;
    color: #375270;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    cursor: pointer;
}

.left-month-summary-sub {
    font-size: 10px;
    color: #57606a;
    margin-top: 2px;
    margin-bottom: 7px;
}

.left-summary-grid {
    display: grid;
    gap: 6px;
}

.left-summary-item {
    border: 1px solid #d8dee4;
    background: #fff;
    border-radius: 6px;
    padding: 6px 7px;
}

.left-summary-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #57606a;
}

.left-summary-value {
    font-size: 13px;
    font-weight: 700;
    color: #24292f;
    margin-top: 2px;
}

.emp-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 8px 9px;
    margin: 5px 0;
    border-radius: 10px;
    cursor: grab;
    border: 1px solid #d8dee4;
    background: var(--emp-card-bg, #ffffff);
    font-size: 11px;
    box-shadow: 0 1px 2px rgba(27, 31, 36, 0.06);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.emp-item:hover {
    background: #f6f8fa;
    border-color: #d0d7de;
}

.emp-item.selected {
    border-color: #1f6feb;
    box-shadow: 0 0 0 1px rgba(31, 111, 235, 0.2);
}

.emp-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 4px;
    position: relative;
    padding-top: 18px;
}

.emp-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.emp-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #24292f;
    font-weight: 800;
    white-space: nowrap;
    padding-right: 2px;
}

.emp-type-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    color: #57606a;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.emp-type-chip:hover {
    background: #f3f4f6;
    border-color: #8c959f;
}

.emp-name-edit-zone {
    flex: 1;
    min-width: 0;
}

.emp-name-editable {
    cursor: text;
    border-radius: 5px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.emp-name-input {
    width: 100%;
    min-width: 0;
    border: 1px solid #22c55e;
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #14532d;
    background: #f0fdf4;
    outline: none;
}

.emp-hours {
    font-size: 10px;
    font-weight: 700;
    color: #57606a;
}

.emp-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.emp-settings-btn,
.emp-delete-btn {
    width: 16px;
    height: 16px;
    border: 1px solid #d0d7de;
    background: #ffffff;
    color: #57606a;
    border-radius: 4px;
    font-size: 11px;
    line-height: 12px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.emp-settings-btn:hover {
    color: #0969da;
    border-color: #8c959f;
    background: #f6f8fa;
}

.emp-delete-btn:hover {
    color: #b42318;
    border-color: #efb3ad;
    background: rgba(255, 245, 244, 0.9);
}

.emp-load-track {
    height: 6px;
    border-radius: 999px;
    background: #e6ebf2;
    overflow: visible;
    position: relative;
    margin-top: 2px;
}

.emp-load-track::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 1px;
    height: 10px;
    background: #c9d3df;
}

.emp-load-fill {
    height: 100%;
    border-radius: 999px;
    width: 0;
    max-width: 100%;
    overflow: hidden;
    transition: width 0.2s ease;
}

.emp-load-target-marker {
    position: absolute;
    top: -1px;
    width: 2px;
    height: 8px;
    background: #dc2626;
    transform: translateX(-50%);
    border-radius: 2px;
    opacity: 0.9;
}

.emp-load-current-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    color: #1f2937;
    background: #eef2f7;
    border: 1px solid #d4dce5;
    white-space: nowrap;
    pointer-events: none;
}

.emp-load-current-indicator.low {
    color: #713f12;
    border-color: #fde68a;
    background: #fffbeb;
}

.emp-load-current-indicator.mid {
    color: #14532d;
    border-color: #86efac;
    background: #f0fdf4;
}

.emp-load-current-indicator.done {
    color: #166534;
    border-color: #bbf7d0;
    background: #dcfce7;
}

.emp-load-current-indicator.extra {
    color: #991b1b;
    border-color: #fca5a5;
    background: #fff1f2;
}

.emp-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.emp-load-fill.low,
.emp-status.low {
    color: #713f12;
    background-color: #d97706;
}

.emp-load-fill.mid,
.emp-status.mid {
    color: #14532d;
    background-color: #16a34a;
}

.emp-load-fill.done,
.emp-status.done {
    color: #166534;
    background-color: #4ade80;
}

.emp-load-fill.extra,
.emp-status.extra {
    color: #991b1b;
    background-color: #dc2626;
}

.emp-status.low,
.emp-status.mid,
.emp-status.done,
.emp-status.extra {
    background: transparent;
}

.emp-item:hover {
    border-color: var(--emp-load-border, rgba(234, 179, 8, 0.5));
    filter: saturate(1.05);
}

.emp-item:active {
    cursor: grabbing;
}

.main-content {
    flex: 1 1 auto;
    order: 2;
    display: flex;
    flex-direction: column;
    background: #efefef;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.ai-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(380px, calc(100vw - 24px));
    height: min(620px, calc(100vh - 92px));
    max-height: calc(100vh - 92px);
    z-index: 120;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #d8e4f2;
    border-radius: 18px;
    box-shadow: 0 22px 52px rgba(20, 43, 72, 0.24);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.ai-panel-head {
    padding: 12px 13px;
    border-bottom: 1px solid #e0ebf7;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ai-panel-head-main {
    min-width: 0;
}

.ai-panel-head h2 {
    font-size: 13px;
    color: #213b56;
    margin-bottom: 3px;
    letter-spacing: 0.02em;
}

.ai-panel-head p {
    font-size: 11px;
    color: #577391;
}

.ai-minimize-btn {
    border: 1px solid #bfd2e8;
    background: #ffffff;
    color: #2f4f71;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    line-height: 1;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.ai-minimize-btn:hover {
    background: #edf5ff;
    border-color: #a7c1df;
}

.ai-panel.is-minimized {
    height: auto;
    min-height: 0;
    max-height: none;
}

.ai-panel.is-minimized .ai-quick-actions,
.ai-panel.is-minimized .ai-messages,
.ai-panel.is-minimized .ai-input-row {
    display: none;
}

.ai-quick-actions {
    display: flex;
    gap: 6px;
    padding: 9px 11px;
    border-bottom: 1px solid #edf2f8;
    flex-wrap: wrap;
    background: #fcfeff;
}

.ai-chip {
    border: 1px solid #c8d8eb;
    background: #f8fbff;
    color: #325678;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ai-chip:hover {
    background: #edf5ff;
}

.ai-chip.agent-mode-chip {
    margin-left: auto;
    opacity: 0.62;
    transition: opacity 180ms ease, transform 180ms ease;
}

.ai-chip.agent-mode-chip.active {
    opacity: 1;
    transform: translateY(-1px);
}

.agent-model-meta {
    display: grid;
    gap: 1px;
    padding: 1px 11px 3px;
}

.agent-model-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #3a5878;
    opacity: 0.76;
}

.agent-quota-label {
    font-size: 10px;
    font-weight: 600;
    color: #627a95;
    opacity: 0.64;
}

.agent-account-status,
.agent-credit-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.agent-account-status {
    text-transform: uppercase;
    background: #e2e8f0;
    color: #334155;
}

.agent-account-status.status-premium {
    background: #dcfce7;
    color: #166534;
}

.agent-account-status.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.agent-account-status.status-normal {
    background: #e2e8f0;
    color: #334155;
}

.agent-credit-status {
    background: #e0f2fe;
    color: #0c4a6e;
}

.agent-provider-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.agent-provider-status.provider-ok {
    background: #dcfce7;
    color: #166534;
}

.agent-provider-status.provider-blocked {
    background: #ffedd5;
    color: #9a3412;
}

.dashboard-create-btn.admin {
    background: #0f3f6e;
    border-color: #0f3f6e;
}

.dashboard-create-btn.admin:hover {
    background: #0b3258;
    border-color: #0b3258;
}

.admin-panel-card {
    max-width: 1100px;
    width: min(96vw, 1100px);
    max-height: 84vh;
    display: flex;
    flex-direction: column;
}

.admin-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-panel-sub {
    margin-top: 4px;
    font-size: 13px;
    color: #516173;
}

.admin-toolbar {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-search-input {
    flex: 1;
}

.admin-error-box {
    margin-top: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

.admin-users-table-wrap {
    margin-top: 12px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    overflow: auto;
    background: #ffffff;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-users-table th,
.admin-users-table td {
    border-bottom: 1px solid #eef2f7;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}

.admin-users-table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-user-main {
    font-weight: 700;
    color: #1e293b;
}

.admin-user-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.admin-status-select,
.admin-credit-input {
    min-width: 120px;
}

.admin-empty-cell {
    text-align: center;
    color: #64748b;
    padding: 18px;
}

.admin-sync-note {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 900px) {
    .admin-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

.agent-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 11px 4px;
}

.agent-step {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5f7590;
    opacity: 0.4;
    transform: translateY(2px);
    transition: opacity 220ms ease, transform 220ms ease, letter-spacing 220ms ease;
}

.agent-step.active {
    opacity: 0.95;
    transform: translateY(0);
    color: #2b4562;
    letter-spacing: 0.1em;
}

.agent-step.passed {
    opacity: 0.68;
    transform: translateY(1px);
}

.agent-step.idle {
    opacity: 0.4;
    transform: translateY(2px);
}

.ai-panel.is-minimized .ai-process-indicator {
    display: none;
}

.ai-process-indicator {
    margin: 2px 11px 8px;
    padding: 8px 10px;
    border: 1px solid #e4ecf6;
    border-radius: 12px;
    background: linear-gradient(180deg, #fcfeff 0%, #f6faff 100%);
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 10px;
    align-items: center;
}

.ai-robot-stage {
    position: relative;
    width: 62px;
    height: 52px;
}

.ai-robot-halo {
    position: absolute;
    left: 9px;
    top: 6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.28) 0%, rgba(74, 144, 226, 0.05) 70%, transparent 100%);
    animation: aiHaloPulse 1.8s ease-in-out infinite;
}

.ai-robot-core {
    position: absolute;
    left: 12px;
    top: 10px;
    width: 30px;
    height: 24px;
    border: 1px solid #b9cee4;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
    box-shadow: 0 6px 14px rgba(47, 95, 146, 0.15);
    animation: aiRobotBob 1.4s ease-in-out infinite;
}

.ai-robot-eye {
    position: absolute;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3d73a7;
    animation: aiRobotBlink 2.2s ease-in-out infinite;
}

.ai-robot-eye.eye-left {
    left: 9px;
}

.ai-robot-eye.eye-right {
    right: 9px;
}

.ai-robot-mouth {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 6px;
    height: 2px;
    border-radius: 99px;
    background: rgba(61, 115, 167, 0.52);
}

.ai-scan-sheet {
    position: absolute;
    width: 13px;
    height: 16px;
    border: 1px solid #cad9ea;
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.ai-scan-sheet::before,
.ai-scan-sheet::after {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    height: 1px;
    background: rgba(91, 126, 162, 0.45);
}

.ai-scan-sheet::before {
    top: 5px;
}

.ai-scan-sheet::after {
    top: 9px;
}

.ai-scan-sheet.sheet-a {
    right: 4px;
    top: 2px;
    animation: aiSheetFloatA 1.6s ease-in-out infinite;
}

.ai-scan-sheet.sheet-b {
    right: -1px;
    bottom: 2px;
    animation: aiSheetFloatB 1.9s ease-in-out infinite;
}

.ai-scan-beam {
    position: absolute;
    left: 6px;
    right: 4px;
    top: 26px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent 0%, rgba(70, 142, 214, 0.95) 40%, transparent 100%);
    animation: aiBeamSweep 1.2s ease-in-out infinite;
}

.ai-process-copy {
    min-width: 0;
}

.ai-process-title {
    font-size: 11px;
    font-weight: 800;
    color: #2d4a69;
    letter-spacing: 0.02em;
}

.ai-process-sub {
    margin-top: 2px;
    font-size: 10px;
    color: #5d7490;
    opacity: 0.9;
}

@keyframes aiRobotBob {
    0%,
    100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes aiRobotBlink {
    0%,
    45%,
    55%,
    100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.15); opacity: 0.8; }
}

@keyframes aiBeamSweep {
    0% { transform: translateX(-8px); opacity: 0.25; }
    50% { transform: translateX(6px); opacity: 1; }
    100% { transform: translateX(12px); opacity: 0.2; }
}

@keyframes aiSheetFloatA {
    0%,
    100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes aiSheetFloatB {
    0%,
    100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes aiHaloPulse {
    0%,
    100% { opacity: 0.45; transform: scale(0.95); }
    50% { opacity: 0.85; transform: scale(1.08); }
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 11px;
    display: grid;
    gap: 8px;
    align-content: start;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.ai-msg {
    border-radius: 12px;
    padding: 9px 10px;
    max-width: 92%;
}

.ai-msg.user {
    margin-left: auto;
    background: linear-gradient(180deg, #e9f3ff 0%, #dceaff 100%);
    border: 1px solid #bdd4f9;
}

.ai-msg.assistant {
    margin-right: auto;
    background: #f8fafd;
    border: 1px solid #dfe7f1;
}

.ai-msg-role {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #71859a;
    margin-bottom: 3px;
}

.ai-msg-text {
    font-size: 12px;
    color: #2f4359;
    white-space: pre-wrap;
    line-height: 1.45;
}

.ai-input-row {
    border-top: 1px solid #e0ebf7;
    padding: 10px 11px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: #f7fbff;
}

.ai-input {
    flex: 1;
    border: 1px solid #c3d4e8;
    border-radius: 8px;
    padding: 8px 9px;
    font-size: 12px;
    color: #304457;
}

.ai-input-textarea {
    min-height: 74px;
    max-height: 190px;
    resize: vertical;
    line-height: 1.4;
    font-family: inherit;
    white-space: pre-wrap;
}

.ai-input:disabled {
    background: #f3f6fa;
    color: #8a98a8;
}

.ai-send {
    border: 1px solid #2f6fec;
    background: #2f6fec;
    color: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai-send:hover {
    background: #2359bc;
    border-color: #2359bc;
}

.ai-send:disabled {
    opacity: 0.7;
    cursor: wait;
}

.top-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 8px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.top-header h1 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-title-row {
    width: 100%;
    min-width: 0;
}

.canvas-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px 4px;
    flex-shrink: 0;
}

.canvas-title-service {
    min-width: 0;
    flex: 1;
}

.canvas-service-title {
    font-size: 18px !important;
    font-weight: 800;
    color: #1a3352;
    margin: 0;
    border-bottom: 1px dashed transparent;
    cursor: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.canvas-service-title:hover {
    border-bottom-color: #93a8c2;
}

.canvas-service-title-input {
    font-size: 16px;
    font-weight: 800;
    color: #1a3352;
}

.editable-service-title {
    cursor: text;
    width: fit-content;
    max-width: 100%;
    border-bottom: 1px dashed transparent;
}

.editable-service-title:hover {
    border-bottom-color: #93a8c2;
}

.editable-service-title-input {
    width: min(680px, 100%);
    border: 1px solid #c8d5e4;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #243a52;
    background: #fff;
}

.editable-service-title-input:focus {
    outline: none;
    border-color: #7ba6d1;
    box-shadow: 0 0 0 3px rgba(94, 146, 195, 0.2);
}

.top-controls {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.auto-schedule-btn {
    border: 1px solid #b9ccdf;
    background: #f2f7ff;
    color: #21476c;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.icon-only-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-only-btn svg {
    width: 16px;
    height: 16px;
}

.hero-auto-icon {
    font-size: 13px;
    line-height: 1;
}

.floating-hero-auto-btn {
    padding: 7px 14px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), 0 1px 3px rgba(37, 99, 235, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.floating-hero-auto-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5), 0 2px 6px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.floating-hero-auto-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.floating-hero-auto-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #9ca3af;
    box-shadow: none;
}

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

.auto-schedule-overlay {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.16), transparent 34%),
        radial-gradient(circle at 80% 28%, rgba(14, 165, 233, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(241, 247, 255, 0.76) 0%, rgba(231, 240, 252, 0.86) 100%);
    backdrop-filter: blur(12px);
}

.auto-schedule-overlay-card {
    position: relative;
    width: min(760px, 100%);
    padding: 26px 28px;
    border-radius: 28px;
    border: 1px solid rgba(189, 210, 234, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 250, 255, 0.96) 100%);
    box-shadow: 0 28px 80px rgba(31, 64, 103, 0.18);
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 22px;
    overflow: hidden;
}

.auto-schedule-overlay-glow {
    position: absolute;
    inset: -20% auto auto -10%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.04) 60%, transparent 100%);
    pointer-events: none;
}

.auto-schedule-robot-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
}

.auto-robot-stage {
    transform: scale(2.1);
    transform-origin: center;
}

.auto-paper-stack {
    position: absolute;
    width: 18px;
    height: 20px;
    border: 1px solid #c8d7e7;
    border-radius: 5px;
    background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
    box-shadow: 0 6px 14px rgba(64, 104, 148, 0.12);
}

.auto-paper-stack.stack-back {
    left: -6px;
    bottom: 2px;
    transform: rotate(-10deg);
    animation: autoPaperShuffleBack 1.7s ease-in-out infinite;
}

.auto-paper-stack.stack-front {
    left: 4px;
    bottom: -2px;
    transform: rotate(8deg);
    animation: autoPaperShuffleFront 1.28s ease-in-out infinite;
}

.auto-schedule-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    gap: 10px;
}

.auto-schedule-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4b76a3;
}

.auto-schedule-title {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.06;
    font-weight: 900;
    color: #153555;
    max-width: 14ch;
}

.auto-schedule-sub {
    font-size: 14px;
    line-height: 1.55;
    color: #4d657f;
    max-width: 52ch;
}

.auto-schedule-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.auto-schedule-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(180deg, #4f8ed4 0%, #2563eb 100%);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
    animation: autoScheduleDotPulse 1.25s ease-in-out infinite;
}

.auto-schedule-dots span:nth-child(2) {
    animation-delay: 0.18s;
}

.auto-schedule-dots span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes autoScheduleDotPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes autoPaperShuffleBack {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(-10deg);
    }
    50% {
        transform: translateX(-4px) translateY(-3px) rotate(-17deg);
    }
}

@keyframes autoPaperShuffleFront {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(8deg);
    }
    50% {
        transform: translateX(5px) translateY(-4px) rotate(16deg);
    }
}

@media (max-width: 780px) {
    .auto-schedule-overlay-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 22px 18px;
    }

    .auto-schedule-copy {
        justify-items: center;
    }

    .auto-schedule-title,
    .auto-schedule-sub {
        max-width: none;
    }
}

.auto-schedule-btn:hover {
    background: #e4efff;
    border-color: #98b6d7;
}

.auto-schedule-btn.secondary {
    background: #fff;
    border-color: #cfd9e4;
    color: #3b5268;
}

.auto-schedule-btn.secondary:hover {
    background: #f7f9fc;
}

.auto-schedule-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.target-hours-control {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #3b4f63;
}

.target-hours-control input {
    width: 58px;
    border: 1px solid #b9ccdf;
    border-radius: 6px;
    height: 26px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: #22374c;
    background: #f9fcff;
}

.table-range-control {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #3b4f63;
    padding: 4px 8px;
    border: 1px solid #d5e0ec;
    border-radius: 8px;
    background: linear-gradient(180deg, #fbfdff 0%, #f0f6ff 100%);
}

.table-range-control input {
    width: 48px;
    border: 1px solid #b9ccdf;
    border-radius: 6px;
    height: 24px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: #22374c;
    background: #fff;
}

.table-range-control input:focus {
    outline: none;
    border-color: #7ba6d1;
    box-shadow: 0 0 0 2px rgba(94, 146, 195, 0.2);
}

.table-range-control small {
    color: #6d8196;
    font-size: 12px;
}

.planner-settings-grid {
    margin-top: 10px;
}

.planner-hard-rules {
    display: grid;
    gap: 5px;
    padding: 8px;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #f8fbff;
}

.planner-soft-rules {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e8edf4;
    border-radius: 8px;
    background: #fff;
}

.planner-soft-note {
    font-size: 11px;
    color: #657a8f;
}

.soft-rule-row {
    display: grid;
    grid-template-columns: 1fr 115px;
    align-items: center;
    gap: 8px;
}

.planner-post-add-box {
    margin-top: 8px;
    display: grid;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #edf2f8;
}

.planner-post-add-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.planner-derived-list {
    display: grid;
    gap: 6px;
}

.planner-derived-empty {
    font-size: 11px;
    color: #6d8196;
}

.planner-derived-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border: 1px solid #e5ecf4;
    border-radius: 8px;
    background: #fbfdff;
}

.planner-derived-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.planner-derived-type {
    font-size: 10px;
    font-weight: 800;
    color: #4a6785;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.planner-derived-label {
    font-size: 12px;
    color: #2d4258;
    font-weight: 600;
}

.planner-derived-value {
    font-size: 11px;
    color: #4f6379;
    font-weight: 700;
}

.planner-derived-remove {
    border: 1px solid #d6e0ea;
    border-radius: 7px;
    background: #fff;
    color: #3f5a76;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
}

.planner-derived-remove:hover {
    background: #f3f8ff;
    border-color: #b8cbe0;
}

.soft-rule-label {
    font-size: 12px;
    color: #2d4258;
}

.star-picker {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.star-btn {
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.1s, transform 0.1s;
    user-select: none;
}

.star-btn.active {
    color: #f59e0b;
}

.star-btn:hover {
    transform: scale(1.2);
    color: #fbbf24;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.month-nav > button {
    width: 22px;
    height: 22px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-nav > button:hover {
    background: #f0f0f0;
}

.month-label {
    font-size: 11px;
    font-weight: 600;
    min-width: 110px;
    text-align: center;
}

.month-range-wrap {
    position: relative;
}

.month-range-trigger {
    height: 22px;
    border: 1px solid #b9ccdf;
    background: #f7fbff;
    color: #2f4f70;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 0 8px;
    cursor: pointer;
}

.month-range-trigger:hover {
    background: #edf5ff;
    border-color: #9cb5d5;
}

.table-range-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 35;
    width: 215px;
    border: 1px solid #d4deea;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(25, 50, 80, 0.16);
    padding: 10px;
    display: grid;
    gap: 8px;
}

.table-range-popover-title {
    font-size: 11px;
    font-weight: 800;
    color: #355878;
}

.table-range-popover-row {
    display: grid;
    gap: 4px;
}

.table-range-popover-row span {
    font-size: 11px;
    color: #4f647b;
    font-weight: 700;
}

.table-range-popover-row input {
    border: 1px solid #b9ccdf;
    border-radius: 6px;
    height: 28px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: #22374c;
    background: #fff;
}

.table-range-popover-row input:focus {
    outline: none;
    border-color: #7ba6d1;
    box-shadow: 0 0 0 2px rgba(94, 146, 195, 0.2);
}

.canvas-area {
    flex: 1;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    padding: 18px 120px 28px 20px;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    min-width: 0;
    scrollbar-gutter: stable;
}

.canvas-drag-preview {
    position: fixed;
    z-index: 2000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 1px dashed #2563eb;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 7px 20px rgba(22, 38, 62, 0.18);
    padding: 0 6px;
    box-sizing: border-box;
    overflow: hidden;
    transform: translate(-50%, -50%);
}

.canvas-drag-preview-text {
    width: 100%;
    text-align: center;
    color: #1f334b;
    font-weight: 700;
    font-size: clamp(10px, 1.05vw, 12px);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-toggle-btn {
    position: fixed;
    right: 16px;
    top: 110px;
    z-index: 34;
    border: 1px solid #cfd9e4;
    background: #ffffff;
    color: #334b66;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.history-panel {
    position: fixed;
    right: 16px;
    top: 152px;
    z-index: 34;
    width: min(330px, calc(100vw - 24px));
    max-height: min(70vh, 560px);
    border: 1px solid #d7e1ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(17, 38, 66, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e7edf4;
    background: #f8fbff;
    color: #2d4662;
    font-size: 12px;
}

.history-panel-close {
    width: 24px;
    height: 24px;
    border: 1px solid #ced8e5;
    border-radius: 6px;
    background: #ffffff;
    color: #4a617c;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.history-shortcuts {
    padding: 9px 12px;
    border-bottom: 1px solid #edf2f8;
    background: #fbfdff;
    font-size: 11px;
    color: #4a627c;
    display: grid;
    gap: 4px;
}

.history-list {
    overflow: auto;
    padding: 8px;
    display: grid;
    gap: 6px;
}

.history-item {
    border: 1px solid #e2eaf3;
    border-radius: 8px;
    padding: 8px 9px;
    background: #ffffff;
}

.history-item-title {
    font-size: 12px;
    font-weight: 700;
    color: #2f4863;
}

.history-item-sub {
    margin-top: 2px;
    font-size: 11px;
    color: #607991;
}

/* ── Canvas sticky top: title + controls always visible ─────────────────── */
.canvas-sticky-top {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 10px;
}

.canvas-title-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 16px 6px;
    background: rgba(240, 247, 255, 0.18);
}

.canvas-title-main {
    min-width: 0;
    flex: 1 1 auto;
}

.canvas-title-right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.canvas-main-title {
    font-size: 17px !important;
    font-weight: 800;
    color: #17304f;
    margin: 0;
    cursor: text;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.15s;
    display: inline-block;
}

.canvas-main-title:hover {
    border-bottom-color: #7ba6d1;
}

.canvas-main-title-input {
    font-size: 16px;
    font-weight: 800;
    color: #17304f;
    border: 1px solid #c8d5e4;
    border-radius: 8px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.8);
    outline: none;
    width: min(600px, 100%);
}

.canvas-controls-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.canvas-controls-inline .auto-schedule-btn {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 11px;
    border-radius: 9px;
}

.canvas-controls-inline .icon-only-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
}

/* Month nav centered inside the table header */
.table-month-nav {
    position: relative;
    z-index: 11;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px 10px;
    background: rgba(236, 247, 255, 0.88);
    border: 1px solid rgba(180, 210, 235, 0.6);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.canvas-utility-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    position: sticky;
    top: 8px;
    z-index: 12;
}

.canvas-utility-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.canvas-utility-actions-bounce {
    animation: utilityBounceInRight 540ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes utilityBounceInRight {
    0% {
        transform: translateX(28px);
        opacity: 0;
    }
    60% {
        transform: translateX(-6px);
        opacity: 1;
    }
    80% {
        transform: translateX(3px);
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.canvas-utility-btn {
    border: 1px solid #c7d7ea;
    background: rgba(255, 255, 255, 0.9);
    color: #274d74;
    border-radius: 10px;
    padding: 7px 11px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.canvas-utility-btn:hover {
    border-color: #96b5d8;
    background: #f0f6ff;
}

@media (max-width: 1100px) {
    .canvas-title-right {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

.canvas-layout {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: max-content;
    transform-origin: top left;
}

.info-panel {
    width: 260px;
    background: #fff;
    border: 1px solid #d9e0e8;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(35, 52, 70, 0.08);
    padding: 14px;
    position: sticky;
    top: 0;
}

.info-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.merged-employee-panel {
    width: clamp(170px, 18vw, 210px);
    min-width: 170px;
    display: grid;
    gap: 10px;
    padding: 10px;
}

/* ── Personal calendar flat panel ── */
.personal-cal-panel {
    width: clamp(130px, 13vw, 175px);
    min-width: 130px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(180, 210, 240, 0.55);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(40, 80, 140, 0.10);
    backdrop-filter: blur(8px);
    overflow: hidden;
    flex-shrink: 0;
}

.personal-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(180, 210, 240, 0.45);
    flex-wrap: wrap;
}

.personal-cal-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.personal-cal-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.personal-cal-paint-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(180, 210, 240, 0.35);
}

.personal-cal-body {
    overflow-y: auto;
    flex: 1;
}

.personal-cal-body .employee-calendar-table {
    width: 100%;
}

.personal-icon-btn {
    padding: 4px 6px !important;
    min-width: 0 !important;
    font-size: 14px !important;
    line-height: 1;
}

/* ── Canvas zoom bar ── */
.canvas-zoom-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 5px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(180,210,240,0.35);
    border-bottom: 1px solid rgba(180,210,240,0.35);
}

.canvas-zoom-btn {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(100,140,180,0.4);
    border-radius: 5px;
    background: rgba(240,246,255,0.8);
    color: #3a5068;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s;
}
.canvas-zoom-btn:hover:not(:disabled) { background: #d8eaf9; }
.canvas-zoom-btn:disabled { opacity: 0.35; cursor: default; }

.canvas-zoom-slider {
    flex: 1;
    max-width: 160px;
    height: 4px;
    accent-color: #4a90d9;
    cursor: pointer;
}

.canvas-zoom-label {
    font-size: 12px;
    font-weight: 600;
    color: #3a5068;
    min-width: 38px;
    text-align: right;
}

.canvas-zoom-reset {
    border: none;
    background: none;
    font-size: 15px;
    color: #7090b0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.12s;
}
.canvas-zoom-reset:hover { color: #2563eb; }

/* ── Zoom bar fixed, left of AI panel ── */
.ai-panel-section {
    display: contents;
}

.canvas-zoom-bar--vertical {
    position: fixed;
    right: calc(18px + min(380px, calc(100vw - 24px)) + 10px);
    bottom: 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(180,210,240,0.55);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(20,43,72,0.13);
    z-index: 120;
    white-space: nowrap;
}

.canvas-zoom-bar--vertical .canvas-zoom-btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
}

.canvas-zoom-slider--vertical {
    flex: 1;
    min-width: 100px;
    max-width: 160px;
    height: 4px;
    accent-color: #4a90d9;
    cursor: pointer;
    writing-mode: unset;
    direction: unset;
    min-height: unset;
    max-height: unset;
    width: auto;
}

.canvas-zoom-label--vertical {
    font-size: 12px;
    font-weight: 600;
    color: #3a5068;
    min-width: 38px;
    text-align: right;
    writing-mode: unset;
    transform: unset;
}

.info-head-merged {
    margin-bottom: 0;
    justify-content: space-between;
    align-items: center;
}

.info-head-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.stats-open-btn {
    flex: 0 0 auto;
}

.info-head-actions-right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.info-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.info-name {
    font-size: 15px;
    font-weight: 700;
    color: #304253;
}

.info-subtitle {
    font-size: 11px;
    color: #7d8d9d;
    margin-top: 2px;
}

.stat-list {
    display: grid;
    gap: 10px;
}

.stat-card {
    border: 1px solid #e4eaf0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
}

.stat-card.warning {
    background: #fff4f4;
    border-color: #f0c8c8;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    color: #8191a1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #28384a;
}

.stat-note {
    font-size: 11px;
    color: #617282;
    margin-top: 4px;
}

.small-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.table-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: visible;
    max-width: 100%;
    zoom: 0.9;
}

.schedule-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

.schedule-with-add {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.employee-calendar-panel {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    min-width: 132px;
    margin-left: 8px;
    zoom: 0.9;
}

.merged-calendar-panel {
    margin-left: 0;
    min-width: 0;
    width: 100%;
    zoom: 1;
    border: none;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
}

.employee-calendar-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    padding: 7px 8px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fbff;
}

.employee-calendar-actions-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
}

.employee-calendar-title {
    font-size: 11px;
    font-weight: 700;
    color: #31495f;
}

.employee-calendar-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 10px;
    font-family: 'Manrope', 'Avenir Next', 'Segoe UI Variable', 'Segoe UI', sans-serif;
}

.employee-calendar-table th,
.employee-calendar-table td {
    padding: 6px 8px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.employee-calendar-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}

.employee-calendar-name {
    background: #f3f8ff !important;
    color: #2f465e !important;
    font-weight: 700 !important;
}

.employee-calendar-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.employee-calendar-day {
    font-weight: 600;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    text-align: center !important;
    padding: 6px 4px !important;
}

.employee-calendar-table tbody td {
    height: 32px;
    background: #fff;
}

.employee-calendar-table tbody tr {
    cursor: pointer;
}

.employee-calendar-table tbody tr:hover td {
    box-shadow: inset 0 0 0 1px #8fb4ee;
}

.employee-calendar-table tbody tr.weekend td {
    background: #e7eef8;
}

.employee-calendar-table tbody tr.holiday td {
    background: #dbe8ff;
}

/* off-request row tint (light yellow) */
.employee-calendar-table tbody tr.off-request td {
    background: #fffae8;
}

/* leave row tint (light grey) */
.employee-calendar-table tbody tr.leave td {
    background: #edf1f6;
}

.employee-calendar-status {
    font-size: 11px;
    font-weight: 600;
    color: #425364;
    padding: 0 6px;
}

.employee-calendar-status.empty-fill {
    background: transparent;
}

/* Colored square appearance for status cells */
.employee-calendar-table tbody td.employee-calendar-status {
    border-radius: 4px;
    padding: 2px 6px;
}

.employee-calendar-table tbody td.employee-calendar-status.nobet-fill {
    background: #ffe060;
    color: #5e4a00;
    font-weight: 700;
}

.employee-calendar-table tbody td.employee-calendar-status.mesai-fill {
    background: #b6e8be;
    color: #1f5f31;
}

.employee-calendar-table tbody td.employee-calendar-status.off-fill {
    background: #c8d5e0;
    color: #354554;
}

.employee-calendar-table tbody td.employee-calendar-status.other-fill {
    background: #f9c7c7;
    color: #7a1d1d;
}

/* İzin = gri (grey) */
.employee-calendar-table tbody td.employee-calendar-status.leave-fill {
    background: #b0bec9;
    color: #2c3d4e;
    font-weight: 700;
}

/* Off İsteği = sarı (yellow) */
.employee-calendar-table tbody td.employee-calendar-status.off-request-fill {
    background: #ffe660;
    color: #5a4500;
    font-weight: 700;
}

/* ── Calendar paint-mode toolbar ─────────────────────────────── */
.cal-paint-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0 8px;
    border-bottom: 1px solid #e6ecf4;
    background: transparent;
}

.cal-paint-label {
    font-size: 10px;
    font-weight: 700;
    color: #8a9db5;
    text-transform: uppercase;
    white-space: nowrap;
}

.cal-paint-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 6px;
    border: 1.5px solid #c8d5e4;
    border-radius: 6px;
    background: #fff;
    color: #3b5268;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.cal-paint-btn:hover {
    border-color: #7aa8d8;
    background: #f0f6ff;
}

.cal-paint-btn.active {
    border-color: #3a80c8;
    background: #e6f0fb;
    box-shadow: 0 0 0 2px #bcd7f5;
    color: #1a3e6a;
}

.cal-paint-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}

.cal-swatch-off  { background: #ffe660; }
.cal-swatch-leave { background: #b0bec9; }

.table-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.table-header-title {
    min-width: 0;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.table-action-btn {
    border: 1px solid #cfd9e4;
    background: #fff;
    color: #3b5268;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.table-action-btn.icon-only {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.table-action-btn:hover {
    background: #f5f8fc;
    border-color: #b9c8d7;
}

.table-action-btn.share-btn {
    border-color: #a5b4fc;
    color: #4f46e5;
    background: #eef2ff;
}
.table-action-btn.share-btn:hover {
    background: #e0e7ff;
}

.table-action-btn.export-icon-btn {
    color: #2e4b66;
}

.ios-share-icon {
    width: 15px;
    height: 15px;
    display: block;
}

/* ── Export dropdown ─────────────────── */
.export-menu-wrap {
    position: relative;
}

.export-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid #d1d9e6;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.13);
    z-index: 9000;
    overflow: hidden;
    padding: 4px 0;
}

.export-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 9px 16px;
    font-size: 13px;
    color: #2d3a4a;
    cursor: pointer;
    white-space: nowrap;
}
.export-item:hover { background: #f5f8fc; }
.export-item.sheets-btn { color: #1a6b3a; border-top: 1px solid #e8edf3; margin-top: 2px; }

/* ── Share link modal ───────────────────── */
.share-link-card {
    max-width: 460px;
    width: 96%;
}

.share-modal-body {
    padding: 4px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.share-label {
    font-size: 12px;
    font-weight: 700;
    color: #5a6a7e;
}

.share-select {
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #2d3a4a;
    background: #fff;
    cursor: pointer;
}
.share-select:focus { outline: none; border-color: #6366f1; }

.share-desc {
    font-size: 12px;
    color: #6b7b8e;
    margin: 0;
}

.share-generate-btn {
    align-self: flex-start;
}

.share-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-link-input {
    flex: 1;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11px;
    color: #3b5268;
    background: #f8fafc;
    cursor: text;
    min-width: 0;
}
.share-copy-btn { white-space: nowrap; flex-shrink: 0; }

.table-with-add-btn {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.canvas-add-anchor {
    background: transparent;
    border: 1px solid transparent;
    border-left: none;
    border-radius: 0 4px 4px 0;
    box-shadow: none;
    padding: 0;
    margin-top: 33px;
    margin-left: 8px;
    zoom: 0.9;
    position: relative;
    flex-shrink: 0;
}

.ghost-col-header {
    opacity: 0.58;
    background: #f2f6fb !important;
    animation: ghostColFadeIn 0.18s ease;
}

.ghost-col-cell {
    opacity: 0.45;
    background: #edf3fa !important;
    animation: ghostColFadeIn 0.18s ease;
}

.ghost-col-header .slot-header-inner {
    background: #e8f0f9;
    border: 1px dashed rgba(100, 128, 158, 0.42);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    padding: 6px 10px 6px 8px;
}

@keyframes ghostColFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.55;
    }
}

.canvas-add-btn {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 56px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #edf2f8;
    color: #4f6278;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease;
}

.canvas-add-btn .add-plus {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.1s ease, transform 0.12s ease;
}

.canvas-add-btn .add-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(1px);
    opacity: 0;
    transition: opacity 0.12s ease 0s;
}

.slot-header-wrap {
    position: relative;
}

.slot-header-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.slot-header-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 40px;
}

.slot-settings-btn,
.slot-delete-btn {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #96a3b2;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    z-index: 2;
}

.slot-settings-btn {
    font-size: 10px;
}

.slot-settings-btn:hover,
.slot-delete-btn:hover,
.clear-cell-btn:hover {
    background: #eef3f8;
    color: #44576b;
}

.slot-header-name {
    font-size: 12px;
    font-weight: 700;
    color: #324255;
}

.slot-header-name-clickable {
    cursor: pointer;
    border-radius: 5px;
    padding: 1px 3px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.slot-inline-name-select {
    width: 100%;
    max-width: 130px;
    border: 1px solid #22c55e;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #166534;
    background: #f0fdf4;
    outline: none;
}

.slot-header-type {
    font-size: 10px;
    font-weight: 700;
    color: #5c7086;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.slot-header-time {
    font-size: 10px;
    color: #6b7788;
}

.slot-header-meta-clickable {
    cursor: pointer;
    border-radius: 5px;
    padding: 1px 3px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.slot-inline-meta-select {
    width: 100%;
    max-width: 130px;
    border: 1px solid #22c55e;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #166534;
    background: #f0fdf4;
    outline: none;
}

.slot-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.slot-badge {
    padding: 2px 5px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    background: #edf2f8;
    color: #58708d;
}

.slot-badge.off {
    background: #f1f1f1;
    color: #909090;
}

table.schedule {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: 12px;
    user-select: none;
}

table.schedule th:not(:first-child),
table.schedule td:not(:first-child) {
    min-width: 200px;
}

table.schedule th,
table.schedule td {
    padding: 6px 8px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

table.schedule th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}

table.schedule td {
    height: 32px;
    vertical-align: middle;
    background: #fff;
    position: relative;
}

table.schedule tbody tr:nth-child(odd) {
    background: #fafafa;
}

table.schedule tbody tr.weekend,
table.schedule tbody tr.weekend td {
    background: #e7eef8;
}

table.schedule tbody tr.holiday,
table.schedule tbody tr.holiday td {
    background: #dbe8ff;
}

.day-label {
    font-weight: 600;
    color: #333;
    min-width: 96px;
    width: 96px;
    max-width: 96px;
    white-space: nowrap;
    cursor: pointer;
}

table.schedule thead th.column-drag-over {
    background: #eaf1fb !important;
    box-shadow: inset 0 0 0 2px rgba(78, 126, 183, 0.35);
}

table.schedule thead th.column-drag-active,
table.schedule tbody td.schedule-cell.column-drag-active {
    background: linear-gradient(180deg, rgba(232, 241, 255, 0.96) 0%, rgba(245, 249, 255, 0.96) 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(85, 132, 196, 0.2);
}

table.schedule thead th.column-drag-active .slot-header-wrap,
table.schedule tbody td.schedule-cell.column-drag-active .cell-drop-zone {
    transform: translateY(-3px);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    box-shadow: 0 10px 22px rgba(62, 108, 169, 0.12);
    border-radius: 10px;
}

table.schedule thead th.column-drag-animating .slot-header-wrap,
table.schedule tbody td.schedule-cell.column-drag-animating .cell-drop-zone {
    animation: scheduleColumnShuffle 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

table.schedule thead th.column-added-animating .slot-header-wrap,
table.schedule tbody td.schedule-cell.column-added-animating .cell-drop-zone {
    animation: scheduleColumnBounceIn 0.34s cubic-bezier(0.2, 0.9, 0.2, 1);
}

table.schedule thead th.column-removing-animating .slot-header-wrap,
table.schedule tbody td.schedule-cell.column-removing-animating .cell-drop-zone {
    animation: scheduleColumnBounceOut 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes scheduleColumnShuffle {
    0% {
        transform: translateX(0) translateY(0) scale(1);
        filter: saturate(1);
    }
    30% {
        transform: translateX(8px) translateY(-4px) scale(1.02);
        filter: saturate(1.08);
    }
    65% {
        transform: translateX(-6px) translateY(-2px) scale(0.995);
        filter: saturate(1.03);
    }
    100% {
        transform: translateX(0) translateY(0) scale(1);
        filter: saturate(1);
    }
}

@keyframes scheduleColumnBounceIn {
    0% {
        transform: scale(0.88) translateY(8px);
        opacity: 0.45;
    }
    55% {
        transform: scale(1.035) translateY(-4px);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes scheduleColumnBounceOut {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    35% {
        transform: scale(1.02) translateY(-3px);
        opacity: 0.95;
    }
    100% {
        transform: scale(0.86) translateY(10px);
        opacity: 0;
    }
}

.day-label.day-drag-selected {
    background: #9ecaff !important;
    border-left: 3px solid #2563eb;
}

.day-label.weekend {
    color: #4b6487;
}

.day-label.holiday {
    color: #274e88;
}

.schedule-cell {
    cursor: pointer;
    padding: 2px 4px !important;
    height: auto !important;
}

.schedule-cell.disabled-cell {
    background: repeating-linear-gradient(135deg, #f4f6f8, #f4f6f8 8px, #eef1f4 8px, #eef1f4 16px) !important;
    cursor: not-allowed;
}

.schedule-cell.bulk-mark-cell {
    outline: 2px solid #6ea8ff;
    outline-offset: -2px;
    background: #edf4ff !important;
}

.cell-drop-zone {
    min-height: 28px;
    display: flex;
    align-items: center;
}

.cell-drop-zone.drag-over {
    background: #dbeafe;
    border: 1px dashed #4285f4;
    border-radius: 2px;
}

.assigned-name {
    width: 100%;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 22px 4px 6px;
    font-weight: 600;
    position: relative;
    cursor: grab;
    user-select: none;
}

.assigned-name:active {
    cursor: grabbing;
}

.assigned-name.selected {
    outline: 2px solid currentColor;
    outline-offset: -2px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.55);
}

.clear-cell-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #91a0af;
    width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 50%;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(28, 36, 46, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 260;
}

.modal-backdrop-top {
    z-index: 420;
}

.modal-card {
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    padding: 18px;
}

.stats-detail-card {
    width: min(560px, calc(100vw - 32px));
}

/* ── Auto Schedule Report Modal ────────────────────────────── */
.asr-card {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.asr-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #e8eff7;
}

.asr-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a3550;
}

.asr-solver-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    background: #e8f0fb;
    color: #2b5aa0;
    border-radius: 6px;
    padding: 2px 8px;
}

.asr-close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #7a96b2;
    line-height: 1;
    padding: 2px 4px;
}

.asr-close-btn:hover { color: #1a3550; }

.asr-body {
    overflow-y: auto;
    padding: 14px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.asr-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7a96b2;
    margin-bottom: 8px;
}

.asr-success-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.asr-success-bar-wrap {
    flex: 1;
    height: 10px;
    background: #e4ecf5;
    border-radius: 5px;
    overflow: hidden;
}

.asr-success-bar {
    height: 100%;
    background: linear-gradient(90deg, #4da6ff, #2b7de9);
    border-radius: 5px;
    transition: width 0.4s;
}

.asr-success-pct {
    font-size: 13px;
    font-weight: 800;
    color: #2b5aa0;
    min-width: 36px;
    text-align: right;
}

.asr-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4a6275;
    padding: 3px 0;
    border-bottom: 1px solid #f0f4fa;
}

.asr-metric-row.asr-warn span:last-child {
    color: #c0392b;
    font-weight: 700;
}

.asr-rule-icon {
    font-size: 13px;
    font-weight: 700;
    width: 16px;
    text-align: center;
}


.asr-rule-icon.success { color: #1f8c55; }
.asr-rule-icon.warning { color: #b7791f; }
.asr-rule-icon.error { color: #c0392b; }

.asr-check-table {
    border: 1px solid #e4ecf5;
    border-radius: 10px;
    overflow: hidden;
}

.asr-check-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 140px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-bottom: 1px solid #eef3f8;
    font-size: 12px;
    color: #2f4558;
}

.asr-check-row:last-child {
    border-bottom: none;
}

.asr-check-head {
    background: #f5f8fd;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #7a96b2;
}

.asr-check-label,
.asr-check-detail {
    min-width: 0;
}

.asr-check-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.asr-check-status.is-success { color: #1f8c55; }
.asr-check-status.is-warning { color: #b7791f; }
.asr-check-status.is-error { color: #c0392b; }

.asr-suggestion-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: #39536e;
    font-size: 12px;
    line-height: 1.5;
}

.star-on { color: #f5a623; }
.star-off { color: #dce6f0; }

.asr-emp-table {
    border: 1px solid #e4ecf5;
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
}

.asr-emp-row {
    display: grid;
    grid-template-columns: 1fr 70px 60px;
    gap: 4px;
    padding: 5px 10px;
    border-bottom: 1px solid #f0f4fa;
    align-items: center;
}

.asr-emp-row:last-child { border-bottom: none; }

.asr-emp-head {
    background: #f5f8fd;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #7a96b2;
}

/* ── Employee min/max hour range row ─────────────────────────── */
.emp-hours-range-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 3px 0 2px;
}

.emp-range-label {
    font-size: 9px;
    color: #8fa4b8;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.emp-range-input {
    width: 44px;
    padding: 1px 4px;
    font-size: 10px;
    border: 1px solid #d6e0ea;
    border-radius: 4px;
    color: #2f4356;
    background: #f8fafc;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.emp-range-input::-webkit-inner-spin-button,
.emp-range-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.emp-range-input:focus { border-color: #4a90d9; background: #fff; }

.planner-monthly-hours-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.planner-monthly-hours-row .planner-min-saat-row {
    border-bottom: none;
    margin-bottom: 0;
    flex: 1 1 auto;
}

.planner-total-hours-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-bottom: 6px;
}

.planner-total-hours-label {
    font-size: 12px;
    color: #15803d;
    font-weight: 500;
}

.planner-total-hours-value {
    font-size: 13px;
    font-weight: 700;
    color: #166534;
}

.planner-min-saat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 4px;
    border-bottom: 1px solid #e8eff7;
    margin-bottom: 4px;
}

.planner-min-saat-input {
    width: 64px !important;
    font-size: 12px !important;
    padding: 3px 6px !important;
}

/* ── Infeasible Report Modal ──────────────────────────────────── */
.ifr-card {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.ifr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e9eef5;
}

.ifr-title {
    font-size: 15px;
    font-weight: 800;
    color: #b8460b;
}

.ifr-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ifr checklist */
.ifr-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ifr-check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
}

.ifr-check-item.ifr-check-ok  { background: #f3fcf6; }
.ifr-check-item.ifr-check-warn { background: #fffbec; }
.ifr-check-item.ifr-check-error { background: #fff4f2; }

.ifr-check-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    margin-top: 1px;
}

.ifr-badge-ok    { background: #d4f5e4; color: #1a7a45; }
.ifr-badge-warn  { background: #fff0c0; color: #8a6000; }
.ifr-badge-error { background: #ffe0d8; color: #a0220a; }

.ifr-check-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.ifr-check-label {
    font-size: 12px;
    font-weight: 700;
    color: #2f4356;
    line-height: 1.3;
}

.ifr-check-value {
    font-size: 11px;
    color: #607d8b;
    line-height: 1.3;
}

.ifr-suggestions-block {
    background: #fff8f0;
    border: 1px solid #f0c890;
    border-radius: 8px;
    padding: 10px 14px;
}

.ifr-suggestions-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9a5c1a;
    margin-bottom: 6px;
}

.ifr-suggestions-list {
    margin: 0;
    padding: 0 0 0 16px;
    font-size: 12px;
    color: #5a3a1a;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-person-card {
    width: min(1280px, calc(100vw - 36px));
    max-height: calc(100vh - 42px);
    display: flex;
    flex-direction: column;
}

.day-person-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.day-person-head-left {
    min-width: 260px;
    display: grid;
    gap: 8px;
}

.day-person-retouch-note {
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 6px 8px;
    max-width: 520px;
}

.day-person-head-right {
    margin-left: auto;
    display: grid;
    gap: 8px;
    justify-items: end;
}

.day-person-add-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.day-person-add-input {
    width: 220px;
    max-width: 48vw;
    border: 1px solid #ccd8e6;
    border-radius: 7px;
    padding: 5px 8px;
    font-size: 11px;
    color: #2f4257;
    background: #fff;
}

.day-person-add-btn {
    border: 1px solid #a7c6f0;
    border-radius: 7px;
    padding: 5px 9px;
    background: #e8f1ff;
    color: #1d4f88;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.day-person-add-btn:hover {
    background: #dceafe;
}

.day-person-paint-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.day-person-paint-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7b8ea2;
    letter-spacing: 0.04em;
    margin-right: 2px;
}

.day-person-paint-btn {
    border: 1px solid #c9d7e5;
    border-radius: 999px;
    background: #fff;
    color: #40556b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    cursor: pointer;
}

.day-person-paint-btn:hover {
    background: #f4f8fd;
}

.day-person-paint-btn.active {
    border-color: #5c8fc8;
    background: #e8f2ff;
    color: #1f4e83;
    box-shadow: 0 0 0 2px rgba(134, 176, 226, 0.35);
}

.day-person-paint-btn--assign.cat-nobet.active {
    border-color: #d1a30b;
    background: #fff4c1;
    color: #735400;
}

.day-person-paint-btn--assign.cat-mesai.active {
    border-color: #2b9952;
    background: #dff8e8;
    color: #195b31;
}

.day-person-paint-btn--assign.cat-ekmesai.active {
    border-color: #ad3c3c;
    background: #ffe3e3;
    color: #7f2424;
}

.day-person-paint-help {
    font-size: 10px;
    color: #7c8ea2;
    margin-left: 6px;
}

.day-person-head .modal-title {
    margin-bottom: 0;
}

.day-person-table-wrap {
    border: 1px solid #e3e9f1;
    border-radius: 10px;
    overflow: auto;
    max-height: calc(100vh - 220px);
}

.day-person-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.day-person-table th,
.day-person-table td {
    border: 1px solid #e2e8f0;
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
}

.day-person-table th {
    position: sticky;
    top: 0;
    background: #f7f9fc;
    color: #2f4257;
    z-index: 1;
}

.day-person-emp-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 96px;
}

.day-person-emp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.day-person-day {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f9fbff;
    font-weight: 700;
    color: #2f4358;
.share-debug-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.share-debug-row .modal-btn {
    font-size: 12px;
    padding: 6px 10px;
}
    white-space: nowrap;
    cursor: pointer;
}

.day-person-table tr.weekend .day-person-day {
    background: #fff8eb;
}
.share-mode-badge {
    border: 1px solid #bfd4ef;
    background: #edf4ff;
    color: #2f5f9a;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.day-person-table tr.holiday .day-person-day {
    background: #ffe9e9;
}

.day-person-cell {
    min-width: 96px;
    color: #32465b;
    cursor: pointer;
}

.day-person-cell.state-leave {
    background: #fff1f2;
    color: #9f1239;
    font-weight: 700;
}

.day-person-cell.state-assigned,
.day-person-cell.state-assigned-nobet {
    background: #ecfdf3;
    color: #166534;
}

.day-person-cell.state-assigned-mesai {
    background: #dcfce7;
    color: #1e6a3c;
}

.day-person-cell.state-assigned-ek\ mesai {
    background: #fee2e2;
    color: #8d2d2d;
}

.day-person-cell.state-rest {
    background: #eef2ff;
    color: #3730a3;
}

.day-person-cell.state-off {
    background: #f8fafc;
    color: #475569;
}

.day-person-cell.paint-active {
    box-shadow: inset 0 0 0 2px #7aa4d3;
}

.day-person-cell.drag-over {
    outline: 2px dashed #4d84bf;
    outline-offset: -2px;
    background: #eef6ff !important;
}

.day-person-cell.swap-selected {
    box-shadow: inset 0 0 0 2px #2563eb;
    background: #e8f1ff !important;
}

.day-person-cell.auto-check-pass {
    box-shadow: inset 0 0 0 2px #22c55e;
}

.day-person-cell.auto-check-fail {
    box-shadow: inset 0 0 0 2px #ef4444;
}

@media (max-width: 900px) {
    .day-person-head {
        flex-direction: column;
        align-items: stretch;
    }

    .day-person-head-right {
        margin-left: 0;
        justify-items: start;
    }

    .day-person-paint-toolbar {
        justify-content: flex-start;
    }
}

.day-person-actions {
    margin-top: 12px;
}

.stats-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.stats-detail-section-title {
    margin-top: 14px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #5b7086;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stats-detail-table-wrap {
    border: 1px solid #e3e9f1;
    border-radius: 8px;
    overflow: auto;
    max-height: 280px;
}

.stats-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.stats-detail-table th,
.stats-detail-table td {
    border: 1px solid #e7edf4;
    padding: 6px 8px;
    text-align: left;
}

.stats-detail-table th {
    background: #f5f8fc;
    color: #4b6278;
    position: sticky;
    top: 0;
}

.advantage-chip {
    font-weight: 700;
}

.adv-positive {
    color: #166534;
}

.adv-negative {
    color: #b91c1c;
}

.adv-neutral {
    color: #475569;
}

.stats-detail-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.stats-detail-summary-item {
    border: 1px solid #e2e9f1;
    border-radius: 8px;
    background: #f9fbff;
    padding: 8px;
    display: grid;
    gap: 3px;
}

.stats-detail-summary-item span {
    font-size: 10px;
    color: #73879b;
    text-transform: uppercase;
    font-weight: 700;
}

.stats-detail-summary-item strong {
    font-size: 13px;
    color: #243b53;
}

.stats-detail-summary-item.highlight {
    background: #eefbf3;
    border-color: #bde8cb;
}

.stats-detail-summary-item.highlight strong {
    color: #166534;
}

.stats-detail-item {
    border: 1px solid #e2e9f1;
    border-radius: 8px;
    background: #f8fbff;
    padding: 8px;
    display: grid;
    gap: 3px;
}

.stats-detail-item span {
    font-size: 10px;
    color: #73879b;
    text-transform: uppercase;
    font-weight: 700;
}

.stats-detail-item strong {
    font-size: 12px;
    color: #273c53;
}

.dialog-card {
    width: min(420px, calc(100vw - 32px));
}

.employee-settings-card {
    width: min(390px, calc(100vw - 32px));
}

.employee-settings-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: -4px 0 14px;
}

.employee-settings-summary span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f7fc;
    border: 1px solid #dfe8f3;
    color: #425d78;
    font-size: 11px;
    font-weight: 700;
}

.tutorial-card {
    width: min(520px, calc(100vw - 28px));
}

.tutorial-step {
    font-size: 11px;
    font-weight: 700;
    color: #6b7e92;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.tutorial-description {
    font-size: 14px;
    color: #455a71;
    line-height: 1.5;
}

.dialog-message {
    font-size: 13px;
    line-height: 1.5;
    color: #495b6e;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3a48;
    margin-bottom: 14px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #617181;
    margin-bottom: 5px;
}

.field-input,
.field-select {
    width: 100%;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    background: #fff;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checks-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #415264;
}

.check-item-locked {
    color: #6f7f8e;
}

.check-item-locked input[type="checkbox"] {
    cursor: not-allowed;
}

.hard-rule-inline-input {
    width: 60px;
    border: 1px solid #c3cedb;
    border-radius: 6px;
    height: 24px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #2e4257;
    background: #fff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.modal-btn {
    border: 1px solid #d5dce4;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: #425364;
}

.modal-btn.primary {
    background: #2f6fec;
    color: #fff;
    border-color: #2f6fec;
}

/* Post-login visual refresh: minimal, modern, landing-aligned */
:root {
    --app-ink-900: #17304f;
    --app-ink-700: #2f4a68;
    --app-ink-500: #5f7894;
    --app-line: #d7e3f0;
    --app-card: rgba(255, 255, 255, 0.88);
    --app-card-strong: #ffffff;
    --app-soft-blue: #edf4ff;
    --app-accent: #245fca;
    --app-shadow: 0 16px 40px rgba(23, 48, 79, 0.1);
}

body {
    font-family: 'Manrope', 'Avenir Next', 'Segoe UI Variable', 'Segoe UI', sans-serif;
}

.main-layout {
    background:
        radial-gradient(circle at 14% 10%, #e7f2ff 0%, transparent 34%),
        radial-gradient(circle at 88% 8%, #fff0d2 0%, transparent 30%),
        linear-gradient(168deg, #f5f9ff 0%, #edf3fc 54%, #f8fbff 100%);
}

.canvas-top-header {
    background: rgba(250, 253, 255, 0.62);
    border: 1px solid rgba(181, 205, 231, 0.8);
    box-shadow: 0 8px 24px rgba(32, 62, 96, 0.12);
    backdrop-filter: blur(10px);
}

.left-panel {
    background: transparent;
    border: 1px solid rgba(183, 205, 229, 0.72);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 34px rgba(30, 58, 90, 0.12);
    margin: 0;
}

.left-header {
    background: transparent;
    border-bottom: 1px solid rgba(214, 227, 242, 0.82);
    color: #4f6d8c;
    letter-spacing: 0.04em;
}

.emp-manual-card,
.left-month-summary,
.left-summary-item {
    border-color: rgba(193, 212, 233, 0.88);
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 7px 18px rgba(29, 59, 93, 0.08);
    backdrop-filter: blur(6px);
}

.emp-item {
    border-color: #e5e7eb;
    background: #ffffff;
    backdrop-filter: blur(4px);
}

.emp-item.selected {
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(229, 231, 235, 0.95);
}

.emp-item:hover {
    border-color: #d1d5db;
    filter: none;
}

.group .opacity-0 {
    opacity: 0;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.transition-opacity {
    transition: opacity 0.18s ease;
}

.main-content {
    background: transparent;
}

.top-header {
    display: none;
}

.canvas-sticky-top {
    background: transparent;
    border-radius: 0;
}

.canvas-title-strip {
    background: transparent;
}

.canvas-main-title {
    color: #0f2a45 !important;
    text-shadow: 0 1px 3px rgba(255,255,255,0.6);
}

.canvas-controls-strip {
    background: rgba(236, 247, 255, 0.82);
    border-color: rgba(180, 210, 235, 0.6);
    box-shadow: 0 3px 12px rgba(20, 50, 85, 0.1);
    border-radius: 10px;
}

.canvas-service-title,
.editable-service-title {
    color: var(--app-ink-900) !important;
}

.auto-schedule-btn {
    border: 1px solid #b7cae0;
    background: linear-gradient(180deg, #f6faff 0%, #eaf3ff 100%);
    color: #234f7c;
    border-radius: 10px;
}

.auto-schedule-btn:hover {
    background: linear-gradient(180deg, #edf5ff 0%, #dfeeff 100%);
    border-color: #98b7da;
}

.canvas-area {
    background: #ffffff;
}

.info-panel,
.table-wrapper,
.employee-calendar-panel,
.ai-panel {
    border: 1px solid var(--app-line);
    border-radius: 14px;
    box-shadow: var(--app-shadow);
}

.table-wrapper,
.employee-calendar-panel {
    background: rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(9px);
}

.table-header,
.employee-calendar-header,
.ai-panel-head {
    background: rgba(249, 252, 255, 0.72);
    border-bottom: 1px solid rgba(216, 228, 242, 0.9);
}

.table-header.is-controls-detached {
    grid-template-columns: minmax(0, 1fr) auto;
}

.table-header-detached-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(216, 228, 242, 0.9);
    background: rgba(249, 252, 255, 0.72);
}

.table-header-detached-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(216, 228, 242, 0.9);
    background: rgba(249, 252, 255, 0.72);
}

.table-header-detached-controls .table-month-nav,
.table-header-detached-controls .table-actions {
    min-width: 0;
}

.table-header-detached-nav .table-month-nav {
    min-width: 0;
}

.table-wrapper.compact-main-table table.schedule {
    width: max-content;
    min-width: 0;
}

.month-setup-choice-card {
    width: min(760px, 100%);
    margin: 18px auto;
    padding: 18px;
    border: 1px solid #d2deea;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 34px rgba(20, 43, 72, 0.1);
}

.month-setup-choice-title {
    font-size: 17px;
    font-weight: 800;
    color: #27415f;
}

.month-setup-choice-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #5f7389;
}

.month-setup-choice-nav {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.month-setup-choice-nav .table-month-nav {
    margin: 0;
}

.month-setup-back-btn {
    height: 28px;
    border: 1px solid #b8cada;
    background: #f5f9ff;
    color: #2f4f70;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 0 10px;
    cursor: pointer;
}

.month-setup-back-btn:hover {
    border-color: #9cb5d5;
    background: #edf5ff;
}

.month-setup-choice-actions {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.month-setup-choice-btn {
    border: 1px solid #c4d3e2;
    border-radius: 10px;
    background: #f8fbff;
    color: #2b4764;
    text-align: left;
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: grid;
    gap: 3px;
}

.month-setup-choice-btn small {
    font-size: 11px;
    font-weight: 600;
    color: #5f7389;
}

.month-setup-choice-btn.copy:hover {
    border-color: #8fb1d1;
    background: #f0f7ff;
}

.month-setup-choice-btn.empty:hover {
    border-color: #98adc3;
    background: #f3f6fa;
}

table.schedule {
    font-size: 11px;
}

table.schedule th {
    background: #ffffff;
    color: #2c4866;
    border: 0;
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #d1d9e6;
    padding-top: 10px;
    padding-bottom: 10px;
}

table.schedule th:last-child {
    border-right: none;
}

table.schedule td {
    border: 0;
    border-right: 1px solid #d1d9e6;
    padding-top: 10px;
    padding-bottom: 10px;
}

table.schedule td:last-child {
    border-right: none;
}

table.schedule tbody td {
    border-bottom: 1px solid #f3f4f6;
}

.emp-load-pill span {
    color: #9ca3af;
    font-size: 10px;
    font-weight: 600;
}

table.schedule tbody tr:nth-child(odd) {
    background: #fbfdff;
}

table.schedule tbody tr.weekend,
table.schedule tbody tr.weekend td {
    background: #eef4fb;
}

table.schedule tbody tr.holiday,
table.schedule tbody tr.holiday td {
    background: #e7f0ff;
}

.employee-calendar-table th {
    background: #f5f9ff;
    color: #2c4866;
    border-color: #d9e5f2;
}

.employee-calendar-table td {
    border-color: #e2eaf3;
}

.employee-calendar-table tbody td {
    background: #fff;
}

.employee-calendar-table tbody tr:nth-child(odd) td {
    background: #fbfdff;
}

.employee-calendar-table tbody tr.weekend td {
    background: #eef4fb;
}

.employee-calendar-table tbody tr.holiday td {
    background: #e7f0ff;
}

.employee-calendar-table tbody tr.off-request td {
    background: #fff6e6;
}

.employee-calendar-table tbody tr.leave td {
    background: #f0fff4;
}

.day-label {
    color: #2b4866;
    flex-shrink: 0;
    width: 68px;
    max-width: 68px;
}

.slot-header-name {
    color: #2b4663;
}

.home-card,
.project-card-btn {
    border-color: #d7e4f2;
}

.home-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.project-card-btn {
    background: rgba(255, 255, 255, 0.78);
}

.project-card-btn:hover {
    background: #ffffff;
}

.modal-card {
    border: 1px solid #d8e4f1;
    box-shadow: 0 22px 60px rgba(23, 48, 79, 0.18);
}

@media (max-width: 1200px) {
    .left-panel {
        width: 236px;
        min-width: 236px;
        flex-basis: 236px;
    }

    .ai-panel {
        width: min(350px, calc(100vw - 22px));
        height: min(560px, calc(100vh - 88px));
        max-height: calc(100vh - 88px);
        right: 14px;
        bottom: 14px;
    }
}

@media (max-width: 980px) {
    .main-layout {
        height: 100vh;
    }

    .canvas-top-header {
        height: auto;
        min-height: 52px;
        padding: 8px 10px;
        align-items: flex-start;
    }

    .left-panel {
        width: 220px;
        min-width: 220px;
        flex-basis: 220px;
    }

    .canvas-workspace {
        flex-wrap: nowrap;
    }

    .main-content {
        min-height: 60vh;
        flex: 1 1 auto;
        min-width: 0;
    }

    .ai-panel {
        width: min(335px, calc(100vw - 18px));
        height: min(520px, calc(100vh - 84px));
        max-height: calc(100vh - 84px);
        right: 10px;
        bottom: 10px;
    }

    .day-person-card {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 12px;
    }

    .day-person-table-wrap {
        max-height: calc(100vh - 200px);
    }
}

@media (max-width: 760px) {
    .ai-panel {
        width: calc(100vw - 12px);
        height: min(68vh, 470px);
        max-height: min(68vh, 470px);
        right: 6px;
        bottom: 6px;
        border-radius: 14px;
    }

    .left-panel {
        width: 200px;
        min-width: 200px;
        flex-basis: 200px;
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(30, 40, 55, 0.93);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    pointer-events: none;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-fade-enter-active,
.toast-fade-leave-active {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-fade-enter-from,
.toast-fade-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
}

/* ===== Setup Wizard ===== */
.wizard-screen {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: #f6f8fc;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
}

.wizard-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.wizard-header {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    position: relative;
}

.wizard-header-back {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid #d1d5db;
    cursor: pointer;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 12px 5px 9px;
    border-radius: 8px;
    transition: background .14s, border-color .14s, color .14s;
    line-height: 1;
}
.wizard-header-back:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}
.wizard-header-back svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.wizard-header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    pointer-events: none;
}

.wizard-header-spacer {
    flex: 1;
}



.wizard-card {
    background: #fff;
    border: 1px solid #d9e1ef;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wizard-card--personnel {
    max-width: 600px;
}

.wizard-step-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.wizard-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.wizard-desc {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
}

.wizard-emp-count {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 5px 10px;
}

.wizard-input {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    color: #1e293b;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}

.wizard-input:focus {
    border-color: #2563eb;
}

.wizard-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}

.wizard-btn.primary {
    background: #2563eb;
    color: #fff;
}

.wizard-btn.primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.wizard-btn.primary:disabled {
    opacity: .45;
    cursor: default;
}

.wizard-btn.secondary {
    background: #e2e8f0;
    color: #334155;
}

.wizard-btn.secondary:hover {
    background: #cbd5e1;
}

.wizard-btn.outline {
    background: none;
    border: 1px solid #d1d5db;
    color: #374151;
}

.wizard-btn.outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.wizard-emp-add-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.wizard-emp-input {
    flex: 1;
}

.wizard-emp-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 260px;
    overflow-y: auto;
    padding-right: 2px;
}

.wizard-emp-empty {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 12px 0;
}

.wizard-emp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
}

.wizard-emp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wizard-emp-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.wizard-emp-type {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
}

.wizard-emp-remove {
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 2px;
    transition: color .15s;
}

.wizard-emp-remove:hover {
    color: #dc2626;
}

.wizard-emp-list--compact {
    height: 120px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    align-content: start;
    gap: 6px;
    margin-top: 2px;
}

.wizard-emp-list--compact .wizard-emp-empty {
    grid-column: 1 / -1;
}

.wizard-emp-row--compact {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 7px;
    background: rgba(248, 250, 252, 0.7);
    border: 1px solid rgba(203, 213, 225, 0.75);
    padding: 5px 8px;
    border-radius: 999px;
    min-height: 30px;
}

.wizard-emp-name--compact {
    font-size: 12px;
    font-weight: 500;
    color: rgba(30, 41, 59, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-emp-row--compact .wizard-emp-type {
    font-size: 10px;
    padding: 1px 5px;
    color: rgba(71, 85, 105, 0.85);
    background: rgba(226, 232, 240, 0.65);
}

.wizard-emp-row--compact .wizard-emp-remove {
    font-size: 14px;
    color: rgba(148, 163, 184, 0.8);
    justify-self: end;
}

.wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.wizard-emp-total-label {
    flex-basis: 100%;
    text-align: right;
    font-size: 11px;
    font-weight: 500;
    color: rgba(71, 85, 105, 0.7);
    margin-bottom: 2px;
}
