@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

* {
    box-sizing: border-box;
}

:root {
    --bg: #edf2f9;
    --bg-soft: #f9fbff;
    --card: #ffffff;
    --primary: #0d3b66;
    --primary-dark: #08243f;
    --accent: #17a398;
    --accent-soft: #dcf7f3;
    --warm: #f4a259;
    --secondary: #e4ecf7;
    --text: #13253a;
    --muted: #54657a;
    --danger: #b63636;
    --success: #1f8a5d;
    --border: #d9e3f0;
    --shadow-md: 0 16px 40px rgba(11, 43, 77, 0.09);
    --shadow-sm: 0 10px 20px rgba(11, 43, 77, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 10% -10%, #d8f2f0 0%, transparent 40%),
        radial-gradient(circle at 100% 0%, #c9dcff 0%, transparent 30%),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.5;
}

.page {
    min-height: 100vh;
    padding: 26px;
}

.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.user-content,
.admin-content {
    padding-top: 22px;
}

.user-site-header,
.admin-site-header {
    color: #fff;
    padding: 18px 20px;
    box-shadow: 0 12px 28px rgba(8, 26, 45, 0.28);
    position: relative;
    overflow: hidden;
}

.user-site-header {
    background: linear-gradient(100deg, #0d3b66 0%, #0b6e8a 60%, #17a398 100%);
}

.admin-site-header {
    background: linear-gradient(100deg, #1e2d3e 0%, #243b53 55%, #0d3b66 100%);
}

.user-site-header::before,
.admin-site-header::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    right: -110px;
    top: -180px;
    background: rgba(255, 255, 255, 0.08);
}

.user-site-inner,
.admin-site-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.brand-block {
    display: grid;
    gap: 3px;
}

.brand-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    margin: 0;
    color: rgba(230, 243, 255, 0.95);
    font-size: 0.9rem;
}

.user-nav,
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.user-nav a,
.admin-nav a {
    color: #f4f9ff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.user-nav a.active,
.user-nav a:hover,
.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.hero-card {
    background:
        linear-gradient(120deg, #f0f7ff 0%, #ffffff 52%, #e6fbf8 100%),
        url("images/dashboard-accent.svg");
    background-repeat: no-repeat;
    background-position: right -65px bottom -35px;
    background-size: 360px;
    position: relative;
}

.admin-hero-card {
    background:
        linear-gradient(120deg, #f4f8fd 0%, #ffffff 52%, #ecf4ff 100%),
        url("images/dashboard-accent.svg");
    background-repeat: no-repeat;
    background-position: right -65px bottom -35px;
    background-size: 360px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.section-tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
}

.section-tile h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 2px;
}

.section-tile h3 i {
    color: var(--accent);
}

.admin-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer {
    text-align: center;
    padding: 18px;
    color: #45617d;
    font-weight: 600;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.auth-card {
    width: 100%;
    max-width: 490px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    right: -32px;
    top: -36px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(11, 110, 138, 0.16), rgba(23, 163, 152, 0.2));
}

.auth-art {
    width: 100%;
    border-radius: 14px;
    margin-top: 12px;
    margin-bottom: 14px;
    border: 1px solid #deebfa;
    box-shadow: var(--shadow-sm);
}

.block {
    padding: 22px;
    margin-bottom: 20px;
}

h1,
h2,
h3 {
    margin-top: 0;
    letter-spacing: 0.01em;
}

h1 {
    font-size: clamp(1.55rem, 2.2vw, 2rem);
}

h2 {
    font-size: clamp(1.3rem, 1.8vw, 1.65rem);
}

p {
    color: var(--muted);
}

.small-text {
    margin-top: 14px;
    font-size: 0.92rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.form-stack,
.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #24425f;
}

input,
textarea,
select,
button {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 13px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #5aa2cf;
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.14);
}

textarea {
    resize: vertical;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.actions-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.inline-form input[type="hidden"] {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    border-radius: 11px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(120deg, var(--primary) 0%, #0b6e8a 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(13, 59, 102, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 14px 26px rgba(13, 59, 102, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
}

.btn-danger {
    background: #b63636;
    color: #fff;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.82rem;
}

.btn-promo {
    min-width: 162px;
}

.alert {
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    font-weight: 700;
}

.alert-success {
    background: #def7ea;
    color: #0f6840;
    border: 1px solid #b4ebcf;
}

.alert-error {
    background: #fde8e8;
    color: #932929;
    border: 1px solid #f7c5c5;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e0e8f4;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f6fd;
    color: #284560;
    font-size: 0.87rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:hover td {
    background: #fbfdff;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-approved,
.badge-solved {
    background: #d9f5e7;
    color: #166843;
}

.badge-pending {
    background: #fff0d6;
    color: #8a5910;
}

.badge-blocked,
.badge-close {
    background: #ffdede;
    color: #8f1f1f;
}

.badge-open {
    background: #dde9ff;
    color: #1f4f96;
}

.dashboard-illustration {
    width: min(100%, 520px);
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid #d9e7f8;
    box-shadow: var(--shadow-sm);
}

.user-home-hero {
    text-align: center;
}

.user-home-hero .dashboard-illustration {
    margin-left: auto;
    margin-right: auto;
}

.user-home-grid .user-home-tile {
    align-items: center;
    text-align: center;
}

.user-home-grid .user-home-tile h3 {
    justify-content: center;
    margin-bottom: 0;
}

.user-home-grid .user-home-tile .btn {
    margin-top: auto;
}

.section-svg-icon {
    width: 92px;
    height: 92px;
    border-radius: 16px;
    border: 1px solid #d8e7f8;
    background: #f7fbff;
    box-shadow: 0 10px 20px rgba(11, 43, 77, 0.08);
}

iframe {
    border: 1px solid #dbe7f4;
    border-radius: 14px;
    width: 100%;
    max-width: 100%;
    background: #fff;
}

a {
    color: #0d4f8b;
}

a:hover {
    color: #0b6e8a;
}

@keyframes card-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.alert {
    animation: card-fade 0.45s ease both;
}

@media (max-width: 980px) {
    .form-grid,
    .section-grid,
    .admin-section-grid {
        grid-template-columns: 1fr;
    }

    iframe {
        height: 580px;
    }
}

@media (max-width: 780px) {
    .user-nav,
    .admin-nav {
        gap: 7px;
    }

    .user-nav a,
    .admin-nav a {
        padding: 7px 11px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .page {
        padding: 14px;
    }

    .auth-card,
    .block {
        padding: 16px;
    }

    .brand-title {
        font-size: 1.2rem;
    }

    iframe {
        height: 450px;
    }
}
