:root {
    --color-primary: #ffffff;
    --color-secondary: #2d5596;
    --color-secondary-deep: #17325f;
    --color-accent: #edf3ff;
    --color-border: rgba(23, 50, 95, 0.14);
    --color-text: #15304a;
    --color-muted: #607089;
    --color-danger: #a1353c;
    --color-success: #1e6a49;
    --shadow-soft: 0 22px 60px rgba(20, 48, 84, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(45, 85, 150, 0.16), transparent 35%),
        linear-gradient(160deg, #f4f8ff 0%, #eef4ff 40%, #fbfdff 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

.page-shell {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.hero-card,
.admin-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 2rem;
}

.hero-brand {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.hero-logo {
    width: 120px;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 1rem;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-deep));
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--color-secondary);
}

h1,
h2 {
    margin: 0;
    line-height: 1.1;
}

.hero-text,
.panel-text,
.admin-subtitle {
    color: var(--color-muted);
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

label,
.preview-card,
.stat-card,
.data-table-wrapper {
    display: block;
}

label span,
.panel-title,
.table-actions,
figcaption {
    font-weight: 700;
    margin-bottom: 0.55rem;
}

input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    outline: none;
    border-color: rgba(45, 85, 150, 0.5);
    box-shadow: 0 0 0 4px rgba(45, 85, 150, 0.12);
}

small {
    display: block;
    margin-top: 0.45rem;
    color: var(--color-danger);
}

.photo-panel {
    margin: 1.75rem 0;
    padding: 1.5rem;
    border-radius: 24px;
    background: var(--color-accent);
}

.upload-dropzone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 120px;
    border: 2px dashed rgba(45, 85, 150, 0.35);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--color-secondary);
    text-align: center;
    cursor: pointer;
}

.upload-dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preview-card,
.stat-card {
    background: #fff;
    border-radius: 20px;
    padding: 1rem;
    min-height: 220px;
    border: 1px solid rgba(45, 85, 150, 0.08);
}

.preview-card img {
    width: 100%;
    height: 360px;
    object-fit: contain;
    border-radius: 14px;
    background: linear-gradient(180deg, #f6f9ff, #edf3ff);
}

.preview-card-large {
    margin-top: 1rem;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.preview-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.primary-button,
.secondary-button,
.danger-button {
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.primary-button {
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-deep));
}

.secondary-button {
    display: inline-block;
    color: var(--color-secondary);
    text-decoration: none;
    background: rgba(45, 85, 150, 0.1);
}

.secondary-button-outline {
    border: 1px solid rgba(45, 85, 150, 0.2);
    background: #fff;
}

.danger-button {
    color: #fff;
    background: #b23a4b;
}

.alert {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    margin: 0 0 1.2rem;
    font-weight: 600;
}

.alert-success {
    color: var(--color-success);
    background: rgba(30, 106, 73, 0.1);
}

.alert-error {
    color: var(--color-danger);
    background: rgba(161, 53, 60, 0.1);
}

.admin-header,
.table-actions,
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stats-grid {
    margin: 1.5rem 0;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem 0.8rem;
    border-bottom: 1px solid rgba(45, 85, 150, 0.12);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--color-secondary);
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(45, 85, 150, 0.12);
    color: var(--color-secondary-deep);
    font-size: 0.9rem;
    font-weight: 700;
}

.login-shell {
    width: min(480px, calc(100% - 2rem));
    margin: 3rem auto;
}

@media (max-width: 760px) {
    .hero-brand,
    .form-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-shell {
        width: min(100% - 1rem, 100%);
    }

    .hero-card,
    .admin-card {
        padding: 1.25rem;
        border-radius: 22px;
    }

    .preview-card img,
    .preview-card-large {
        min-height: 260px;
    }

    .preview-card img {
        height: 260px;
    }

    th {
        display: none;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    tr {
        border-bottom: 1px solid rgba(45, 85, 150, 0.12);
        padding: 0.8rem 0;
    }

    td {
        border: 0;
        padding: 0.4rem 0;
    }
}
