/* ── Stonepedia Suppliers: кабинет поставщика ── */

.sp-wrap {
    max-width: 680px;
    margin: 36px auto;
    padding: 0 16px 48px;
}
.sp-wrap--wide {
    max-width: 860px;
}

/* ── Notices ── */
.sp-notice {
    border-radius: var(--radius, 8px);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.55;
}
.sp-notice a { text-decoration: underline; }
.sp-notice-success {
    background: #F0FBF5;
    border: 1px solid #A8D8BA;
    color: #1A5C3A;
}
.sp-notice-error {
    background: #FFF5F5;
    border: 1px solid #F5BCBC;
    color: #9B2B2B;
}
.sp-notice-info {
    background: var(--soft, #F7F6F4);
    border: 1px solid var(--border, #E8E6E1);
    color: var(--muted, #6B6860);
}

/* ── Card ── */
.sp-card {
    background: var(--bg, #fff);
    border: 1px solid var(--border, #E8E6E1);
    border-radius: var(--radius, 8px);
    padding: 28px 32px;
    margin-bottom: 20px;
}
.sp-card-header {
    margin-bottom: 22px;
}

/* ── Typography ── */
.sp-title {
    font-size: 23px;
    font-weight: 600;
    color: var(--text, #1A1917);
    letter-spacing: -0.025em;
    margin-bottom: 6px;
    line-height: 1.2;
}
.sp-subtitle {
    font-size: 14px;
    color: var(--muted, #6B6860);
}
.sp-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #1A1917);
    margin-bottom: 4px;
}
.sp-section-sub {
    font-size: 13px;
    color: var(--muted, #6B6860);
    line-height: 1.5;
}

/* ── Form ── */
.sp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sp-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text, #1A1917);
}
.sp-req { color: #C0392B; }
.sp-input {
    width: 100%;
    border: 1px solid var(--border, #E8E6E1);
    border-radius: var(--radius, 8px);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text, #1A1917);
    font-family: var(--font, sans-serif);
    background: var(--bg, #fff);
    transition: border-color .15s, box-shadow .15s;
}
.sp-input:focus {
    outline: none;
    border-color: var(--accent, #3D3B36);
    box-shadow: 0 0 0 3px rgba(61,59,54,.09);
}

/* ── Buttons ── */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius, 8px);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font, sans-serif);
    padding: 11px 24px;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
    transition: opacity .15s, background .15s;
    line-height: 1;
    white-space: nowrap;
}
.sp-btn-primary {
    background: var(--accent, #3D3B36);
    color: #F1EFE8;
    width: 100%;
    font-size: 15px;
}
.sp-btn-primary:hover { opacity: .82; color: #F1EFE8; }
.sp-btn-outline {
    background: var(--bg, #fff);
    color: var(--text, #1A1917);
    border: 1px solid var(--border, #E8E6E1);
    padding: 8px 16px;
    font-size: 13px;
}
.sp-btn-outline:hover { background: var(--soft, #F7F6F4); color: var(--text, #1A1917); }

.sp-form-footer {
    text-align: center;
    font-size: 13px;
    color: var(--muted, #6B6860);
    margin-top: 4px;
}
.sp-form-footer a {
    color: var(--accent, #3D3B36);
    text-decoration: underline;
}

/* ── Dashboard header ── */
.sp-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

/* ── Upload area ── */
.sp-upload-area {
    position: relative;
    border: 2px dashed var(--border, #E8E6E1);
    border-radius: var(--radius, 8px);
    padding: 40px 24px 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin-bottom: 16px;
    background: var(--bg, #fff);
}
.sp-upload-area:hover,
.sp-upload-area.sp-drop-over {
    border-color: var(--accent, #3D3B36);
    background: var(--soft, #F7F6F4);
}
.sp-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.sp-upload-icon {
    font-size: 32px;
    color: var(--muted, #6B6860);
    margin-bottom: 10px;
    line-height: 1;
}
.sp-upload-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text, #1A1917);
    margin-bottom: 5px;
}
.sp-upload-hint {
    font-size: 12px;
    color: var(--muted, #6B6860);
}

/* ── Chosen files preview ── */
.sp-chosen-files {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    position: relative;
    z-index: 3;
}
.sp-chosen-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #E8E6E1);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    gap: 12px;
}
.sp-ci-name {
    color: var(--text, #1A1917);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.sp-ci-size {
    color: var(--muted, #6B6860);
    flex-shrink: 0;
    font-size: 12px;
}

/* ── Files table ── */
.sp-table-wrap { overflow-x: auto; }
.sp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sp-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted, #6B6860);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 0 16px 10px 0;
    border-bottom: 1px solid var(--border, #E8E6E1);
}
.sp-table th:last-child { padding-right: 0; }
.sp-table td {
    padding: 13px 16px 13px 0;
    border-bottom: 1px solid var(--border, #E8E6E1);
    vertical-align: middle;
    color: var(--text, #1A1917);
}
.sp-table td:last-child { padding-right: 0; }
.sp-table tr:last-child td { border-bottom: none; }
.sp-td-name {
    font-weight: 500;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-td-type { color: var(--muted, #6B6860); font-size: 12px; }
.sp-td-date { color: var(--muted, #6B6860); white-space: nowrap; }

/* ── Status badges ── */
.sp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.sp-badge--received   { background: #EEF2FF; color: #4338CA; }
.sp-badge--processing { background: #FFFBEB; color: #92400E; }
.sp-badge--done       { background: #F0FBF5; color: #1A6B4A; }

.sp-empty {
    text-align: center;
    font-size: 14px;
    color: var(--muted, #6B6860);
    padding: 28px 0;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .sp-card { padding: 20px 16px; }
    .sp-dashboard-header { flex-direction: column; }
    .sp-table th:nth-child(2),
    .sp-table td:nth-child(2) { display: none; }
}
