/* ========== FULL WIDTH ========== */
.container {
    max-width: none;
    width: 100%;
}

/* ========== FILTERS ========== */

.manager-filter-group {
    min-width: 160px;
}

/* ========== STATUS TABS ROW ========== */
.status-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-tab {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    height: 32px;
    padding: 0 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.status-tab:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.15);
}
.status-tab.active {
    background: white;
    border-color: white;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.status-tab .count {
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 14px;
}
.status-tab.active .count {
    background: var(--primary);
    color: white;
}

/* ========== TABLE ========== */
.table-wrapper {
    margin: 0 28px 20px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-container {
    flex: 1;
    overflow: auto;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.table-container::-webkit-scrollbar { width: 8px; height: 8px; }
.table-container::-webkit-scrollbar-track { background: #f1f5f9; margin-top: 46px; }
.table-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    min-width: 1000px;
}

th {
    position: sticky;
    top: 0;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 10px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    z-index: 10;
    cursor: pointer;
    user-select: none;
    white-space: normal;
    word-break: keep-all;
    text-align: center;
    vertical-align: middle;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}

th:hover {
    background: var(--primary-dark);
}

th.sorted-asc {
    background: var(--primary-dark);
}

th.sorted-asc::after {
    content: "\f0dd";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
}

th.sorted-desc {
    background: var(--primary-dark);
}

th.sorted-desc::after {
    content: "\f0de";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    white-space: nowrap;
    color: #1e293b;
    font-size: 0.82rem;
    transition: background 0.15s;
}

tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

tbody tr:nth-child(odd) {
    background-color: #fff;
}

tbody tr:hover td {
    background: rgba(var(--primary-rgb),0.06) !important;
}

tbody tr {
    cursor: pointer;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    gap: 6px;
}

.status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-unpaid {
    background: #fce4ec;
    color: #b71c1c;
}
.status-waiting {
    background: #fef9c3;
    color: #854d0e;
}

/* Shop badges by tt_type */
.shop-badge-mm { background: #b6d7a8 !important; color: #2d5016 !important; }
.shop-badge-mk { background: #ff1b9d !important; color: #fff !important; }
.shop-badge-gm { background: #a4c2f4 !important; color: #1a3a6b !important; }

/* Payment badges (use .status-badge shape) */
.pay-jf { background: #2563eb !important; color: #fff !important; }
.pay-card { background: #7c3aed !important; color: #fff !important; }
.pay-gph { background: #059669 !important; color: #fff !important; }
.pay-cash { background: #d97706 !important; color: #fff !important; }
.pay-self { background: #0891b2 !important; color: #fff !important; }

/* Comment badges (use .status-badge shape) */
.comment-cc { background: #d4e3fd !important; color: #1155cc !important; }
.comment-red { background: #fce4ec !important; color: var(--primary) !important; }
.comment-orange { background: #feedd2 !important; color: #b76e1e !important; }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-window {
    background: #f0f2f5;
    border-radius: 16px;
    max-width: 1100px;
    width: 96vw;
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 100px rgba(0,0,0,0.4);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    flex-shrink: 0;
}
.modal-header h3 {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
}
.modal-header button {
    background: rgba(255,255,255,0.12);
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}
.modal-header button:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}
.modal-content {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1;
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: #f1f5f9; }
.modal-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ========== MODERN FORM STYLES (ms- prefix) ========== */

/* Employee section */
.ms-employee-section {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf0;
}
.ms-row-2 {
    display: flex;
    gap: 10px;
}
.ms-field-wide { flex: 2; min-width: 0; }
.ms-field-mgr { flex: 1.2; min-width: 0; }

.ms-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ms-label i { font-size: 0.75rem; }

.ms-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fafbfc;
    transition: all 0.2s;
    box-sizing: border-box;
    font-weight: 500;
    color: #1e293b;
    font-family: inherit;
}
.ms-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.12);
    background: white;
}
.ms-input::placeholder { color: #b0bccd; }
select.ms-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.employee-badge {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #1d4ed8;
    font-weight: 500;
    flex-wrap: wrap;
}
.employee-badge i { font-size: 0.78rem; }
.badge-sep {
    width: 1px;
    height: 14px;
    background: #93c5fd;
}

/* Shift cards */
.ms-card {
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border: 1px solid #e8ecf0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.ms-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.ms-card-header {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: #f8f9fb;
    border-bottom: 1px solid #eef0f3;
}
.ms-card-title {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ms-card-title i { color: var(--primary); font-size: 0.9rem; }
.ms-card-remove {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
}
.ms-card-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}
.ms-card-body {
    padding: 10px 14px;
}

.ms-row-4 {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.ms-row-4 .ms-field { flex: 1.2; min-width: 0; }
.ms-row-4 .ms-field-shop { flex: 2.5; }
.ms-row-4 .ms-field-pos { flex: 1.8; }
.ms-row-4 .ms-field-tariff { flex: 0.6; max-width: 70px; }

.ms-tariff-display {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    box-sizing: border-box;
}

.ms-row-pay {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.ms-field-pay { flex: 1; min-width: 0; }
.ms-field-hours { flex: 0 0 70px; }
.ms-pay-warn { margin-top: 6px; font-size: 0.72rem; color: #dc2626; display: flex; align-items: center; gap: 4px; }
.ms-pay-warn i { font-size: 0.75rem; }

.ms-pay-group {
    display: flex;
    gap: 5px;
}
.ms-pay-btn {
    flex: 1;
    height: 30px;
    padding: 0 4px;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    background: #fafbfc;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: #475569;
    white-space: nowrap;
    font-family: inherit;
}
.ms-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.ms-pay-btn.active {
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Calc strip */
.ms-calc-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 5px 10px;
    background: #fefce8;
    border-radius: 10px;
    border: 1.5px solid #eab308;
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 600;
}
.ms-calc-strip strong {
    color: #854d0e;
    font-weight: 800;
    font-size: 0.82rem;
}
.ms-calc-sep {
    width: 1px;
    height: 18px;
    background: #fde68a;
}

/* Bottom row (comment + bonus) */
.ms-row-bottom {
    display: flex;
    gap: 8px;
}
.ms-field-comment { flex: 1; min-width: 0; }
.ms-field-bonus { flex: 0 0 auto; }

.ms-comment-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ms-comment-row .ms-input {
    height: 34px;
    font-size: 0.8rem;
}

.ms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.ms-chip {
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.ms-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff0f0;
}

.ms-bonus-row {
    display: flex;
    gap: 4px;
    align-items: center;
}
.ms-bonus-btn, .ms-fine-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    color: #475569;
}
.ms-bonus-btn:hover { border-color: #86efac; background: #f0fdf4; color: #166534; }
.ms-bonus-btn.active { background: #22c55e; color: white; border-color: #22c55e; }
.ms-fine-btn:hover { border-color: #f9a8d4; background: #fff1f2; color: #b71c1c; }
.ms-fine-btn.active { background: #ef4444; color: white; border-color: #ef4444; }

.ms-bonus-input {
    width: 70px;
    height: 32px;
    padding: 0 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
    background: #fafbfc;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.ms-bonus-input.show { display: block; }
.ms-bonus-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.12); }
.ms-bonus-input.bonus-mode { border-color: #86efac; background: #f0fdf4; }
.ms-bonus-input.fine-mode { border-color: #f9a8d4; background: #fff1f2; }

/* Add card button */
.ms-add-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 2px dashed #d0d5db;
    border-radius: 10px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}
.ms-add-card-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb),0.04);
    transform: translateY(-1px);
}
.ms-add-card-btn i { font-size: 1.1rem; }

/* Summary */
.ms-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fefce8 0%, #fff7ed 100%);
    border-radius: 10px;
    border: 1.5px solid #fcd34d;
    font-size: 0.82rem;
    color: #92400e;
    font-weight: 600;
    margin-bottom: 8px;
}
.ms-summary strong { color: #78350f; font-weight: 800; }
.ms-summary i { color: #d97706; }

/* Save button */
.ms-save-btn {
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.25);
    letter-spacing: 0.3px;
    font-family: inherit;
}
.ms-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(var(--primary-rgb),0.35);
}
.ms-save-btn:active {
    transform: translateY(0);
}
.ms-save-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.ms-form-error {
    color: #ef4444;
    margin-top: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ========== AUTOCOMPLETE (shared) ========== */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-top: 3px;
    max-height: 160px;
    overflow-y: auto;
    position: absolute;
    z-index: 10001;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    display: none;
    min-width: 220px;
    left: 0; right: 0;
}
.autocomplete-item {
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #1e293b;
    background: white;
    transition: all 0.1s;
}
.autocomplete-item:hover {
    background: #fef2f2;
    color: var(--primary);
    padding-left: 18px;
}
.autocomplete-item:last-child { border-bottom: none; }
/* ========== SECTION HEADERS INSIDE CARD ========== */
.ms-section-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid #f0f2f5;
}
.ms-section-label i { font-size: 0.7rem; }

/* ========== MANAGER FIELD WITH PENCIL ========== */
.manager-field-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}
.manager-field-wrap .form-control { flex: 1; }
.manager-pencil {
    background: rgba(0,0,0,0.04);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 7px 9px;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
}
.manager-pencil:hover { color: var(--primary); background: rgba(var(--primary-rgb),0.1); }
.manager-pencil.active { color: var(--primary); background: rgba(var(--primary-rgb),0.12); }

/* ========== CALC SEPARATOR (shared) ========== */
.calc-sep {
    width: 1px;
    height: 16px;
    background: #dce0e6;
}
.btn-bonus, .btn-fine {
    border: none;
    border-radius: 10px;
    padding: 0 14px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 40px;
    box-sizing: border-box;
}
.btn-bonus { background: #dcfce7; color: #166534; border: 1.5px solid #86efac; }
.btn-bonus:hover { background: #bbf7d0; border-color: #22c55e; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(34,197,94,0.2); }
.btn-bonus.active { background: #22c55e; color: white; border-color: #22c55e; box-shadow: 0 2px 8px rgba(34,197,94,0.3); }

.btn-fine { background: #fce4ec; color: #b71c1c; border: 1.5px solid #f9a8d4; }
.btn-fine:hover { background: #fbc8d5; border-color: #f43f5e; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(244,63,94,0.2); }
.btn-fine.active { background: #ef4444; color: white; border-color: #ef4444; box-shadow: 0 2px 8px rgba(239,68,68,0.3); }

.bonus-row .bonus-input {
    width: 100px;
    padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    background: #fafbfc;
    height: 40px;
    box-sizing: border-box;
    transition: all 0.2s;
}
.bonus-input.show { display: block; }
.bonus-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.12); }
.bonus-input.bonus-mode { border-color: #86efac; background: #f0fdf4; }
.bonus-input.fine-mode { border-color: #f9a8d4; background: #fff1f2; }

/* ========== CALC DISPLAY ROW (Обед / К зачету / Вид оплаты) ========== */
.calc-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 14px;
    border: 1px solid #e8ecf0;
    min-height: 38px;
}
.calc-inline .calc-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.calc-inline .calc-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}
.calc-inline .calc-block {
    display: flex;
    align-items: center;
    gap: 5px;
}
.calc-inline .sep {
    width: 1px;
    height: 22px;
    background: #dce0e6;
}

/* ========== QUICK ACTION CHIPS ========== */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fafbfc;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff0f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb),0.1);
}
.chip:active {
    transform: translateY(0);
}

/* ========== + ADD SHIFT BUTTON ========== */
.btn-add-more {
    width: 100%;
    padding: 10px;
    border: 2px dashed #d0d5db;
    border-radius: 12px;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    letter-spacing: 0.3px;
}
.btn-add-more:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb),0.04);
    transform: translateY(-1px);
}
.btn-add-more:active {
    transform: translateY(0);
}

/* ========== SAVE BUTTON ========== */
#addContent .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    margin-top: 10px;
    width: 100%;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.25);
}
#addContent .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(var(--primary-rgb),0.35);
}
#addContent .btn-primary:active {
    transform: translateY(0);
}

/* ========== AUTOCOMPLETE ========== */

/* ========== MODERN DETAIL SIDEBAR ========== */

.ds-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 3px 14px rgba(var(--primary-rgb),0.2);
}
.ds-hero-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.ds-hero-info { flex: 1; min-width: 0; }
.ds-hero-info h2 {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    margin: 0 0 3px 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ds-hero-info .ds-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
}

.ds-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.ds-status-badge.paid {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
}
.ds-status-badge.unpaid {
    background: rgba(255,200,200,0.25);
    color: #ffe0e0;
    border: 1px solid rgba(255,200,200,0.3);
}
.ds-status-badge.waiting {
    background: rgba(255,220,100,0.25);
    color: #fef9c3;
    border: 1px solid rgba(255,220,100,0.3);
}

.ds-section {
    margin-bottom: 10px;
}
.ds-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ds-section-title i {
    font-size: 0.65rem;
    color: #94a3b8;
}

.ds-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid #e8ecf0;
    overflow: hidden;
}
.ds-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid #f0f2f5;
    gap: 10px;
    transition: background 0.15s;
}
.ds-row:hover { background: #f9fafb; }
.ds-row:last-child { border-bottom: none; }
.ds-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    min-width: 70px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ds-label i {
    font-size: 0.65rem;
    color: #94a3b8;
    width: 14px;
}
.ds-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    word-break: break-word;
    flex: 1;
}
.ds-value.muted { color: #64748b; font-weight: 600; }
.ds-value.amount {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 800;
}
.ds-value .ds-amount-big {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
}

.ds-comment-text {
    font-size: 0.8rem;
    color: #0f172a;
    text-align: right;
    flex: 1;
    word-break: break-word;
    font-weight: 600;
    line-height: 1.4;
}
.ds-comment-text.empty { color: #94a3b8; font-style: italic; font-weight: 400; }

.ds-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ds-btn {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}
.ds-btn-edit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.25);
}
.ds-btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(var(--primary-rgb),0.35);
}
.ds-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1.5px solid #fecaca;
}
.ds-btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}
.ds-audit-row {
    padding: 7px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5;
}
.ds-audit-row:last-child { border-bottom: none; }
.ds-audit-label {
    font-size: 0.67rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ds-audit-value {
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 120px;
}

#addContent .form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.88rem;
    background: #fafbfc;
    transition: all 0.2s;
    box-sizing: border-box;
    font-weight: 500;
    color: #1e293b;
    height: 40px;
}

#addContent .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.12);
    background: white;
}

#addContent .form-control[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
    border-color: #f1f5f9;
}

#addContent .form-control::placeholder {
    color: #b0bccd;
}

#addContent select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
    background-color: #fafbfc;
}

#addContent textarea.form-control {
    resize: vertical;
    min-height: 52px;
    line-height: 1.5;
}

/* ========== SUM DISPLAY ========== */
.sum-display {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    box-sizing: border-box;
}

#addContent .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    margin-top: 6px;
    width: 100%;
}

/* ========== NOTIFICATION ========== */
#exportNotification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    z-index: 2001;
    background: #22c55e;
    box-shadow: 0 8px 24px rgba(34,197,94,0.3);
    min-width: 280px;
    max-width: 420px;
    animation: notificationSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.15);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#exportNotification.show {
    transform: translateX(0);
    opacity: 1;
}

#exportNotification.error {
    background: #ef4444;
    box-shadow: 0 8px 24px rgba(239,68,68,0.3);
}

#exportNotification.warning {
    background: #f59e0b;
    box-shadow: 0 8px 24px rgba(245,158,11,0.3);
}

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

/* ========== TABLE LOADER ========== */
.table-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    gap: 20px;
}

.table-loader .spinner {
    width: 70px;
    height: 70px;
    border: 6px solid #f3f4f6;
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.table-loader span {
    font-size: 1.2rem;
    color: #1e293b;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== PAGINATION ========== */
.pagination {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 300;
    display: flex;
    justify-content: flex-end;
}

.pagination-inner {
    display: flex;
    align-items: center;
    gap: 3px;
    background: white;
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    font-size: 12px;
}

.pagination-inner button {
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
    color: #475569;
    min-width: 28px;
    text-align: center;
    line-height: 1.3;
}

.pagination-inner button:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.pagination-inner button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}

.pagination-inner button:disabled {
    opacity: 0.3;
    cursor: default;
    background: transparent;
}

.pagination-inner .page-dots {
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 0 1px;
}

.pagination-inner .page-info {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin: 0 2px;
    white-space: nowrap;
}

.pagination-inner .page-size-select {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    padding-left: 6px;
    border-left: 1px solid #e2e8f0;
    font-size: 11px;
    color: #94a3b8;
}

.pagination-inner .page-size-select i {
    font-size: 10px;
}

.pagination-inner .page-size-select select {
    padding: 2px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 11px;
    background: white;
    cursor: pointer;
    color: #1e293b;
    font-weight: 500;
}

.pagination-inner .page-size-select select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== ADD SHIFT MODAL TWO-COLUMN LAYOUT ========== */
.add-shift-layout {
    display: flex;
    gap: 16px;
    flex: 1;
    overflow: hidden;
}
.add-shift-form {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}
.add-shift-history {
    width: 280px;
    flex-shrink: 0;
    overflow-y: auto;
    border-left: 1px solid #e2e8f0;
    padding-left: 16px;
}
.add-shift-history-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.add-shift-history-title i {
    font-size: 0.65rem;
    color: #94a3b8;
}
.history-card {
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e8ecf0;
    padding: 10px 12px;
    margin-bottom: 7px;
    transition: box-shadow 0.15s;
}
.history-card:last-child {
    margin-bottom: 0;
}
.history-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.history-card-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
}
.history-card-hours {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 6px;
}
.history-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.history-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #475569;
}
.history-card-row i {
    width: 14px;
    font-size: 0.65rem;
    color: #94a3b8;
    text-align: center;
}
.history-empty {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    padding: 24px 0;
    font-style: italic;
}
.history-loading {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    padding: 24px 0;
}

/* Card payment fields (Карта) */
.ms-card-payment {
    margin-bottom: 6px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ms-card-payment.hidden { display: none; }
.ms-row-card {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.ms-row-card:last-of-type { margin-bottom: 0; }
.ms-row-card .ms-field { flex: 1; min-width: 0; }
.ms-card-payment-hint {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
    font-style: italic;
}
