:root {
    --bg: #f2f2f7;
    --card: #ffffff;
    --text: #1c1c1e;
    --muted: #636366;
    --line: #e5e5ea;
    --primary: #ff3b30;
    --primary-dark: #d92c23;
    --success: #34c759;
    --success-dark: #28a745;
    --warning: #ff9f0a;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.hero {
    background: linear-gradient(180deg, #ff3b30, #d70015);
    color: #fff;
    box-shadow: 0 10px 24px rgba(215, 0, 21, 0.18);
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
}

.emergency-banner {
    background: linear-gradient(180deg, #ff453a, #d70015);
    color: #fff;
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 24px rgba(215, 0, 21, 0.16);
    font-size: 15px;
}

h1,
h2,
h3 {
    margin-top: 0;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

h2,
h3 {
    font-weight: 700;
}

.section-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #b8c7ff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button,
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 13px 18px;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.15s ease;
}

button:hover,
.btn:hover {
    background: var(--primary-dark);
}

button:active,
.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #eef1f5;
    color: var(--text);
}

.btn-secondary:hover {
    background: #dde3ea;
}

.btn-danger {
    background: var(--primary);
    color: #fff;
}

.btn-danger:hover {
    background: var(--primary-dark);
}

.call-btn {
    background: var(--success);
    color: #fff;
}

.call-btn:hover {
    background: var(--success-dark);
}

.inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 15px;
}

.alert-success {
    background: #e9f8ee;
    color: #146c2e;
}

.alert-error {
    background: #fff1f0;
    color: #b42318;
}

.badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin: 6px 8px 0 0;
}

.badge-danger {
    background: #ffe5e3;
    color: #c62828;
}

.badge-ok {
    background: #e9f7ee;
    color: #1b7f46;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table th {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
    background: #fafafa;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.code {
    background: #111827;
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    display: inline-block;
    font-family: monospace;
    font-size: 14px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    background: #f8f8fa;
    border: 1px solid #ececf1;
    border-radius: 16px;
    padding: 16px;
}

.contact-item strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

.contact-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 6px;
}

@media (max-width: 640px) {
    .container {
        padding: 16px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    button,
    .btn {
        width: 100%;
        text-align: center;
    }

    .inline-actions {
        flex-direction: column;
    }
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.field {
    display: flex;
    flex-direction: column;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.brand a {
    text-decoration: none;
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand a:hover {
    color: var(--primary);
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions .btn {
    min-width: 96px;
    text-align: center;
}

@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand a {
        font-size: 22px;
    }

    .actions {
        width: 100%;
    }

    .actions .btn {
        flex: 1 1 auto;
    }
}