/* =========================================================
   CRM Фотографа — единый файл стилей
   ========================================================= */

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

body {
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f0f2;
    color: #4a2a44;
    height: 100vh;
    overflow: hidden;
}

#root { height: 100vh; }
.ant-layout { display: flex; height: 100%; }
.ant-layout-has-sider { flex-direction: row; }

/* ---------- САЙДБАР ---------- */
.kd-sider {
    flex: 0 0 286px;
    max-width: 286px;
    min-width: 286px;
    width: 286px;
    background: linear-gradient(190deg, #7a4468 0%, #5a3350 45%, #402240 100%);
    border-right: 1px solid #c9a8c4;
    box-shadow: 12px 0 36px rgba(74, 42, 68, 0.15);
    display: flex;
    flex-direction: column;
    overflow: auto;
    transition: all 0.3s ease;
    position: relative;
}

.kd-sider.collapsed {
    flex: 0 0 80px;
    max-width: 80px;
    min-width: 80px;
    width: 80px;
}

.kd-sider.collapsed .kd-logo-title,
.kd-sider.collapsed .kd-logo-subtitle,
.kd-sider.collapsed .kd-menu-text,
.kd-sider.collapsed .kd-sider-note {
    display: none;
}

.kd-sider.collapsed .kd-menu-link { justify-content: center; padding: 0 8px; }
.kd-sider.collapsed .kd-menu .arrow,
.kd-sider.collapsed .kd-menu .sub-menu { display: none; }
.kd-sider.collapsed .kd-menu-icon { font-size: 20px; width: auto; background: transparent; }
.kd-sider.collapsed .kd-logo { justify-content: center; padding: 18px 8px; }
.kd-sider.collapsed .kd-logo-mark { margin: 0; }

/* ---- ТУЛТИПЫ ---- */
.kd-sider .kd-menu-link {
    position: relative;
}

.kd-sider .kd-menu-link:hover .kd-menu-text {
    visibility: visible;
    opacity: 1;
    position: fixed;
    left: 90px;
    top: 50%;
    transform: translateY(-50%);
    background: #4a2a44;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: block !important;
    pointer-events: none;
}

.kd-sider .kd-menu-link:hover .kd-menu-text::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #4a2a44;
}

.kd-sider:not(.collapsed) .kd-menu-link .kd-menu-text {
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    background: transparent !important;
    color: #f0dcea !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-left: 0 !important;
    display: block !important;
    white-space: normal !important;
    pointer-events: auto !important;
}

.kd-sider:not(.collapsed) .kd-menu-link .kd-menu-text::before {
    display: none !important;
}

/* ---- КНОПКА СВЕРНУТЬ/РАЗВЕРНУТЬ ---- */
.kd-sider-trigger {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffd166;
    color: #6a3a10;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(74, 42, 68, 0.3);
    z-index: 10;
}

.kd-sider-trigger:hover {
    background: #ffb84d;
}

.kd-sider:not(.collapsed) .kd-sider-trigger {
    transform: translateX(-50%) rotate(180deg);
}

/* ---------- ЛОГОТИП ---------- */
.kd-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 18px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.kd-logo-mark {
    position: relative;
    background: radial-gradient(circle at 28% 20%, #fff 0 9%, #0000 10%), linear-gradient(135deg, #ffd166, #b0538a 55%, #4a2a44);
    border-radius: 18px;
    width: 46px;
    min-width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 18px 32px rgba(176, 83, 138, 0.3);
}

.kd-logo-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.kd-logo-subtitle {
    color: #f0c9e6;
    font-size: 12px;
    margin-top: 3px;
}

/* ---------- МЕНЮ ---------- */
.kd-menu {
    list-style: none;
    padding: 6px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.kd-menu > li { border-radius: 14px; position: relative; }

.kd-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    color: #f0dcea;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.kd-menu-link:hover { background: rgba(255,255,255,0.12); color: #fff; }

.kd-menu > li.selected > .kd-menu-link {
    background: linear-gradient(120deg, #ffd166, #ffb84d);
    color: #6a3a10;
    box-shadow: 0 10px 20px rgba(255, 184, 77, 0.35);
}

.kd-menu-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.kd-menu > li.selected .kd-menu-icon { background: rgba(255,255,255,0.35); }
.kd-menu-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.kd-menu .arrow {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    background: rgba(255,255,255,0.1);
    transition: background 0.25s, transform 0.25s;
    flex-shrink: 0;
}

.kd-menu .arrow i { transition: transform 0.3s ease; }
.kd-menu .arrow i.open { transform: rotate(90deg); }

.kd-menu > li.has-sub:has(.sub-menu.open) > .kd-menu-link {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.kd-menu > li.has-sub:has(.sub-menu.open) .arrow {
    background: #ffd166;
    color: #6a3a10;
}

/* ---------- ПОДМЕНЮ ---------- */
.kd-menu .sub-menu {
    list-style: none;
    padding: 0 6px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    background: #fdf3f0;
    border-radius: 16px;
    margin: 0 2px;
    box-shadow: inset 0 0 0 1px rgba(176, 83, 138, 0.12);
}

.kd-menu .sub-menu.open {
    max-height: 900px;
    opacity: 1;
    padding: 8px 6px;
    margin: 4px 2px 8px;
}

.kd-menu .sub-menu li { border-radius: 10px; margin: 2px 0; }

.kd-menu .sub-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    color: #6a3a5a;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s;
}

.kd-menu .sub-menu li a:hover { background: rgba(176, 83, 138, 0.12); color: #4a2a44; }

.sub-dot {
    font-size: 11px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(176, 83, 138, 0.12);
    color: #b0538a;
    flex-shrink: 0;
}

.kd-sider-note {
    background: rgba(255, 209, 102, 0.14);
    border: 1.5px dashed #ffd166;
    border-radius: 20px;
    margin: 16px;
    padding: 16px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.kd-sider-note-title {
    color: #ffd166;
    font-weight: 900;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kd-sider-note-text {
    color: #f0dcea;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
}

/* ---------- ОСНОВНАЯ ЧАСТЬ ---------- */
.kd-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background: #f4f0f2;
    height: 100vh;
    overflow: hidden;
}

/* ---------- ХЕДЕР ---------- */
.kd-header {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 76px;
    padding: 0 22px;
    background: #FFFFFF;
    border-bottom: 1px solid #c9a8c4;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.kd-burger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #c9a8c4;
    background: #fff;
    color: #4a2a44;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.kd-burger:hover { background: #f4f0f2; }

.kd-header-search {
    flex: 1;
    max-width: 560px;
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    padding: 0 13px;
    height: 40px;
    color: #6C7A67;
    font-weight: 600;
    font-size: 13px;
    gap: 6px;
}

.kd-header-search input {
    border: none;
    background: transparent;
    flex: 1;
    outline: none;
    font-size: 13px;
    color: #23401F;
}

.kd-header-search .search-btn {
    background: none;
    border: none;
    color: #4a2a44;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.kd-header-search .search-btn:hover { background: #f4f0f2; }

.kd-online-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 42px;
    border-radius: 12px;
    background: #b0538a;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.kd-online-btn:hover { background: #9a4678; color: #fff; }

.kd-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.kd-header-info .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #4a2a44;
    white-space: nowrap;
}

.kd-header-info .divider {
    width: 1px;
    height: 30px;
    background: #c9a8c4;
}

.kd-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* =========================================================
   КОМПАКТНАЯ СТАТИСТИКА (ГЛАВНАЯ + ФИНАНСЫ)
   ========================================================= */

.stats-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
}

.stats-grid .stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #fff !important;
    border: 1px solid #c9a8c4 !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    flex: 0 0 auto !important;
    min-width: 120px !important;
    max-width: 200px !important;
    transition: all 0.2s !important;
}

.stats-grid .stat-card:hover {
    border-color: #b0538a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(176, 83, 138, 0.08) !important;
}

.stats-grid .stat-card .stat-number {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.stats-grid .stat-card .stat-number.green {
    color: #38a169 !important;
}

.stats-grid .stat-card .stat-number.red {
    color: #e53e3e !important;
}

.stats-grid .stat-card .stat-number.blue {
    color: #5a67d8 !important;
}

.stats-grid .stat-card .stat-label {
    font-size: 12px !important;
    color: #718096 !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.stats-grid .stat-card .stat-label svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
}

/* ---------- АДАПТИВ СТАТИСТИКИ ---------- */
@media (max-width: 768px) {
    .stats-grid .stat-card {
        min-width: 100px !important;
        max-width: 160px !important;
        padding: 6px 12px !important;
    }
    .stats-grid .stat-card .stat-number {
        font-size: 16px !important;
    }
    .stats-grid .stat-card .stat-label {
        font-size: 10px !important;
    }
    .stats-grid .stat-card .stat-label svg {
        width: 12px !important;
        height: 12px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid .stat-card {
        min-width: 80px !important;
        max-width: 120px !important;
        padding: 4px 8px !important;
    }
    .stats-grid .stat-card .stat-number {
        font-size: 14px !important;
    }
    .stats-grid .stat-card .stat-label {
        font-size: 9px !important;
    }
    .stats-grid .stat-card .stat-label svg {
        width: 10px !important;
        height: 10px !important;
    }
}

/* ---------- ПАНЕЛИ ---------- */
.kd-soft-panel {
    background: #fff;
    border: 1px solid #c9a8c4;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(74, 42, 68, 0.06);
    padding: 0 20px 20px;
    margin-bottom: 20px;
}

.kd-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 10px;
    border-bottom: 1px solid #f0e8ec;
}

.kd-panel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #b0538a;
    border-radius: 50%;
}

.flex { display: flex; align-items: center; gap: 8px; }
.fw-800 { font-weight: 800; }

/* ---------- ГРИДЫ ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ---------- ТАБЛИЦЫ ---------- */
.schedule-wrap {
    overflow-x: auto;
    overflow-y: auto;
    margin-top: 10px;
    max-height: 500px;
}

.schedule-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: center;
    font-size: 12px;
    word-break: break-word;
}

.schedule-table th {
    background: #f5f5f5;
    font-weight: 800;
    color: #4a2a44;
    position: sticky;
    top: 0;
    z-index: 2;
}

.schedule-table tbody tr:nth-child(even) { background: #f9f9f9; }
.schedule-table tbody tr:hover { background: #f1f1f1; }

.schedule-table .fio-cell {
    font-weight: 700;
    text-align: left;
    min-width: 180px;
}

.schedule-table .spec-cell {
    text-align: left;
    min-width: 160px;
    color: #6C7A67;
}

/* ---------- СТРОКИ УСЛУГ ---------- */
.kd-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid #f0e8ec;
    flex-wrap: wrap;
}

.kd-service-row:first-child { border-top: none; }

.kd-service-name {
    color: #4a2a44;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.kd-service-name:hover { color: #b0538a; }

.kd-service-row .row-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.kd-service-price {
    color: #b0538a;
    font-weight: 900;
    font-size: 15px;
    white-space: nowrap;
}

.kd-service-book {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: #f4f0f2;
    color: #4a2a44;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: 0.2s;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.kd-service-book:hover { background: #b0538a; color: #fff; }

/* ---------- СТАТУСЫ ---------- */
.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-planning { background: #edf2f7; color: #4a5568; }
.status-shooting { background: #fefcbf; color: #975a16; }
.status-retouch { background: #bee3f8; color: #2a69ac; }
.status-layout { background: #feebc8; color: #9c4221; }
.status-print { background: #e9d8fd; color: #553c9a; }
.status-delivery { background: #c6f6d5; color: #276749; }
.status-done { background: #c6f6d5; color: #276749; }

/* ---------- ТЕГИ ---------- */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #edf2f7;
    color: #4a5568;
}

.tag-high { background: #fed7d7; color: #9b2c2c; }
.tag-medium { background: #fefcbf; color: #975a16; }
.tag-low { background: #c6f6d5; color: #276749; }

/* ---------- КНОПКИ ---------- */
.kd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 46px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #4a2a44;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.kd-btn-primary {
    background: #b0538a;
    color: #fff;
    box-shadow: 0 12px 24px rgba(176, 83, 138, 0.25);
}

.kd-btn-primary:hover { background: #9a4678; }

.kd-btn-outline {
    border-color: #c9a8c4;
    background: #fff;
}

.kd-btn-outline:hover { border-color: #b0538a; color: #b0538a; }

.kd-btn-danger { background: #e53e3e; color: #fff; }
.kd-btn-danger:hover { background: #c53030; }

.kd-btn-success { background: #38a169; color: #fff; }
.kd-btn-success:hover { background: #2f855a; }

.kd-btn-sm { height: 34px; padding: 0 14px; font-size: 12px; border-radius: 10px; }
.kd-btn-block { width: 100%; justify-content: center; }

/* ---------- ФУТЕР ---------- */
.kd-footer {
    background: #4a2a44;
    color: #c9a8c4;
    padding: 8px 24px;
    border-top: none !important;
    flex-shrink: 0;
    font-size: 12px;
}

.kd-footer .footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px 16px;
}

.kd-footer .footer-copy { font-size: 12px; color: #a88aa4; }

/* =========================================================
   ФОРМЫ
   ========================================================= */

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #4a2a44;
    margin-bottom: 6px;
}

.form-group .required {
    color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    font-family: inherit;
    background: #fff;
    color: #4a2a44;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #b0538a;
    box-shadow: 0 0 0 3px rgba(176, 83, 138, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group .help-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #718096;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 20px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0e8ec;
}

.form-actions .kd-btn {
    min-width: 160px;
    justify-content: center;
    flex: 0 0 auto;
}

.form-panel {
    padding: 24px 28px 28px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    background: #faf8f9;
}

.service-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #edf2f7;
    transition: background 0.2s;
}

.service-checkbox:hover {
    background: #f7f2f5;
}

.service-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #b0538a;
    flex-shrink: 0;
}

.service-name-text {
    flex: 1;
    font-weight: 600;
    color: #4a2a44;
}

.service-price-text {
    color: #b0538a;
    font-weight: 800;
    font-size: 15px;
    background: #fcf5f9;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* =========================================================
   УВЕДОМЛЕНИЯ
   ========================================================= */

.kd-notification-btn {
    position: relative;
    cursor: pointer;
    padding: 0 8px;
    color: #4a2a44;
    font-size: 18px;
}

.kd-notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53e3e;
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#notificationDropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: #fff;
    border: 1px solid #c9a8c4;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 360px;
    max-width: 420px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
}

#notificationDropdown.open {
    display: block;
}

.kd-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 12px 16px;
    border-bottom: 1px solid #f0e8ec;
    font-weight: 700;
    font-size: 14px;
    color: #4a2a44;
}

.kd-notification-header button {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.kd-notification-header button:hover {
    text-decoration: underline;
}

.kd-notification-item {
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid #f7f2f5;
    text-decoration: none;
    color: #4a2a44;
    transition: background 0.2s;
}

.kd-notification-item:hover {
    background: #f7f2f5;
}

.kd-notification-item.unread {
    font-weight: 700;
    background: #f7f2f5;
}

.kd-notification-empty {
    padding: 20px 16px;
    text-align: center;
    color: #6C7A67;
    font-size: 13px;
}

.kd-notification-empty i {
    color: #38a169;
}

/* ---------- ЗАМЕТКИ ---------- */
.kd-notes-btn {
    position: relative;
    cursor: pointer;
    padding: 0 8px;
    color: #b0538a;
    font-size: 18px;
}

#notesCount {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53e3e;
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ---------- ПРОФИЛЬ ---------- */
.kd-user-link {
    color: #4a2a44;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kd-user-name {
    font-weight: 600;
}

.kd-user-role {
    font-size: 10px;
    color: #6C7A67;
    background: #f7f2f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.kd-divider {
    width: 1px;
    height: 30px;
    background: #c9a8c4;
}

.kd-logout-link {
    color: #e53e3e;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

/* =========================================================
   МОДАЛКИ
   ========================================================= */

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

.modal-overlay.active { display: flex; }

.modal-window {
    background: #fff;
    border-radius: 24px;
    padding: 36px 40px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6C7A67;
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover { color: #b0538a; transform: rotate(90deg); }

.modal-title {
    font-size: 24px;
    font-weight: 900;
    color: #4a2a44;
    margin-bottom: 24px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #b0538a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover { background: #9a4678; }

#quickRequestModal .modal-window {
    max-width: 700px;
    padding: 28px 32px;
}

#quickRequestModal .modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 16px;
}

#quickRequestModal .modal-title i {
    color: #b0538a;
    margin-right: 8px;
}

#quickRequestModal .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

#quickRequestModal .form-group {
    margin-bottom: 6px;
}

#quickRequestModal .form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #4a2a44;
    margin-bottom: 4px;
}

#quickRequestModal .form-group .required {
    color: #e53e3e;
}

#quickRequestModal .form-group input,
#quickRequestModal .form-group select,
#quickRequestModal .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #c9a8c4;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #4a2a44;
    box-sizing: border-box;
    transition: 0.2s;
}

#quickRequestModal .form-group input:focus,
#quickRequestModal .form-group select:focus,
#quickRequestModal .form-group textarea:focus {
    border-color: #b0538a;
    box-shadow: 0 0 0 3px rgba(176,83,138,0.1);
    outline: none;
}

#quickRequestModal .form-group textarea {
    min-height: 60px;
    resize: vertical;
}

#quickRequestModal .form-group .help-text {
    display: block;
    font-size: 12px;
    color: #6C7A67;
    margin-top: 4px;
}

#quickRequestModal .services-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    border: 1px solid #c9a8c4;
    border-radius: 8px;
    padding: 10px;
    max-height: 140px;
    overflow-y: auto;
    background: #faf8f9;
}

#quickRequestModal .services-checkboxes .service-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #edf2f7;
    transition: 0.2s;
}

#quickRequestModal .services-checkboxes .service-label:hover {
    background: #f7f2f5;
}

#quickRequestModal .services-checkboxes .service-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #b0538a;
    flex-shrink: 0;
}

#quickRequestModal .services-checkboxes .service-label .service-price {
    color: #b0538a;
    font-weight: 700;
    font-size: 13px;
    margin-left: auto;
}

#quickRequestModal .services-checkboxes .empty-services {
    color: #6C7A67;
    font-size: 13px;
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px 0;
}

#quickRequestModal .modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

#quickRequestModal .modal-actions .submit-btn {
    flex: 1;
    justify-content: center;
    padding: 12px;
}

/* =========================================================
   КАЛЕНДАРЬ
   ========================================================= */

.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #c9a8c4;
    margin-bottom: 16px;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4a2a44;
}

.calendar-legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.calendar-legend-dot.new { background: #fefcbf; }
.calendar-legend-dot.confirmed { background: #bee3f8; }
.calendar-legend-dot.shooting { background: #c6f6d5; }
.calendar-legend-dot.processing { background: #e9d8fd; }
.calendar-legend-dot.done { background: #c6f6d5; }

.calendar-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.calendar-main {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #c9a8c4;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #7a4468, #5a3350);
    color: #fff;
}

.calendar-today-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.calendar-today-btn:hover {
    background: rgba(255,255,255,0.35);
}

.calendar-month-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 6px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.calendar-nav-btn:hover {
    background: rgba(255,255,255,0.35);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0e8ec;
    padding: 1px;
}

.calendar-weekday {
    background: #f7f2f5;
    padding: 10px 8px;
    text-align: center;
    font-weight: 800;
    font-size: 12px;
    color: #6C7A67;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-empty-cell {
    background: #faf8f9;
    min-height: 80px;
    padding: 4px;
}

.calendar-day-cell {
    background: #fff;
    min-height: 80px;
    padding: 6px 8px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.calendar-day-cell:hover {
    background: #fcf5f9;
}

.calendar-day-cell.today {
    background: #fff1cf;
    border-color: #b0538a;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    color: #4a2a44;
}

.calendar-day-cell.today .calendar-day-number {
    font-weight: 800;
    color: #b0538a;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 50px;
    overflow-y: auto;
}

.calendar-event {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #4a2a44;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
}

.calendar-note-icon {
    color: #b0538a;
    font-size: 9px;
    margin-left: 2px;
}

.calendar-sidebar {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #c9a8c4;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.calendar-sidebar-title {
    font-weight: 900;
    font-size: 18px;
    color: #4a2a44;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0e8ec;
}

.calendar-sidebar-empty {
    color: #6C7A67;
    font-size: 14px;
    padding: 12px 0;
}

.sidebar-event-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0e8ec;
    align-items: center;
}

.sidebar-event-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-event-content {
    flex: 1;
}

.sidebar-event-title {
    font-weight: 700;
    font-size: 14px;
    color: #4a2a44;
}

.sidebar-event-title a {
    color: #4a2a44;
    text-decoration: none;
}

.sidebar-event-title a:hover {
    color: #b0538a;
}

.sidebar-note-icon {
    color: #b0538a;
    font-size: 12px;
}

.sidebar-event-meta {
    font-size: 12px;
    color: #6C7A67;
}

.sidebar-event-meta i {
    margin-right: 4px;
}

.sidebar-event-meta .fa-phone {
    margin-left: 8px;
}

.sidebar-event-status {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    color: #4a2a44;
    font-weight: 600;
}

/* =========================================================
   МИНИ-КАЛЕНДАРЬ НА ГЛАВНОЙ
   ========================================================= */

.mini-calendar-wrap {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #c9a8c4;
    margin: 24px 0;
}

.mini-calendar-wrap .mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #7a4468, #5a3350);
    color: #fff;
    border-radius: 18px 18px 0 0;
}

.mini-calendar-wrap .mini-cal-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.mini-calendar-wrap .mini-cal-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.mini-calendar-wrap .mini-cal-today {
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-calendar-wrap .mini-cal-today:hover {
    background: rgba(255,255,255,0.35);
}

.mini-calendar-wrap .mini-cal-today i {
    font-size: 14px;
}

.mini-calendar-wrap .mini-cal-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mini-calendar-wrap .mini-cal-nav-btn:hover {
    background: rgba(255,255,255,0.35);
}

.mini-calendar-wrap .mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0e8ec;
}

.mini-calendar-wrap .mini-cal-weekday {
    background: #f7f2f5;
    padding: 8px 4px;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    color: #6C7A67;
    text-transform: uppercase;
}

.mini-calendar-wrap .mini-cal-day {
    background: #fff;
    min-height: 48px;
    padding: 4px 2px;
    cursor: pointer;
    transition: 0.15s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.mini-calendar-wrap .mini-cal-day:hover:not(.mini-cal-empty) {
    background: #fcf5f9;
}

.mini-calendar-wrap .mini-cal-day.mini-cal-empty {
    background: #faf8f9;
    cursor: default;
    min-height: 48px;
}

.mini-calendar-wrap .mini-cal-day.mini-cal-today {
    background: #fff1cf;
}

.mini-calendar-wrap .mini-cal-day .mini-cal-number {
    font-weight: 600;
    font-size: 14px;
    color: #4a2a44;
    line-height: 1.2;
}

.mini-calendar-wrap .mini-cal-day.mini-cal-today .mini-cal-number {
    font-weight: 800;
    color: #b0538a;
}

.mini-calendar-wrap .mini-cal-day .mini-cal-count {
    font-size: 8px;
    color: #b0538a;
    font-weight: 600;
    line-height: 1.1;
    margin-top: 1px;
}

.mini-calendar-wrap .mini-cal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid #f0e8ec;
    flex-wrap: wrap;
    gap: 4px;
    background: #fff;
    border-radius: 0 0 18px 18px;
}

.mini-calendar-wrap .mini-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mini-calendar-wrap .mini-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #4a2a44;
}

.mini-calendar-wrap .mini-cal-legend-item .mini-cal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.mini-calendar-wrap .mini-cal-legend-item .mini-cal-dot.shoot { background: #fefcbf; }
.mini-calendar-wrap .mini-cal-legend-item .mini-cal-dot.task { background: #bee3f8; }
.mini-calendar-wrap .mini-cal-legend-item .mini-cal-dot.deadline { background: #fed7d7; }
.mini-calendar-wrap .mini-cal-legend-item .mini-cal-dot.payment { background: #c6f6d5; }

.mini-calendar-wrap .mini-cal-hint {
    font-size: 10px;
    color: #6C7A67;
}

.mini-calendar-wrap .mini-cal-hint i {
    margin-right: 3px;
}

/* =========================================================
   ЗАЯВКИ (requests.php)
   ========================================================= */

.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.requests-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
}

.requests-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.requests-tabs .kd-btn {
    padding: 8px 20px;
}

.requests-empty {
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #c9a8c4;
    border-radius: 18px;
}

.requests-empty i {
    font-size: 48px;
    color: #c9a8c4;
    display: block;
    margin-bottom: 16px;
}

.requests-empty p {
    font-size: 18px;
    color: #6C7A67;
    margin-bottom: 8px;
}

.requests-empty .kd-btn {
    margin-top: 12px;
}

.schedule-table .text-center { text-align: center; }
.schedule-table .text-right { text-align: right; }
.schedule-table .request-row { cursor: pointer; }
.schedule-table .request-row:hover { background: #f7f2f5; }

.schedule-table .school-name {
    font-weight: 700;
}

.schedule-table .class-name {
    color: #6C7A67;
    font-size: 12px;
}

.schedule-table .phone {
    font-size: 12px;
}

.schedule-table .shoot-date {
    font-weight: 600;
}

.schedule-table .services-list {
    max-width: 120px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-table .notes-link {
    color: #c9a8c4;
    text-decoration: none;
}

.schedule-table .notes-link.has-notes {
    color: #b0538a;
}

.schedule-table .notes-count {
    font-size: 10px;
    background: #b0538a;
    color: #fff;
    border-radius: 50%;
    padding: 1px 6px;
    margin-left: 2px;
}

.schedule-table .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.schedule-table .delete-btn {
    background: #fee2e2;
}

.schedule-table .delete-btn i {
    color: #e53e3e;
}

/* =========================================================
   УСЛУГИ (services.php)
   ========================================================= */

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.services-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
}

.services-title i {
    color: #b0538a;
    margin-right: 8px;
}

.services-add-btn {
    justify-content: center;
}

.services-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.services-alert.success {
    background: #d4edda;
    color: #155724;
}

.services-alert.error {
    background: #f8d7da;
    color: #721c24;
}

.services-alert i {
    margin-right: 6px;
}

.services-price-cell {
    text-align: right;
    font-weight: 700;
    color: #b0538a;
}

.services-status-tag {
    font-size: 11px;
}

.services-actions {
    text-align: right;
}

.services-delete-btn {
    background: #fee2e2;
}

.services-delete-icon {
    color: #e53e3e;
}

/* =========================================================
   ДОБАВЛЕНИЕ УСЛУГИ (service_add.php)
   ========================================================= */

.service-add-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
}

.service-add-panel {
    max-width: 100%;
}

.service-add-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.service-add-full {
    grid-column: 1 / -1;
}

.service-add-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
}

.service-add-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.service-add-checkbox label {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    color: #4a2a44;
    cursor: pointer;
}

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

.service-add-submit {
    padding: 12px 32px;
}

.service-add-cancel {
    padding: 12px 32px;
}

/* =========================================================
   РЕДАКТИРОВАНИЕ ЗАЯВКИ (request_edit.php)
   ========================================================= */

.request-edit-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
}

.request-edit-panel {
    max-width: 100%;
    padding: 20px;
}

.request-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.request-edit-services {
    margin-top: 16px;
}

.request-edit-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    background: #faf8f9;
}

.request-edit-service-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    background: #fff;
    border: 1px solid #edf2f7;
}

.request-edit-service-name {
    flex: 1;
    font-weight: 600;
    color: #4a2a44;
}

.request-edit-service-price {
    color: #b0538a;
    font-weight: 800;
    font-size: 15px;
    background: #fcf5f9;
    padding: 2px 10px;
    border-radius: 12px;
}

.request-edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.request-edit-submit {
    padding: 12px 32px;
}

.request-edit-cancel {
    padding: 12px 32px;
}

/* =========================================================
   ДЕТАЛИ ЗАЯВКИ (request_detail.php)
   ========================================================= */

.cursor-pointer { cursor: pointer; }
.text-muted { color: #6C7A67; }
.text-small { font-size: 13px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.fw-800 { font-weight: 800; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.px-0 { padding-left: 0; padding-right: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1; }

.row-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.col-flex-6 {
    flex: 1;
    min-width: 300px;
}

.col-flex-12 { flex: 0 0 100%; }

.page-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin: 0 0 18px 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.status-badge {
    font-size: 13px;
    padding: 8px 20px;
    display: inline-block;
}

.payment-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    background: #f7f2f5;
    border-radius: 8px;
}

.kd-soft-panel {
    background: #fff;
    border: 1px solid #c9a8c4;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(74, 42, 68, 0.06);
    padding: 20px 20px 20px;
    margin-bottom: 20px;
}

.kd-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 10px;
    border-bottom: 1px solid #f0e8ec;
}

.kd-panel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b0538a;
    flex-shrink: 0;
}

.kd-panel-dot.blue { background: #5a67d8; }
.kd-panel-dot.red { background: #e53e3e; }
.kd-panel-dot.green { background: #38a169; }
.kd-panel-dot.pink { background: #b0538a; }

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 12px 0;
}

.info-grid .info-item b { font-weight: 600; }

.info-notes {
    padding: 8px 0;
    border-top: 1px solid #f0e8ec;
}

/* ЗАМЕТКИ */
.note-item {
    padding: 10px 14px;
    border: 1px solid #f0e8ec;
    border-radius: 8px;
    margin-bottom: 6px;
}

.note-item.bg-pinned { background: #fff1cf; }
.note-item.bg-normal { background: #fff; }
.note-item.border-left-pinned { border-left: 3px solid #b0538a; }
.note-item.border-left-normal { border-left: 3px solid #c9a8c4; }

.note-title {
    font-weight: 700;
    font-size: 14px;
    color: #4a2a44;
}

.note-content {
    font-size: 13px;
    color: #4a3a44;
    margin-top: 2px;
}

.note-date {
    font-size: 10px;
    color: #6C7A67;
    margin-top: 4px;
}

.note-delete {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
}

/* ГРУППЫ */
.groups-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 0;
}

.group-item {
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    overflow: hidden;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f7f2f5;
    cursor: pointer;
}

.group-name { font-weight: 700; }

.group-count {
    background: #5a67d8;
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.group-arrow {
    color: #6C7A67;
    transition: transform 0.3s;
    margin-left: 8px;
}

.group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.group-body.open { max-height: 500px; }

.group-body .student-item {
    padding: 4px 10px;
    background: #fcf5f9;
    border-radius: 4px;
    font-size: 13px;
    border-left: 2px solid #5a67d8;
    margin-bottom: 4px;
}

.group-body .student-item .service-tag {
    font-size: 9px;
    background: #e9d8fd;
    color: #553c9a;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 4px;
}

/* ПЕЧАТЬ */
.print-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    padding: 20px;
}

.print-modal-content {
    background: #fff;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.print-modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: #e53e3e;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}

.print-modal-actions { text-align: center; margin-top: 20px; }
.print-modal-btn { padding: 12px 40px; }

/* =========================================================
   ПОИСК (search.php)
   ========================================================= */

.search-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
}

.search-title i {
    color: #b0538a;
    margin-right: 8px;
}

.search-empty {
    color: #6C7A67;
}

.search-query {
    color: #6C7A67;
    margin-bottom: 16px;
}

.search-query strong {
    color: #4a2a44;
}

.search-list {
    padding: 12px 0;
}

.search-date {
    font-size: 12px;
    color: #6C7A67;
}

.search-meta {
    font-size: 12px;
    color: #6C7A67;
}

.search-no-results {
    color: #6C7A67;
    padding: 12px 0;
    text-align: center;
}

.search-no-results i {
    margin-right: 6px;
}

/* =========================================================
   ЗАДАЧИ (tasks.php)
   ========================================================= */

.tasks-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
}

.task-done-row {
    opacity: 0.5;
}

.task-title {
    font-weight: 700;
}

.task-done-text {
    text-decoration: line-through;
}

.task-description {
    font-size: 13px;
    color: #6C7A67;
}

.task-done-btn {
    background: #38a169;
    color: #fff;
}

.task-delete-btn {
    background: #fee2e2;
}

.task-delete-btn i {
    color: #e53e3e;
}

/* =========================================================
   ГРУППЫ (groups.php)
   ========================================================= */

.groups-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.groups-page-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
}

.groups-page-title i {
    color: #b0538a;
    margin-right: 8px;
}

.groups-page-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.groups-tag-students {
    background: #b0538a;
    color: #fff;
}

.groups-request-id {
    font-weight: 600;
    color: #4a2a44;
}

.groups-saved {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.groups-panel-dashed {
    border-color: #c9a8c4;
    border-style: dashed;
}

.groups-panel-group {
    border-color: rgba(176, 83, 138, 0.5);
}

.groups-panel-head-group {
    border-bottom-color: rgba(176, 83, 138, 0.25);
}

.groups-dot-gray {
    background: #6C7A67;
}

.groups-dot-pink {
    background: #b0538a;
}

.groups-tag-count {
    background: #b0538a;
    color: #fff;
}

.groups-panel-body {
    padding: 8px 0;
    min-height: 60px;
}

.groups-student-card {
    padding: 6px 10px;
    background: #f7f2f5;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
}

.groups-student-grouped {
    background: #fcf5f9;
    border-left: 3px solid #b0538a;
}

.groups-service-tag {
    font-size: 10px;
}

.groups-empty-text {
    color: #6C7A67;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}

.groups-empty-drag {
    color: #c9a8c4;
}

.groups-submit-row {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.groups-submit-btn {
    width: 100%;
    justify-content: center;
}

/* =========================================================
   АДМИНИСТРИРОВАНИЕ (admin.php)
   ========================================================= */

.admin-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
}

.admin-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.admin-alert.success {
    background: #d4edda;
    color: #155724;
}

.admin-alert.error {
    background: #f8d7da;
    color: #721c24;
}

.admin-alert.warning {
    background: #fff3cd;
    color: #856404;
}

.admin-alert i {
    margin-right: 6px;
}

.admin-add-form {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.admin-add-form .form-group {
    margin: 0;
}

.admin-add-form .form-group label {
    font-size: 12px;
}

.admin-add-form .form-group input,
.admin-add-form .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c9a8c4;
    border-radius: 8px;
    font-size: 14px;
}

.admin-add-form .submit-btn {
    width: 100%;
    justify-content: center;
}

.admin-actions-cell {
    text-align: right;
    min-width: 160px;
}

.admin-actions-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.admin-tag-main {
    background: #b0538a;
    color: #fff;
    font-size: 9px;
}

.admin-tag-you {
    background: #3498db;
    color: #fff;
    font-size: 9px;
}

.admin-role-select {
    padding: 4px 8px;
    border: 1px solid #c9a8c4;
    border-radius: 6px;
    font-size: 12px;
}

.admin-role-badge {
    font-size: 11px;
}

.admin-edit-btn {
    background: #e9d8fd;
    color: #553c9a;
}

.admin-delete-btn {
    background: #fee2e2;
}

.admin-delete-btn i {
    color: #e53e3e;
}

.admin-cant-edit {
    color: #6C7A67;
    font-size: 12px;
}

.admin-modal-window {
    max-width: 500px;
}

.admin-modal-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    font-size: 14px;
}

.inline-form {
    display: inline;
}

/* =========================================================
   ФИНАНСЫ (finance.php)
   ========================================================= */

.finance-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
}

.stat-number-green {
    color: #38a169;
}

.stat-number-red {
    color: #e53e3e;
}

.finance-stats-payment {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.finance-payment-card {
    padding: 16px;
    background: #f7f2f5;
    border-radius: 10px;
    border-left: 4px solid;
}

.finance-payment-card.paid {
    border-left-color: #38a169;
}

.finance-payment-card.deposit {
    border-left-color: #f39c12;
}

.finance-payment-card.not-paid {
    border-left-color: #e53e3e;
}

.finance-payment-card .number {
    font-size: 24px;
    font-weight: 700;
}

.finance-payment-card.paid .number {
    color: #38a169;
}

.finance-payment-card.deposit .number {
    color: #f39c12;
}

.finance-payment-card.not-paid .number {
    color: #e53e3e;
}

.finance-payment-card .label {
    color: #6C7A67;
}

.finance-payment-card .label i {
    margin-right: 4px;
}

.finance-request-link {
    color: #b0538a;
    text-decoration: none;
    font-weight: 600;
}

.finance-debt-cell {
    text-align: right;
    color: #e53e3e;
    font-weight: 700;
}

.finance-status-cell {
    font-weight: 600;
}

.finance-empty {
    text-align: center;
    color: #6C7A67;
    padding: 30px 0;
}

.finance-empty i {
    font-size: 20px;
    display: block;
    margin-bottom: 8px;
}

.finance-hint {
    border: 1px dashed #c9a8c4;
    background: #faf8f9;
}

.finance-hint-content {
    padding: 16px 0;
    text-align: center;
    color: #6C7A67;
}

.finance-hint-content i {
    color: #f39c12;
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.finance-hint-content p {
    font-size: 15px;
}

.finance-hint-content ol {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.finance-hint-content a {
    color: #b0538a;
}

/* =========================================================
   ПРОФИЛЬ (profile.php)
   ========================================================= */

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.profile-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
}

.profile-info-grid {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.profile-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.profile-password-form {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: end;
}

.profile-password-form .form-group {
    margin: 0;
}

.profile-password-form .form-group label {
    font-size: 12px;
}

.profile-password-form .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c9a8c4;
    border-radius: 8px;
    font-size: 14px;
}

.profile-password-form .submit-btn {
    width: 100%;
    justify-content: center;
}

/* =========================================================
   БЫСТРЫЕ ДЕЙСТВИЯ (scenario grid)
   ========================================================= */

.kd-scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kd-scenario-card {
    background: #fff;
    border: 1px solid #c9a8c4;
    border-radius: 18px;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
    min-height: 100px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.kd-scenario-card:hover {
    border-color: #b0538a;
    transform: translateY(-3px);
    box-shadow: 0 20px 38px rgba(176, 83, 138, 0.12);
}

.kd-scenario-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 20px;
    background: #f4f0f2;
    display: grid;
    place-items: center;
    font-size: 26px;
    color: #b0538a;
}

.kd-scenario-card--blue .kd-scenario-icon { background: #e6f0f8; color: #1a6a9a; }
.kd-scenario-card--purple .kd-scenario-icon { background: #f0e8f8; color: #6a2d8a; }
.kd-scenario-card--cyan .kd-scenario-icon { background: #e0f4f4; color: #1a7a7a; }
.kd-scenario-card--orange .kd-scenario-icon { background: #fcf0e0; color: #c9781a; }
.kd-scenario-card--pink .kd-scenario-icon { background: #fce8f0; color: #b83a6a; }

.kd-scenario-title { font-size: 18px; font-weight: 900; color: #4a2a44; }

/* =========================================================
   РОДИТЕЛЬСКИЕ СТРАНИЦЫ
   ========================================================= */

.parent-form-container {
    max-width: 700px;
    margin: 0 auto;
}

.parent-form-title {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #4a2a44;
    margin-bottom: 18px;
    text-align: center;
}

.parent-form-title i {
    color: #b0538a;
    margin-right: 8px;
}

.parent-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.parent-form-school {
    font-size: 18px;
    font-weight: 700;
    color: #4a2a44;
}

.parent-form-date {
    color: #6C7A67;
}

.parent-form-saved {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.parent-form-confirmed-list {
    padding: 12px 0;
}

.parent-form-service-confirmed {
    color: #38a169;
    font-size: 13px;
}

.parent-form .form-group {
    margin-bottom: 16px;
}

.parent-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #4a2a44;
    margin-bottom: 4px;
}

.parent-form .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c9a8c4;
    border-radius: 10px;
    font-size: 14px;
}

.parent-form-submit {
    width: 100%;
    justify-content: center;
}

.parent-form-all-done {
    background: #d4edda;
    color: #155724;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
}

.parent-form-all-done i {
    margin-right: 6px;
}

.parent-form-back {
    margin-top: 12px;
    text-align: center;
}

/* =========================================================
   TOGGLE SWITCH
   ========================================================= */

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e0;
    transition: .3s;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: #fff;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.switch input:checked + .slider { background: #b0538a; }
.switch input:checked + .slider:before { transform: translateX(24px); }
.switch input:focus + .slider { box-shadow: 0 0 0 3px rgba(176, 83, 138, 0.3); }

.status-toggle-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0 8px;
    border-top: 1px solid #f0e8ec;
    margin-top: 8px;
}

.status-toggle-group .status-label {
    font-weight: 600;
    font-size: 15px;
    color: #4a2a44;
}

.status-toggle-group .status-text {
    font-weight: 700;
    font-size: 15px;
    min-width: 80px;
    transition: color 0.3s;
}

.status-toggle-group .status-text.active { color: #38a169; }
.status-toggle-group .status-text.inactive { color: #e53e3e; }

.status-toggle-group .status-hint {
    font-size: 13px;
    color: #6C7A67;
    background: #f7f2f5;
    padding: 4px 14px;
    border-radius: 20px;
    margin-left: auto;
}

.status-toggle-group .status-hint i { margin-right: 4px; }

@media (max-width: 480px) {
    .status-toggle-group {
        flex-wrap: wrap;
        gap: 10px;
    }
    .status-toggle-group .status-hint {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* =========================================================
   УСЛУГИ КАРТОЧКАМИ (request_add.php)
   ========================================================= */

.services-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.service-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: #fff;
    border: 2px solid #c9a8c4;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
    text-align: center;
    user-select: none;
}

.service-card-item:hover {
    border-color: #b0538a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(176, 83, 138, 0.12);
}

.service-card-title {
    font-weight: 700;
    font-size: 15px;
    color: #4a2a44;
    line-height: 1.2;
}

.service-card-price {
    font-size: 13px;
    color: #b0538a;
    font-weight: 700;
    margin-top: 4px;
}

.service-card-item.selected {
    border-color: #b0538a;
    background: #fcf5f9;
    box-shadow: 0 0 0 3px rgba(176, 83, 138, 0.15);
}

.services-empty-cards {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    color: #6C7A67;
}

.services-empty-cards i {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    color: #c9a8c4;
}

/* =========================================================
   АДАПТИВ
   ========================================================= */

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .calendar-wrapper {
        grid-template-columns: 1fr;
    }
    .calendar-sidebar {
        position: static;
        margin-top: 20px;
    }
    .admin-add-form {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .groups-grid {
        grid-template-columns: 1fr 1fr;
    }
    .service-add-grid {
        grid-template-columns: 1fr 1fr;
    }
    .request-edit-grid {
        grid-template-columns: 1fr 1fr;
    }
    .request-edit-services-grid {
        grid-template-columns: 1fr 1fr;
    }
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
    .request-form .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .request-form .services-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .kd-content { padding: 16px; }
    .kd-header {
        padding: 10px 14px;
        gap: 10px;
        height: auto;
        flex-wrap: wrap;
    }
    .kd-header-search {
        flex-basis: 100%;
        order: 3;
        max-width: none;
    }
    .kd-header-info { gap: 8px; }
    .kd-header-info .divider { display: none; }
    .kd-online-btn {
        font-size: 12px;
        padding: 0 14px;
        height: 36px;
    }
    .kd-burger { display: flex; }

    .kd-sider {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 900;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 24px 0 48px rgba(0,0,0,0.25);
        flex: 0 0 286px !important;
        max-width: 286px !important;
        min-width: 286px !important;
        width: 286px !important;
    }
    .kd-sider.mobile-open { transform: translateX(0); }
    .kd-sider .kd-logo-title,
    .kd-sider .kd-logo-subtitle,
    .kd-sider .kd-menu-text,
    .kd-sider .kd-sider-note,
    .kd-sider .kd-menu .arrow,
    .kd-sider .kd-menu .sub-menu { display: block !important; }
    .kd-sider .kd-menu-link { justify-content: flex-start !important; padding: 0 12px !important; }
    .kd-sider .kd-menu-icon {
        font-size: 16px !important;
        width: 32px !important;
        min-width: 32px !important;
        background: rgba(255,255,255,0.1) !important;
    }
    .kd-sider .kd-logo { justify-content: flex-start !important; padding: 18px !important; }
    .kd-sider .kd-logo-mark { margin: 0 !important; }
    .kd-sider-trigger { display: none !important; }

    .kd-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 899;
    }
    .kd-overlay.active { display: block; }

    body { overflow: auto; height: auto; }
    #root, .kd-page, .ant-layout { height: auto; min-height: 100vh; }
    .kd-main { height: auto; min-height: 100vh; }
    .kd-content { overflow-y: visible; }

    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    .stats-grid .stat-card {
        min-width: auto !important;
        max-width: 100% !important;
        padding: 8px 12px !important;
    }
    .stats-grid .stat-card .stat-number { font-size: 18px !important; }
    .stats-grid .stat-card .stat-label { font-size: 11px !important; }
    .stats-grid .stat-card .stat-label svg { width: 14px !important; height: 14px !important; }

    .kd-soft-panel {
        padding: 0 14px 14px;
        margin-bottom: 14px;
        border-radius: 14px;
    }
    .kd-panel-head { padding: 14px 0 8px; }
    .form-panel { padding: 16px; }
    .form-actions { flex-direction: column; }
    .form-actions .kd-btn { width: 100%; min-width: unset; }

    .kd-scenario-grid { grid-template-columns: repeat(2, 1fr); }
    .kd-scenario-card { padding: 14px; min-height: auto; }
    .kd-scenario-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 20px;
    }
    .kd-scenario-title { font-size: 15px; }

    .modal-window { padding: 20px; margin: 0 16px; }
    .finance-stats-payment { grid-template-columns: 1fr; }
    .admin-add-form { grid-template-columns: 1fr 1fr; }
    .profile-info-grid { grid-template-columns: 1fr; }
    .profile-password-form { grid-template-columns: 1fr 1fr; }
    .profile-header { flex-direction: column; align-items: stretch; }
    .profile-header .kd-btn { width: 100%; justify-content: center; }

    .calendar-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
        justify-content: center;
    }
    .calendar-month-title { font-size: 18px; }
    .calendar-day-cell { min-height: 60px; padding: 4px; }
    .calendar-day-number { font-size: 12px; }
    .calendar-event { font-size: 8px; padding: 1px 4px; }
    .calendar-legend { gap: 8px; padding: 10px 12px; }
    .calendar-legend-item { font-size: 11px; }
    .sidebar-event-item { flex-wrap: wrap; gap: 8px; }
    .sidebar-event-status { font-size: 10px; padding: 2px 8px; }

    .mini-calendar-wrap .mini-cal-day { min-height: 38px; padding: 3px 1px; }
    .mini-calendar-wrap .mini-cal-day .mini-cal-number { font-size: 12px; }
    .mini-calendar-wrap .mini-cal-day .mini-cal-count { font-size: 7px; }
    .mini-calendar-wrap .mini-cal-header {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    .mini-calendar-wrap .mini-cal-title { font-size: 16px; }
    .mini-calendar-wrap .mini-cal-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 6px 12px;
    }

    .requests-header { flex-direction: column; align-items: stretch; }
    .requests-header .kd-btn { width: 100%; justify-content: center; }
    .requests-tabs { flex-direction: column; }
    .requests-tabs .kd-btn { width: 100%; justify-content: center; }

    .schedule-table { font-size: 12px; }
    .schedule-table th,
    .schedule-table td {
        padding: 4px 6px;
        font-size: 11px;
    }
    .schedule-table .fio-cell { min-width: 120px; }
    .schedule-table .services-list { max-width: 80px; }
    .schedule-table .actions { gap: 2px; }
    .schedule-table .kd-service-book { width: 28px; height: 28px; font-size: 12px; }

    .admin-actions-cell { min-width: 120px; }
    .admin-title { font-size: 22px; }
    .finance-title { font-size: 22px; }
    .finance-payment-card .number { font-size: 20px; }
    .profile-title { font-size: 22px; }

    .kd-footer .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .services-header { flex-direction: column; align-items: stretch; }
    .services-header .kd-btn { width: 100%; justify-content: center; }
    .service-add-actions { flex-direction: column; }
    .service-add-actions .kd-btn { width: 100%; justify-content: center; }
    .request-edit-actions { flex-direction: column; }
    .request-edit-actions .kd-btn { width: 100%; justify-content: center; }

    .groups-page-header { flex-direction: column; align-items: stretch; }
    .groups-page-actions { flex-wrap: wrap; }
    .groups-grid { grid-template-columns: 1fr 1fr; }
    .groups-submit-row { flex-direction: column; }

    .parent-form-container { max-width: 100%; padding: 0 10px; }
    .parent-form-title { font-size: 22px; }
    .parent-form-school { font-size: 16px; }

    .print-modal-content { padding: 16px; margin: 0; }
    .print-modal-btn { width: 100%; justify-content: center; }
    .print-modal-actions { display: flex; flex-direction: column; gap: 8px; }

    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header-right { width: 100%; }
    .page-header-right .kd-btn { flex: 1; justify-content: center; }
    .row-flex { flex-direction: column; }
    .col-flex-6 { min-width: 100%; flex: none; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .groups-grid { grid-template-columns: 1fr 1fr; }
    .service-header { flex-wrap: wrap; gap: 8px; }
    .group-header { flex-wrap: wrap; gap: 8px; }
    .link-input { min-width: 150px; }
    .request-form .form-grid { grid-template-columns: 1fr 1fr; }
    .request-form .services-grid { grid-template-columns: 1fr 1fr; }
    .request-form .form-actions { flex-direction: column; }
    .request-form .form-actions .kd-btn { width: 100%; min-width: unset; }
    .kd-panel-head { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 600px) {
    #notificationDropdown {
        min-width: 300px;
        max-width: 320px;
        right: -60px;
    }
}

@media (max-width: 480px) {
    .kd-content { padding: 10px; }
    .kd-header { padding: 8px 10px; gap: 6px; }
    .kd-header-search input { font-size: 12px; }
    .kd-online-btn {
        font-size: 11px;
        padding: 0 10px;
        height: 32px;
    }
    .kd-header-info .info-item { font-size: 12px; gap: 4px; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .stats-grid .stat-card { padding: 6px 8px !important; }
    .stats-grid .stat-card .stat-number { font-size: 14px !important; }
    .stats-grid .stat-card .stat-label { font-size: 9px !important; }
    .stats-grid .stat-card .stat-label svg { width: 10px !important; height: 10px !important; }

    .kd-soft-panel {
        padding: 0 10px 10px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    .kd-panel-head { padding: 10px 0 6px; }
    .kd-panel-head .fw-800 { font-size: 14px; }

    .form-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .form-actions .kd-btn {
        width: 100%;
        min-width: unset;
        justify-content: center;
    }

    .kd-scenario-grid { grid-template-columns: 1fr; }
    .kd-scenario-card { padding: 12px; }
    .kd-scenario-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 18px;
    }
    .kd-scenario-title { font-size: 14px; }

    .modal-window {
        padding: 16px;
        margin: 0 8px;
        border-radius: 16px;
    }
    .modal-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .btn-submit {
        font-size: 14px;
        padding: 10px;
    }

    .calendar-header {
        padding: 10px 12px;
        flex-direction: column;
        gap: 6px;
    }
    .calendar-month-title { font-size: 16px; }
    .calendar-day-cell { min-height: 48px; padding: 3px; }
    .calendar-day-number { font-size: 11px; }
    .calendar-event { font-size: 7px; padding: 1px 3px; }
    .calendar-weekday { font-size: 9px; padding: 6px 2px; }
    .calendar-sidebar { padding: 12px; }
    .calendar-sidebar-title {
        font-size: 15px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .calendar-legend { gap: 4px; padding: 8px 10px; }
    .calendar-legend-item { font-size: 10px; gap: 4px; }
    .calendar-legend-dot { width: 10px; height: 10px; }
    .sidebar-event-item { padding: 8px 0; }
    .sidebar-event-title { font-size: 13px; }
    .sidebar-event-meta { font-size: 11px; }

    .mini-calendar-wrap .mini-cal-day { min-height: 32px; padding: 2px 1px; }
    .mini-calendar-wrap .mini-cal-day .mini-cal-number { font-size: 11px; }
    .mini-calendar-wrap .mini-cal-day .mini-cal-count { font-size: 6px; }
    .mini-calendar-wrap .mini-cal-weekday { font-size: 9px; padding: 5px 2px; }
    .mini-calendar-wrap .mini-cal-title { font-size: 14px; }
    .mini-calendar-wrap .mini-cal-nav .mini-cal-today {
        font-size: 11px;
        padding: 4px 10px;
    }
    .mini-calendar-wrap .mini-cal-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .schedule-table { font-size: 11px; }
    .schedule-table th,
    .schedule-table td {
        font-size: 9px;
        padding: 3px 4px;
    }
    .schedule-table .fio-cell { min-width: 60px; font-size: 10px; }
    .schedule-table .kd-service-book { width: 24px; height: 24px; font-size: 10px; }

    .kd-service-row { padding: 8px 0; gap: 6px; }
    .kd-service-name { font-size: 13px; }
    .kd-service-price { font-size: 13px; }
    .kd-service-book { width: 26px; height: 26px; font-size: 11px; }

    .form-group { margin-bottom: 12px; }
    .form-group label { font-size: 13px; }
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 13px;
    }

    .kd-btn {
        height: 38px;
        padding: 0 14px;
        font-size: 13px;
        border-radius: 12px;
    }
    .kd-btn-sm {
        height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }

    .page-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .requests-title { font-size: 22px; }
    .requests-tabs .kd-btn {
        font-size: 12px;
        padding: 6px 14px;
    }
    .requests-empty { padding: 24px 12px; }
    .requests-empty i { font-size: 32px; }
    .requests-empty p { font-size: 15px; }

    .admin-title { font-size: 20px; }
    .admin-add-form { grid-template-columns: 1fr; }
    .admin-actions-cell { min-width: auto; }
    .admin-actions-wrap { gap: 2px; }
    .admin-actions-wrap .kd-service-book { width: 28px; height: 28px; font-size: 12px; }
    .admin-modal-window { max-width: 100%; padding: 16px; }
    .admin-modal-input { padding: 8px 12px; font-size: 13px; }

    .finance-title { font-size: 20px; }
    .finance-payment-card { padding: 12px; }
    .finance-payment-card .number { font-size: 18px; }
    .finance-debt-cell { font-size: 11px; }
    .finance-empty { padding: 20px 0; }
    .finance-empty i { font-size: 16px; }
    .finance-hint-content { padding: 12px 0; }
    .finance-hint-content i { font-size: 20px; }
    .finance-hint-content p { font-size: 13px; }

    .profile-title { font-size: 20px; }
    .profile-info-grid { gap: 8px; }
    .profile-password-form { grid-template-columns: 1fr; }
    .profile-success,
    .profile-error {
        padding: 10px 12px;
        font-size: 13px;
    }

    .kd-footer .footer-copy {
        font-size: 11px;
        flex-direction: column;
        gap: 2px;
    }

    #quickRequestModal .modal-title { font-size: 18px; }
    #quickRequestModal .modal-window { padding: 16px; }
    #quickRequestModal .form-group input,
    #quickRequestModal .form-group select,
    #quickRequestModal .form-group textarea {
        padding: 6px 10px;
        font-size: 13px;
    }
    #quickRequestModal .services-checkboxes { padding: 8px; }
    #quickRequestModal .services-checkboxes .service-label {
        font-size: 12px;
        padding: 4px 6px;
    }
    #quickRequestModal .form-grid { grid-template-columns: 1fr; }
    #quickRequestModal .services-checkboxes { grid-template-columns: 1fr; }
    #quickRequestModal .modal-actions { flex-direction: column; }
    #quickRequestModal .modal-actions .submit-btn,
    #quickRequestModal .modal-actions .cancel-btn { width: 100%; }

    .services-title { font-size: 22px; }
    .service-add-title { font-size: 22px; }
    .service-add-grid { grid-template-columns: 1fr; }
    .request-edit-title { font-size: 22px; }
    .request-edit-grid { grid-template-columns: 1fr; }
    .request-edit-services-grid { grid-template-columns: 1fr; }
    .search-title { font-size: 22px; }
    .tasks-title { font-size: 22px; }
    .groups-page-title { font-size: 22px; }
    .groups-grid { grid-template-columns: 1fr; }
    .groups-student-card { font-size: 12px; padding: 4px 8px; }

    .parent-form-title { font-size: 20px; }
    .parent-form-container { padding: 0 6px; }

    .page-title { font-size: 22px; }
    .info-grid { grid-template-columns: 1fr; }
    .groups-grid { grid-template-columns: 1fr; }
    .request-form .form-grid { grid-template-columns: 1fr; }
    .request-form .services-grid { grid-template-columns: 1fr; }
    .request-form .form-group input,
    .request-form .form-group select,
    .request-form .form-group textarea {
        padding: 8px 12px;
        font-size: 13px;
    }
    .request-form .form-group label { font-size: 13px; }
    .link-input { min-width: 100px; font-size: 13px; padding: 8px 12px; }
    .service-header { padding: 10px 12px; font-size: 14px; }
    .group-header { padding: 8px 12px; font-size: 14px; }
    .note-item { padding: 8px 12px; }
    .note-title { font-size: 13px; }
    .note-content { font-size: 12px; }
}
