:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8f9ff;
    --text: #1d2233;
    --muted: #6f7485;
    --border: #dfe3f2;
    --border-soft: #e9ecf8;

    --accent: #6256e8;
    --accent-2: #8a7dff;
    --accent-dark: #4b40d4;

    --success: #1f9d63;
    --warning: #c98a00;
    --danger: #d64545;

    --shadow: 0 18px 45px rgba(43, 54, 116, 0.10);
    --shadow-soft: 0 8px 24px rgba(43, 54, 116, 0.08);

    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background:
        radial-gradient(circle at top left, #eef1ff 0, transparent 34%),
        radial-gradient(circle at top right, #f4ecff 0, transparent 28%),
        linear-gradient(180deg, #f7f8fc 0%, #eef2f8 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-shell {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 42px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 26px rgba(98, 86, 232, 0.28);
}

.brand-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(223,227,242,0.95);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.panel {
    padding: 28px;
}

.panel h1,
.panel h2,
.panel h3 {
    margin-top: 0;
    letter-spacing: -0.02em;
}

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

.form-grid {
    display: grid;
    gap: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    padding: 14px 16px;
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(98, 86, 232, 0.12);
}

.button,
button,
input[type="submit"] {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.06s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.button:active,
button:active,
input[type="submit"]:active {
    transform: translateY(1px);
}

.button-primary,
button,
input[type="submit"] {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(98, 86, 232, 0.22);
}

.button-secondary {
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.button-danger {
    color: #fff;
    background: linear-gradient(135deg, #d64545, #ea6a6a);
    box-shadow: 0 10px 24px rgba(214, 69, 69, 0.2);
}

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

.notice {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.notice-error {
    color: #7f1d1d;
    background: #fff1f1;
    border: 1px solid #f1caca;
}

.notice-success {
    color: #14532d;
    background: #edfdf3;
    border: 1px solid #ccefd9;
}

.notice-warning {
    color: #7c5700;
    background: #fff8e6;
    border: 1px solid #f2dfaa;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: #fff;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

th {
    background: #f7f8fe;
    color: #4a5165;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    color: #166534;
    background: #eafaf0;
}

.badge-muted {
    color: #667085;
    background: #f1f4f8;
}

.hero-login {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.hero-side {
    padding: 34px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.24), transparent 30%),
        linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 22px 50px rgba(98, 86, 232, 0.24);
}

.hero-side h2 {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.15;
}

.hero-side p {
    margin: 0;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
}

.hero-bullets {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.hero-bullet {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
}

.hero-bullet strong {
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 860px) {
    .hero-login {
        grid-template-columns: 1fr;
    }

    .page-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 16px;
        padding-bottom: 28px;
    }

    .panel {
        padding: 20px;
    }

    .brand-title {
        font-size: 24px;
    }
}
