/* Общие стили Beauty CRM. */
* {
    box-sizing:border-box
}

body {
    margin:0;
    background:#fff;
    color:#1e293b;
    font:14px system-ui,-apple-system,Segoe UI,sans-serif
}

header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #e2e8f0;
    padding:17px max(20px,calc((100vw - 950px)/2))
}

nav {
    display:flex;
    gap:6px
}

nav a {
    padding:11px 15px;
    border-radius:9px;
    color:#64748b;
    text-decoration:none;
    font-weight:600
}

nav a.active,nav a:hover {
    background:#f1f5f9;
    color:#0f172a
}

button {
    cursor:pointer;
    font:inherit
}

#logout,.secondary {
    border:1px solid #e2e8f0;
    border-radius:9px;
    background:#fff;
    padding:10px 14px;
    font-weight:600
}

main {
    max-width:950px;
    margin:34px auto;
    padding:0 20px
}

.crumb,.hint {
    font-size:12px;
    color:#94a3b8
}

h1 {
    font-size:27px;
    margin:8px 0 27px
}

h2 {
    font-size:16px;
    margin:0 0 20px
}

section {
    border:1px solid #e2e8f0;
    border-radius:13px;
    padding:24px;
    margin-bottom:20px
}

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

label {
    font-size:12px;
    font-weight:600;
    color:#64748b
}

input:not([type=file]),textarea,select {
    display:block;
    width:100%;
    min-width:0;
    margin-top:8px;
    border:1px solid #e2e8f0;
    border-radius:9px;
    padding:12px;
    background:#fff;
    color:#334155;
    font:14px system-ui
}

input:focus,textarea:focus,select:focus {
    outline:2px solid #cbd5e1
}

textarea {
    resize:vertical
}

.services {
    padding:0;
    overflow:visible
}

.sectionhead {
    padding:20px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px
}

.sectionhead h2 {
    margin:0
}

.scroll {
    overflow-x:auto
}

table {
    border-collapse:collapse;
    width:100%;
    min-width:610px
}

th {
    text-align:left;
    background:#f8fafc;
    color:#64748b;
    font-size:12px;
    padding:13px
}

td {
    padding:11px 10px;
    border-top:1px solid #f1f5f9
}

td:first-child,th:first-child {
    padding-left:24px;
    width:50px
}

td:last-child {
    width:40px
}

td input,td select {
    margin:0!important
}

td input[type=number] {
    width:100px
}

.delete {
    border:0;
    background:none;
    color:#94a3b8;
    font-size:22px
}

.total {
    border-top:1px solid #e2e8f0;
    background:#f8fafc;
    padding:19px 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-radius:0 0 13px 13px
}

.total strong {
    font-size:24px
}

.photos {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px
}

.photo {
    height:140px;
    border:2px dashed #cbd5e1;
    border-radius:12px;
    background:#fafbfc;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    font-size:28px;
    cursor:pointer;
    position:relative;
    overflow:hidden
}

.photo span {
    font-size:12px
}

.photo input {
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer
}

.photo img {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    pointer-events:none
}

.actions {
    display:flex;
    justify-content:flex-end;
    gap:12px
}

.primary {
    background:#0f172a;
    color:white;
    border:0;
    border-radius:9px;
    padding:12px 20px;
    font-weight:600
}

#message {
    text-align:right;
    color:#64748b;
    font-size:12px
}

.type-other {
    margin-top:8px!important
}

@media(max-width:600px) {
    header {
        padding:12px
    }
    nav a {
        padding:9px 7px;
        font-size:12px
    }
    main {
        margin:20px auto;
        padding:0 12px
    }
    section {
        padding:17px
    }
    .fields {
        grid-template-columns:1fr
    }
    .photos {
        gap:7px
    }
    .photo {
        height:100px
    }
    .sectionhead {
        padding:17px
    }
}

.total {
    border-radius:0
}

.payment {
    border-top:1px solid #e2e8f0;
    padding:20px 24px 24px
}

.payment h3 {
    font-size:15px;
    margin:0 0 16px
}

.payment-fields {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px
}

.payment-difference {
    margin-top:17px;
    padding:12px 15px;
    border-radius:9px;
    font-size:15px;
    font-weight:700
}

.payment-difference[hidden] {
    display:none
}

.payment-difference.debt {
    background:#fef2f2;
    color:#b91c1c
}

.payment-difference.overpayment {
    background:#f0fdf4;
    color:#15803d
}

@media(max-width:600px) {
    .payment {
        padding:17px
    }
    .payment-fields {
        grid-template-columns:1fr;
        gap:15px
    }
}

/* Отдельное оформление постоянной информации о клиенте. */
.client-info {
    background: #f3f7fc;
    border-color: #d9e5f3;
}

.client-info .client-note-field {
    grid-column: 1 / -1;
}

.client-info .client-note-field textarea {
    min-height: 88px;
    background: #fff;
}
