/* ============================================================
   Дизайн-система СНПХ — компонентные стили (без @apply)
   Используется вместе с Tailwind CSS CDN
   ============================================================ */

/* ---- Кнопки ---- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 12px;
    letter-spacing: 0.04em; font-weight: 600;
    background: #002179; color: #FFFFFF; padding: 12px 20px;
    border: none; cursor: pointer; transition: all 0.15s;
    user-select: none; min-height: 44px;
    box-shadow: 0 2px 0 #00154d;
}
.btn-primary:hover { background: #00154d; }
.btn-primary:active { transform: translateY(1px); box-shadow: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 0 2px 0 #00154d; }

.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 12px;
    letter-spacing: 0.04em; font-weight: 600;
    background: #FFFFFF; color: #1A1A1A; padding: 12px 20px;
    border: 2px solid #1A1A1A; cursor: pointer; transition: background 0.15s;
    user-select: none; min-height: 44px;
}
.btn-outline:hover { background: #F2F2F2; }
.btn-outline:active { background: #E8E8E8; }

.btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 12px;
    letter-spacing: 0.04em; font-weight: 600;
    background: #D30410; color: #FFFFFF; padding: 12px 20px;
    border: none; cursor: pointer; transition: all 0.15s;
    user-select: none; min-height: 44px;
    box-shadow: 0 2px 0 #a0030c;
}
.btn-danger:hover { background: #a0030c; }
.btn-danger:active { transform: translateY(1px); box-shadow: none; }

.btn-sm { padding: 6px 12px; font-size: 11px; min-height: 36px; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 2px solid #D1D1D1; background: #FFFFFF;
    color: #666666; cursor: pointer; transition: all 0.15s;
}
.btn-icon:hover { border-color: #1A1A1A; color: #1A1A1A; background: #F2F2F2; }

/* ---- Таблицы ---- */
.table-snph { width: 100%; border-collapse: collapse; }
.table-snph thead th {
    font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 11px;
    letter-spacing: 0.04em; font-weight: 600;
    color: #666666; padding: 12px 16px; text-align: left;
    border: 1px solid #D1D1D1; background: #F2F2F2;
}
.table-snph tbody td {
    padding: 12px 16px; border: 1px solid #D1D1D1; font-size: 14px;
}
.table-snph tbody tr:hover { background: #F2F2F2; }
.table-snph tbody tr { cursor: pointer; }

/* ---- Инпуты ---- */
.input-snph {
    width: 100%; padding: 10px 14px; border: 2px solid #D1D1D1;
    background: #FFFFFF; font-size: 14px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.15s; min-height: 44px;
    border-radius: 0; -webkit-appearance: none; appearance: none;
}
.input-snph:focus { border-color: #002179; }
.input-snph.error { border-color: #D30410; background: #FFDAD6; }

/* ---- Селекты ---- */
.select-snph {
    width: 100%; padding: 10px 36px 10px 14px; border: 2px solid #D1D1D1;
    background: #FFFFFF; font-size: 14px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.15s; min-height: 44px;
    border-radius: 0; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.select-snph:focus { border-color: #002179; }

/* ---- Бейджи/статусы ---- */
.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
    border: 1px solid; font-size: 11px;
    font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.04em;
    font-weight: 600;
}
.badge-new { border-color: #002179; color: #002179; background: #dfe4f2; }
.badge-downloaded { border-color: #166534; color: #166534; background: #dcfce7; }
.badge-error { border-color: #D30410; color: #D30410; background: #FFDAD6; }

/* ---- Карточки ---- */
.card { background: #FFFFFF; border: 2px solid #1A1A1A; padding: 24px; }

/* ---- Хелперы ---- */
.no-wrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Полоса прокрутки ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F2F2F2; }
::-webkit-scrollbar-thumb { background: #D1D1D1; }

/* ---- Модальные окна ---- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(26, 26, 26, 0.6); z-index: 200; justify-content: center; align-items: flex-start; padding-top: 10vh; }
.modal-overlay.active { display: flex; }
.modal-snph { background: #FFFFFF; border: 2px solid #1A1A1A; width: 520px; max-width: 90vw; max-height: 80vh; overflow-y: auto; animation: modalIn 0.15s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 2px solid #D1D1D1; }
.modal-header h3 { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.04em; font-size: 16px; font-weight: 700; margin: 0; }
.modal-close { width: 44px; height: 44px; border: 2px solid #D1D1D1; background: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #666666; transition: all 0.15s; }
.modal-close:hover { border-color: #1A1A1A; color: #1A1A1A; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 2px solid #D1D1D1; display: flex; justify-content: flex-end; gap: 8px; }

/* ---- Спиннер ---- */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #D1D1D1; border-top-color: #002179; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Текст ошибки ---- */
.error-text { color: #D30410; font-size: 12px; margin-top: 4px; }
