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

:root {
    /* Космическая палитра */
    --primary-color: #7f5af0;      /* фиолетовый неон */
    --primary-dark: #4b3ac7;
    --success-color: #2cb67d;      /* зелёный неон */
    --danger-color: #ff6b6b;
    --warning-color: #fbbf24;
    --info-color: #3b82f6;
    --secondary-color: #9ca3af;

    --bg-color: #020617;          /* почти чёрный космос */
    --card-bg: rgba(15, 23, 42, 0.95); /* полупрозрачные панели */
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --border-color: rgba(148, 163, 184, 0.35);

    --shadow: 0 0 20px rgba(79, 70, 229, 0.25);
    --shadow-lg: 0 0 35px rgba(129, 140, 248, 0.35);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.12), transparent 55%),
        radial-gradient(circle at 50% 0%, rgba(244, 114, 182, 0.08), transparent 55%),
        #020617;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.22), transparent 55%),
        #020617;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    margin-top: 30px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Navbar */
.navbar {
    background: linear-gradient(90deg, rgba(15,23,42,0.98), rgba(30,64,175,0.9));
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    position: relative;
}

.nav-menu-toggle {
    padding: 8px 16px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.nav-menu-dropdown {
    position: absolute;
    right: 0;
    top: 110%;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 220px;
    display: none;
    flex-direction: column;
    z-index: 200;
}

.nav-menu-dropdown.open {
    display: flex;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
    padding: 10px 16px;
    display: block;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.logout {
    color: var(--danger-color);
}

.nav-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 24px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 10px 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
    font-size: 18px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
}

.stat-info h3 {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

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

.stat-primary .stat-icon {
    background: rgba(99, 102, 241, 0.1);
}

.stat-success .stat-icon {
    background: rgba(16, 185, 129, 0.1);
}

.stat-warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
}

.stat-danger .stat-icon {
    background: rgba(239, 68, 68, 0.1);
}

.stat-info .stat-icon {
    background: rgba(59, 130, 246, 0.1);
}

.stat-secondary .stat-icon {
    background: rgba(107, 114, 128, 0.1);
}

/* Requests Section */
.requests-section {
    background: radial-gradient(circle at 0 0, rgba(56,189,248,0.08), transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(129,140,248,0.1), transparent 55%),
                var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.request-card {
    background: radial-gradient(circle at 0 0, rgba(129,140,248,0.1), transparent 60%),
                rgba(15,23,42,0.96);
    border: 1px solid rgba(148,163,184,0.5);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.request-card-compact {
    padding: 10px 12px;
}

.request-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.request-card.unanswered {
    border-left: 4px solid var(--warning-color);
    background: #fffbeb;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.request-id {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-vip {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    color: #111827;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    font-weight: 700;
}

/* Постоянный клиент — серебро (не золото как ВИП) */
.hint-gold {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
    color: #fbbf24;
}
.hint-silver {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
    color: #94a3b8;
}

.badge-regular-client {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 45%, #cbd5e1 100%);
    color: #0f172a;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.55);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.request-body {
    margin-bottom: 16px;
}

.request-field {
    margin-bottom: 8px;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.request-field strong {
    color: var(--text-primary);
    margin-right: 8px;
}

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

/* Search Form */
.search-form {
    max-width: 400px;
}

.search-form .form-group select,
.search-form .form-group input {
    max-width: 100%;
}

/* Request Detail */
.request-detail {
    max-width: 1000px;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

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

.detail-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item strong {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.question-box {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    /* Аккуратный перенос длинных слов/строк, чтобы текст не вылезал за рамки */
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

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

.link-item {
    display: flex;
}

.link-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.link-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.response-box {
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.response-discount {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.response-rejection {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.response-other {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.2);
    color: var(--info-color);
}

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

.action-panel h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.response-form {
    margin-bottom: 24px;
}

.response-form .form-group input[type="text"],
.response-form .form-group textarea {
    width: 100%;
    margin-top: 6px;
}

.response-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.ban-section {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.info-box {
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    color: var(--success-color);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 18px;
}

.banned-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-left: 4px solid var(--danger-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

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

.banned-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    font-size: 14px;
}

.text-muted {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .response-buttons {
        flex-direction: column;
    }
}

/* User Statistics Card */
.user-statistics-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.user-statistics-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.stat-mini {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

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

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

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

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

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

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

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

/* User Requests List */
.user-requests-list {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.user-requests-list h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.requests-list-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.request-card-mini {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.request-card-mini:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.request-card-mini.current {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    border-width: 3px;
}

.request-card-mini.unanswered {
    border-left: 4px solid var(--warning-color);
    background: #fffbeb;
}

.request-header-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.request-id-mini {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.request-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.request-link:hover {
    text-decoration: underline;
}

.request-status-mini {
    display: flex;
    gap: 8px;
}

.badge-sm {
    padding: 3px 10px;
    font-size: 11px;
}

.request-body-mini {
    font-size: 13px;
}

.request-field-mini {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.request-field-mini strong {
    color: var(--text-primary);
    margin-right: 6px;
}

/* Expandable question in user requests list */
.question-details-mini {
    cursor: pointer;
}

.question-details-mini summary {
    list-style: none;
}

.question-details-mini summary::-webkit-details-marker {
    display: none;
}

.question-details-mini summary {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.35;
}

.question-label {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: inline;
    margin-right: 6px;
}

.question-short {
    margin: 0;
    display: inline;
}

.question-full-inline {
    display: none;
    margin-top: 0;
}

.question-details-mini[open] summary .question-short,
.question-details-mini[open] summary .question-hint {
    display: none;
}

.question-details-mini[open] summary .question-full-inline {
    display: block;
}

.question-hint {
    font-size: 11px;
    color: var(--text-secondary);
}

.question-full-mini {
    margin-top: 0;
    font-size: 13px;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* When full text is shown in-place, avoid extra spacing */
.question-full-inline.question-full-mini {
    margin-top: 0;
}

/* Ensure long questions in user requests list wrap correctly */
.request-field-mini,
.request-field-mini span,
.request-field-mini div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Modal (extra response) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 500;
}

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

.modal {
    width: 100%;
    max-width: 640px;
    background: radial-gradient(circle at 0 0, rgba(129,140,248,0.12), transparent 60%),
                var(--card-bg);
    border: 1px solid rgba(148,163,184,0.5);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.modal-close:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.modal-body {
    padding: 14px 16px 0 16px;
}

.modal-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
}

.modal textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(2, 6, 23, 0.65);
    color: var(--text-primary);
}

.modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px 16px 16px;
}

/* Примечание к клиенту: компактный столбик, моноширинный текст */
.client-note-compact {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
}

.client-note-compact > strong {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.client-note-body {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--text-primary);
}

.client-note-compact.client-note-empty .client-note-body {
    color: var(--text-secondary);
    font-style: italic;
}

textarea.client-note-input {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.form-group.client-note-group {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.06);
}

.form-group.client-note-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.client-note-hint {
    display: block;
    margin: 4px 0 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Обложка клиента: ID, Telegram, постоянный, примечание */
.client-cover-title {
    margin: 0 0 14px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.client-cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 20px;
    margin-bottom: 16px;
}

.client-cover-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.client-cover-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.client-cover-value {
    font-size: 15px;
    color: var(--text-primary);
    word-break: break-word;
}

.client-cover-mono {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.client-cover-muted {
    color: var(--text-secondary);
    font-style: italic;
}

.client-cover-note-block {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-cover-note-text {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    margin: 0;
}

.client-cover-note-empty {
    color: var(--text-secondary);
    font-style: italic;
}

.client-cover-note-form {
    margin-top: 4px;
}

.client-cover-note-form .current-client-note-box {
    margin-bottom: 10px;
}

/* Компактная обложка в списках заявок */
.client-cover-strip {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.client-cover-strip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: baseline;
    margin-bottom: 8px;
}
.client-cover-strip .ccs-item {
    font-size: 13px;
    color: var(--text-primary);
}
.client-cover-strip .ccs-lbl {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-right: 6px;
}
.client-cover-strip .ccs-val {
    word-break: break-word;
}
.client-cover-strip .ccs-note-line {
    font-size: 13px;
    line-height: 1.45;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.client-cover-strip .ccs-note-text {
    display: inline;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-section-title-inline {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
}

.form-label-main {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.current-client-note-box {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border-color);
}

.current-client-note-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.current-client-note-body {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-line;
    word-break: break-word;
    color: var(--text-primary);
}

.current-client-note-empty {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

label.client-note-edit-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}


