@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.container {
    max-width: 520px;
    margin: 60px auto;
    padding: 32px 28px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.02);
}
h1 { font-size: 24px; font-weight: 600; margin: 0 0 16px; color: #0f172a; }
h2 { font-size: 18px; font-weight: 600; margin: 20px 0 10px; color: #334155; }
p { margin: 0 0 12px; }
a { color: #1e40af; text-decoration: none; }
a:hover { text-decoration: underline; }
label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 4px; color: #475569; }
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    background: #fff;
}
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    background: #1e3a8a;
    color: #fff;
}
button:hover, .btn:hover { background: #1e40af; }
button:disabled, .btn:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-ghost { background: #fff; color: #1e3a8a; border: 1px solid #cbd5e1; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-danger { background: #b91c1c; }
.btn-danger:hover { background: #991b1b; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover { background: #cbd5e1; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
th { font-weight: 600; color: #64748b; background: #f8fafc; }
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15,23,42,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}
.modal-header { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.modal-body { margin-bottom: 20px; font-size: 14px; color: #475569; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; }
.modal-footer button { width: auto; min-width: 100px; }
.buttons-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
/* Широкий контейнер для служебной панели */
.container-wide {
    max-width: 90%;
    margin: 40px auto;
    padding: 32px 28px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.02);
}

/* Перенос строк в ячейках таблицы */
table td {
    word-break: break-word;
    overflow-wrap: break-word;
}
.container-wide {
    max-width: 90%;
    margin: 40px auto;
    padding: 32px 28px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.04);
}