:root {
    --primary: #b11b78;
    --primary-hover: #941663;
    --bg: #f1f1f1;
    --surface: #fefefe;
    --text: #111111;
    --muted: #808080;
    --border: #dddddd;
    --header-bg: #000000;
    --header-text: #fefefe;
    --danger: #b00020;
    --success-bg: #eaf7ee;
    --success-border: #b7dfc2;
    --success-text: #1f6b36;
    --error-bg: #fdeeee;
    --error-border: #efc2c2;
    --error-text: #9f1d1d;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid #1f1f1f;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}

.site-header .layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
}

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

.brand a {
    color: var(--header-text);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.2px;
}

.brand-logo {
    display: block;
    max-height: 42px;
    width: auto;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.main-nav a {
    text-decoration: none;
    color: var(--header-text);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.container {
    background: var(--surface);
    margin: 30px 0;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.container.small {
    max-width: 520px;
}

h1 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
    line-height: 1.2;
}

h2 {
    margin-top: 30px;
    margin-bottom: 12px;
    font-size: 1.2rem;
    line-height: 1.3;
}

h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

p {
    line-height: 1.5;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(177, 27, 120, 0.12);
}

button {
    margin-top: 20px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
    background: var(--primary-hover);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

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

th {
    background: #f7f7f7;
    font-weight: 700;
}

tr:hover td {
    background: #fcfcfc;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

.error {
    color: var(--danger);
    font-weight: bold;
    margin-top: 10px;
}

.info-links {
    margin-bottom: 20px;
}

.info-links a {
    margin-right: 10px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0 30px;
}

.summary-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.summary-box .label {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.summary-box .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.table-wrap {
    overflow-x: auto;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(177, 27, 120, 0.10);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

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

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

.flash {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.flash-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.flash-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-form input {
    max-width: 320px;
}

@media (max-width: 900px) {
    .site-header .layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
    }
}

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

    .container {
        padding: 22px 18px;
    }

    h1 {
        font-size: 1.6rem;
    }

    th,
    td {
        padding: 9px 8px;
    }
}

@media print {
    .site-header,
    .site-footer,
    .info-links,
    .actions-inline,
    form,
    button {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .container,
    .summary-box,
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-text {
    color: var(--header-text);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}