﻿    background:#eef5ff;
    border:1px solid #d9e6fb;
    border-radius:16px;
    padding:12px;
    width:100%;
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    box-sizing:border-box;
    transition:opacity 0.18s ease, transform 0.22s ease, width 0.22s ease, padding 0.22s ease;
}

.drawer-side-shell.collapsed .timeline-card{
    opacity:0;
    pointer-events:none;
    width:0;
    min-width:0;
    padding:0;
    border-width:0;
    overflow:hidden;
    transform:translateX(16px);
}

.timeline-rail-toggle{
    width:8px;
    min-width:8px;
    padding:0;
    min-height:240px;
    align-self:center;
    border:1px solid #d4deef;
    border-right:none;
    border-radius:8px 0 0 8px;
    background:#edf4ff;
    color:#94a3b8;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow:none;
}

.timeline-rail-toggle:hover{
    background:#e6efff;
}

.timeline-rail-toggle.collapsed{
    background:#e3edff;
}

.timeline-rail-toggle-arrow{
    font-size:11px;
    line-height:1;
}

.timeline-switch{
    display:flex;
    gap:8px;
    margin-bottom:14px;
    flex-shrink:0;
}

.timeline-switch button{
    flex:1 1 0;
    padding:6px 12px;
    font-size:12px;
    background:white;
    color:#475467;
    border:1px solid #cfdcf3;
}

.timeline-switch button.active{
    background:#e0e0e0;
    color:#344054;
    border-color:#d9d9d9;
}

.timeline-content{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:auto;
    padding-right:4px;
    overscroll-behavior:contain;
}

.timeline-empty{
    flex:1 1 auto;
    color:#667085;
    font-size:14px;
    line-height:1.45;
    background:rgba(255,255,255,0.72);
    border:1px dashed #c8d8f2;
    border-radius:12px;
    padding:14px;
}

.timeline-list{
    flex:1 1 auto;
    display:grid;
    gap:12px;
    align-content:start;
    position:relative;
    padding-left:28px;
}

.timeline-list::before{
    content:"";
    position:absolute;
    top:4px;
    bottom:4px;
    left:11px;
    width:2px;
    background:linear-gradient(180deg, #bcd2fb 0%, #a9c5fb 100%);
    border-radius:999px;
}

.timeline-date{
    font-size:12px;
    font-weight:700;
    color:#475467;
    text-transform:uppercase;
    letter-spacing:0.02em;
    text-align:center;
    margin:2px 0 4px;
}

.timeline-item{
    position:relative;
    background:transparent;
    border:none;
    border-radius:14px;
    padding:10px 12px 12px 14px;
    border-bottom:none;
    margin-left:6px;
}

.timeline-item::after{
    content:"";
    position:absolute;
    left:-12px;
    top:16px;
    width:12px;
    height:2px;
    background:#bcd2fb;
    border-radius:999px;
}

.timeline-item-marker{
    position:absolute;
    left:-27px;
    top:8px;
    width:24px;
    height:24px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:700;
    border:2px solid #fff;
    box-shadow:0 4px 10px rgba(15,23,42,0.08);
}

.timeline-item-created{
    background:rgba(59,130,246,0.08);
}

.timeline-item-status{
    background:rgba(16,185,129,0.10);
}

.timeline-item-service{
    background:rgba(245,158,11,0.10);
}

.timeline-item-payment{
    background:rgba(168,85,247,0.10);
}

.timeline-item-comment{
    background:rgba(250,204,21,0.16);
}

.timeline-item-event{
    background:rgba(148,163,184,0.08);
}

.timeline-marker-created{
    background:#3b82f6;
    color:#fff;
}

.timeline-marker-status{
    background:#10b981;
    color:#fff;
}

.timeline-marker-service{
    background:#f59e0b;
    color:#fff;
}

.timeline-marker-payment{
    background:#a855f7;
    color:#fff;
}

.timeline-marker-comment{
    background:#facc15;
    color:#7c5a00;
}

.timeline-marker-event{
    background:#94a3b8;
    color:#fff;
}

.timeline-item-row{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:start;
    gap:12px;
}

.timeline-item-body{
    min-width:0;
}

.timeline-badge{
    display:inline-block;
    margin-bottom:8px;
    padding:4px 8px;
    border-radius:999px;
    background:var(--blue);
    color:white;
    font-size:11px;
    font-weight:700;
}

.timeline-item-title{
    font-size:14px;
    font-weight:700;
    color:#182230;
    margin-bottom:4px;
}

.timeline-item-text{
    font-size:13px;
    color:#475467;
    line-height:1.45;
    white-space:normal;
    word-break:break-word;
}

.timeline-item-text-strong{
    font-weight:700;
    color:#182230;
}

.timeline-item-author{
    font-size:12px;
    font-weight:700;
    color:#344054;
    margin-bottom:4px;
}

.timeline-item-time{
    font-size:12px;
    color:#98a2b3;
    flex:0 0 auto;
    text-align:right;
    white-space:nowrap;
    align-self:start;
}

.timeline-compose{
    margin-top:auto;
    flex-shrink:0;
    padding-top:14px;
    border-top:1px solid #d7e3f5;
}

.timeline-compose-row{
    display:flex;
    align-items:flex-start;
    gap:8px;
}

.timeline-compose-actions{
    position:relative;
    flex:0 0 auto;
}

.timeline-compose-toggle{
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px;
    padding:0;
    border:1px solid #d9e2f1;
    border-radius:10px;
    background:#fff;
    color:#344054;
    font-size:22px;
    line-height:1;
}

.timeline-compose-toggle:hover{
    background:#f8fbff;
}

.timeline-compose-toggle.active{
    background:#e0e0e0;
    border-color:#d9d9d9;
}

.timeline-compose-menu{
    position:absolute;
    left:0;
    bottom:calc(100% + 8px);
    min-width:170px;
    background:#fff;
    border:1px solid #d9e2f1;
    border-radius:10px;
    box-shadow:0 14px 36px rgba(15,23,42,0.14);
    padding:6px;
    display:none;
    z-index:20;
}

.timeline-compose-menu.show{
    display:block;
}

.timeline-compose-menu-item{
    width:100%;
    min-height:36px;
    padding:8px 10px;
    border:none;
    border-radius:8px;
    background:transparent;
    color:#344054;
    font-size:14px;
    text-align:left;
}

.timeline-compose-menu-item:hover{
    background:#f8fbff;
}

.timeline-compose textarea{
    flex:1 1 auto;
    min-height:40px;
    height:40px;
    background:white;
    overflow:hidden;
    resize:none;
}

.timeline-compose-hint{
    margin-top:8px;
    font-size:12px;
    color:#667085;
    line-height:1.4;
}

.crm-toast-container{
    position:fixed;
    top:18px;
    right:18px;
    z-index:5000;
    width:min(380px, calc(100vw - 24px));
    display:grid;
    gap:10px;
    pointer-events:none;
}

.crm-toast{
    position:relative;
    background:white;
    border:1px solid #d9e2f1;
    box-shadow:0 16px 40px rgba(15,23,42,0.18);
    border-radius:14px;
    padding:14px 42px 14px 14px;
    animation:toast-in 0.18s ease;
    pointer-events:auto;
}

.crm-toast.success{
    border-color:#bbf7d0;
    background:#f0fdf4;
}

.crm-toast.error{
    border-color:#fecaca;
    background:#fef2f2;
}

.crm-toast.info{
    border-color:#dbeafe;
    background:#eff6ff;
}

.crm-toast-title{
    font-size:13px;
    font-weight:700;
    margin-bottom:4px;
}

.crm-toast-text{
    font-size:13px;
    line-height:1.45;
    color:#344054;
    white-space:pre-line;
    word-break:break-word;
}

.crm-toast-close{
    position:absolute;
    top:8px;
    right:8px;
    width:28px;
    height:28px;
    padding:0;
    border-radius:8px;
    background:transparent;
    color:#667085;
    border:none;
    font-size:16px;
}

.crm-toast-close:hover{
    background:rgba(15,23,42,0.06);
}

.crm-modal-root{
    position:fixed;
    inset:0;
    z-index:4000;
    pointer-events:none;
    overflow-y:auto;
    padding:24px 0;
}

.crm-modal-root.show{
    pointer-events:auto;
}

.crm-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,0.36);
    backdrop-filter:blur(2px);
}

.crm-modal{
    position:absolute;
    top:24px;
    left:50%;
    transform:translateX(-50%);
    width:min(480px, calc(100vw - 24px));
    max-height:calc(100vh - 48px);
    background:white;
    border:1px solid #d9e2f1;
    box-shadow:0 24px 60px rgba(15,23,42,0.24);
    border-radius:18px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.crm-modal-head{
    padding:18px 20px 10px;
    border-bottom:1px solid #edf2f7;
}

.crm-modal-title{
    margin:0;
    font-size:20px;
}

.crm-modal-body{
    padding:16px 20px;
    font-size:14px;
    line-height:1.55;
    color:#475467;
    white-space:pre-line;
    word-break:break-word;
    overflow:auto;
}

.crm-modal-footer{
    padding:14px 20px 20px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.crm-prompt-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.crm-prompt-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}

.crm-prompt-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.crm-modal-body:has(.crm-prompt-input) {
    white-space: normal;
}

.profile-shell{
    max-width:760px;
    margin:0 auto;
    display:grid;
    gap:18px;
}

.profile-card{
    background:white;
    border:1px solid var(--line);
    border-radius:18px;
    padding:24px;
    box-shadow:0 1px 0 rgba(16,24,40,0.02);
}

.profile-card h2,
.profile-card h3{
    margin:0 0 16px;
}

.profile-card h2{
    font-size:28px;
}

.profile-card h3{
    font-size:20px;
}

.profile-subtitle{
    margin:-8px 0 18px;
    color:var(--muted);
    font-size:14px;
}

.profile-grid{
    display:grid;
    gap:14px;
}

.profile-actions{
    display:grid;
    gap:12px;
}

.profile-action-btn{
    width:100%;
    justify-content:center;
}

.profile-action-btn.warning{
    background:#fff7ed;
    color:#c2410c;
    border:1px solid #fdba74;
}

.profile-action-btn.warning:hover{
    background:#ffedd5;
}

.profile-meta-card{
    background:#f8fbff;
    border:1px solid #d9e6fb;
    border-radius:14px;
    padding:14px 16px;
    display:grid;
    gap:6px;
}

.profile-meta-label{
    font-size:12px;
    font-weight:700;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:0.04em;
}

.profile-meta-value{
    font-size:15px;
    font-weight:700;
    color:var(--text);
}

.profile-top-note{
    color:var(--muted);
    font-size:14px;
    margin-top:-8px;
}

.onboarding-shell{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:32px 16px;
    background:var(--bg);
}

.onboarding-card{
    width:min(760px, 100%);
    background:white;
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:0 12px 32px rgba(16,24,40,0.10);
    overflow:hidden;
}

.onboarding-head{
    padding:28px 28px 18px;
    border-bottom:1px solid var(--line);
}

.onboarding-step-badge{
    display:inline-block;
    padding:6px 10px;
    border-radius:999px;
    background:var(--blue-soft);
    color:var(--blue);
    font-size:12px;
    font-weight:700;
    margin-bottom:14px;
}

.onboarding-title{
    margin:0 0 8px;
    font-size:30px;
    line-height:1.15;
}

.onboarding-subtitle{
    margin:0;
    color:var(--muted);
    font-size:14px;
    line-height:1.5;
}

.onboarding-body{
    padding:24px 28px 28px;
}

.onboarding-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 16px;
}

.onboarding-grid .field.full{
    grid-column:1 / -1;
}

.onboarding-actions{
    margin-top:22px;
    display:flex;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    align-items:center;
}

.onboarding-note{
    color:var(--muted);
    font-size:13px;
}

@media (max-width: 760px){
    .onboarding-head,
    .onboarding-body{
        padding:20px;
    }

    .onboarding-grid{
        grid-template-columns:1fr;
    }
}

@keyframes toast-in{
    from{
        opacity:0;
        transform:translateY(-8px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media (max-width: 1450px){
    .repair-drawer{
        width:min(1240px, calc(100vw - 30px));
    }

    .drawer-shell{
        grid-template-columns:minmax(0, 1fr) 300px;
    }
}

@media (max-width: 1200px){
    .repair-drawer{
        width:min(1120px, calc(100vw - 16px));
    }

    .drawer-shell{
        grid-template-columns:1fr;
        grid-template-rows:auto minmax(0, auto) auto;
    }

    .drawer-shell.timeline-rail-collapsed{
        grid-template-columns:1fr;
    }

    .drawer-side-shell{
        padding:0 14px 12px 14px;
    }

    .drawer-side-shell.collapsed{
        padding:0 14px 12px 14px;
    }

    .timeline-card{
        height:auto;
        min-height:420px;
    }

    .drawer-side-shell.collapsed .timeline-card{
        opacity:1;
        pointer-events:auto;
        width:100%;
        padding:12px;
        border-width:1px;
        overflow:visible;
        transform:none;
    }
}

@media (max-width: 1100px){
    .sidebar{
        position:static;
        width:100%;
        height:auto;
    }

    .main{
        margin-left:0;
        width:auto;
    }

    .sidebar-submenu{
        position:static;
        width:100%;
        height:auto;
        left:auto;
        transform:none;
        opacity:1;
        pointer-events:auto;
        display:none;
        box-shadow:none;
        border-left:none;
        border-top:1px solid rgba(255,255,255,0.06);
    }

    .sidebar-submenu.show{
        display:block;
    }

    .sidebar-submenu-body{
        height:auto;
        overflow:visible;
        padding-right:0;
    }

    body.settings-panel-open .main{
        margin-left:0;
        width:auto;
    }

    .repair-drawer{
        width:100vw;
    }

    .topbar{
        flex-direction:column;
        align-items:stretch;
    }

    #userPanel{
        width:100%;
        justify-content:flex-start;
    }

    .user-menu-trigger{
        width:100%;
    }

    .user-dropdown{
        width:min(320px, 100%);
        left:0;
        right:auto;
    }

    .employee-summary-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .location-summary-row,
    .location-form-grid,
    .location-card-line{
        grid-template-columns:1fr;
    }

    .employee-form-grid{
        grid-template-columns:1fr;
    }

    .employee-check-grid{
        grid-template-columns:1fr;
    }

    .employee-history-item,
    .employee-history-head,
    .employee-directory-head,
    .location-card-head{
        flex-direction:column;
        align-items:flex-start;
    }

    .drawer-grid,
    .meta-row{
        grid-template-columns:1fr;
    }

    .drawer-header-top{
        flex-wrap:wrap;
    }

    .drawer-header-actions{
        width:100%;
        justify-content:flex-start;
        margin-left:0;
    }

    .drawer-status-select{
        flex:1 1 auto;
        max-width:none;
    }

    .drawer-header-side{
        width:100%;
        align-items:flex-start;
    }

    .drawer-header-tool-row{
        width:100%;
        justify-content:flex-start;
    }

    .inline-pair{
        grid-template-columns:1fr;
        gap:8px;
    }

    .documents-grid{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width: 650px){
    .documents-grid{
        grid-template-columns:1fr;
    }

    .profile-card{
        padding:18px;
    }

    .profile-card h2{
        font-size:24px;
    }
}
