* { box-sizing: border-box; }

body { font-family: system-ui, sans-serif;
 max-width: 900px;
  margin: 2rem auto;
   padding: 0 1rem; }

table { width: 100%;
 border-collapse: collapse;
  margin-top: 1rem; }
th, td { border: 1px solid #ccc;
 padding: .5rem;
  text-align: left; }

th { background: #f4f4f4; }

form { display: flex;
 flex-direction: column;
  gap: .8rem;
   max-width: 400px;
    margin-top: 1rem; }


input, button { padding: .5rem;
 font: inherit; }

.icon-btn {
  /* Визуально иконка может быть 24px, но область нажатия — 44px */
  width: 24px;
  height: 24px;
  padding: 10px; /* (24 + 10 + 10) = 44px */
  box-sizing: border-box;
}

/* Стили для всех устройств (включая мобильные) */
.button {
  background-color: #007bff;
  padding: 10px
}

/* Эффект наведения применяем ТОЛЬКО на устройствах с курсором */
@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background-color: #0056b3;
  }
}

/* Для тач-устройств лучше использовать :active (состояние нажатия) */
.button:active {
  background-color: #004085;
  transform: scale(0.98);
}

button { cursor: pointer; }
.alert { padding: .7rem 1rem; border-radius: 6px; margin: 1rem 0; }
.alert.success { background: #e6ffed; color: #1a7f37; }
.alert.error { background: #ffecec; color: #b00020; }
a { color: #0366d6; }
.bar { border-left: 3px solid #ccc; padding-left: .8rem; margin-bottom: 1rem; }


/* ============================================
   Базовые стили
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: #f6f4f1;
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
}

/* ============================================
   Обёртка страницы и карточка
   ============================================ */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 560px;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Заголовок
   ============================================ */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #718096;
}

/* ============================================
   Алерты (успех/ошибка)
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.alert.success {
    background: #f0fff4;
    border-left: 4px solid #38a169;
    color: #22543d;
}
.alert.success .alert-icon {
    background: #38a169;
    color: #fff;
}

.alert.error {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    color: #742a2a;
}
.alert.error .alert-icon {
    background: #e53e3e;
    color: #fff;
}

/* ============================================
   Форма
   ============================================ */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f7fafc;
    color: #2d3748;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input[type="text"]:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.form-group input[type="text"]::placeholder {
    color: #a0aec0;
}

.hint {
    font-size: 12px;
    color: #a0aec0;
    font-style: italic;
}

/* ============================================
   Drop-зона для файла
   ============================================ */
.file-drop {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-drop:hover,
.file-drop.dragover {
    border-color: #667eea;
    background: #edf2ff;
}

.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.file-icon {
    font-size: 32px;
    line-height: 1;
}

.file-text {
    font-size: 14px;
    color: #4a5568;
}

.file-text u {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.file-name {
    font-size: 13px;
    color: #38a169;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-name.visible {
    opacity: 1;
}

/* ============================================
   Кнопки
   ============================================ */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: #5c554d;
    color: #fff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    flex: 1;
}

.btn-primary:hover {
    background: #46403a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    color: #2d3748;
}

/* ============================================
   Адаптив
   ============================================ */
@media (max-width: 480px) {
    .card {
        padding: 24px 20px;
    }

    .card-header h1 {
        font-size: 22px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }
}
.container { display: flex; }

@media (max-width: 600px) {
    .container { flex-direction: column; }
}