.client-details-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.client-info-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e6ed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.client-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.client-name {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.client-code {
    background: #3498db;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.info-toggle {
    margin: 15px 0;
}

.btn-toggle {
    background: #7f8c8d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-toggle:hover {
    background: #95a5a6;
}

.detailed-info {
    display: none;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.detailed-info.show {
    display: block;
}

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

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .info-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-label {
    font-weight: bold;
    min-width: 150px;
    color: #34495e;
    flex-shrink: 0;
}

.info-value {
    color: #2c3e50;
    word-break: break-word;
}

.section-header {
    background: #ecf0f1;
    padding: 15px 20px;
    margin: 30px -20px 20px -20px;
    border-left: 4px solid #3498db;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.data-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px; /* по стандарту было 15, нужно либо оставить уменьшенный шрифт, либо добавить горизонтальную прокрутку */
    background: #fff;
    font-size: 13px; /* было 14 */
    min-width: 900px;
}

.data-table th,
.data-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e0e6ed;
    vertical-align: top;
}

.data-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:nth-child(even) {
    background: #fdfdfd;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
}

.form-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #34495e;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

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

.section-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e6ed;
    text-align: right;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 15px 0;
}

.client-type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.type-physical {
    background: #e8f5e8;
    color: #27ae60;
}

.type-legal {
    background: #e8f4f8;
    color: #3498db;
}

.type-ip {
    background: #fef5e8;
    color: #f39c12;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active {
    background: #e8f5e8;
    color: #27ae60;
}

.status-pending {
    background: #fef5e8;
    color: #f39c12;
}

.status-completed {
    background: #e8f4f8;
    color: #3498db;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-container label {
    margin: 0;
    cursor: pointer;
}

.money-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: right;
}

.money-rub {
    color: #27ae60;
}

.money-usd {
    color: #3498db;
}

.money-debt {
    color: #e74c3c;
}

/* Validation styles */
.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-control.error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}
