@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f7f8fb;
    --bg-accent: #eaf3ff;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --accent: #2d89ef;
    --accent-dark: #1f6fd0;
    --border: #e5e7eb;
    --table-head-bg: #eaf4ff;
    --table-head-text: #1d4f91;
    --table-head-border: #cfe1fb;
    --shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
    --sidebar-start: #0f9af0;
    --sidebar-end: #2674ff;
    --surface-soft: #f5f9ff;
    --surface-accent: #eef6ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(45, 137, 239, 0.12), transparent 32%),
        radial-gradient(circle at bottom left, rgba(124, 77, 255, 0.08), transparent 28%),
        linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 42%, #f8fbff 100%);
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.card {
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.92);
}

input,
button {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-page-shell {
    background:
        radial-gradient(circle at top left, rgba(45, 137, 239, 0.18), transparent 36%),
        radial-gradient(circle at bottom right, rgba(124, 77, 255, 0.12), transparent 32%),
        linear-gradient(135deg, #f3f8ff 0%, #f8fbff 56%, #eef4fb 100%);
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-panel {
    width: min(460px, 100%);
    padding: 34px 32px 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #2674ff);
    color: #fff;
    font-size: 24px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.brand-kicker {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 12px;
    color: var(--muted);
}

.login-title {
    margin: 0;
    font-size: 30px;
    letter-spacing: 0.4px;
}

.login-subtitle {
    margin: 0 0 18px;
    color: var(--muted);
}

.login-tip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f4f8fe;
    border: 1px solid rgba(45, 137, 239, 0.14);
    color: #334155;
}

.login-tip span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.login-guide-link {
    gap: 12px;
}

.login-guide-link a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(45, 137, 239, 0.08);
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.login-guide-link a:hover {
    background: rgba(45, 137, 239, 0.14);
    transform: translateY(-1px);
}

.login-alert {
    margin-bottom: 16px;
}

.login-form .form-group:last-of-type {
    margin-bottom: 18px;
}

.login-page-shell .form-group {
    margin-bottom: 16px;
}

.login-page-shell label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-page-shell input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

.login-page-shell input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 137, 239, 0.15);
}

.login-page-shell .btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #2674ff);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.4px;
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-page-shell .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-dark), #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.28);
}

.login-secondary-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.login-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.login-secondary-link:hover {
    text-decoration: underline;
}

.login-page-shell .alert {
    background: #fdecea;
    color: #b42318;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(180, 35, 24, 0.2);
}

.soft-metric {
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fbff, #f3f8fe);
    border: 1px solid rgba(45, 137, 239, 0.1);
}

.soft-metric small {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}

.soft-metric strong {
    font-size: 16px;
    color: var(--text);
}

.placeholder-panel {
    border-radius: 20px;
    border: 1px dashed rgba(31, 75, 122, 0.24);
}

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

.dashboard-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

.sidebar {
    padding: 22px 18px;
    height: fit-content;
}

.app-header.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(45, 137, 239, 0.08);
}

.app-header .nav-link {
    color: #334155;
}

.app-header .nav-link:hover {
    color: var(--accent-dark);
}

.notification-dropdown.dropdown-menu {
    width: min(420px, calc(100vw - 1rem));
    min-width: 320px;
    max-width: calc(100vw - 1rem);
    max-height: min(72vh, 430px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
}

.notification-dropdown__header,
.notification-dropdown__footer,
.notification-dropdown__empty,
.notification-dropdown__item {
    white-space: normal;
}

.notification-dropdown__item {
    padding: 0.85rem 1rem;
}

.notification-dropdown__title,
.notification-dropdown__message,
.notification-dropdown__meta {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.notification-dropdown__message {
    margin-top: 0.3rem;
    line-height: 1.4;
}

.notification-dropdown__meta {
    display: inline-block;
    margin-top: 0.35rem;
}

.app-sidebar {
    background: linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end));
    border-right: none;
}

.app-sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.app-sidebar .brand-link,
.app-sidebar .brand-text {
    color: #ffffff;
}

.app-sidebar .nav-header {
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-sidebar .nav-link {
    color: #eff5ff;
    border-radius: 12px;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.app-sidebar .nav-link .nav-icon {
    color: inherit;
}

.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: translateY(-1px);
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.app-sidebar .nav-badge.badge {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.brand {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 18px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-bottom: 8px;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.crud-toolbar-row {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(27, 42, 65, 0.08);
}

.crud-toolbar-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 4px;
}

.crud-toolbar-track .btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #2674ff);
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.16);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--accent-dark), #2563eb);
    border-color: transparent;
}

.btn-success {
    box-shadow: 0 10px 18px rgba(34, 197, 94, 0.12);
}

.btn-warning {
    box-shadow: 0 10px 18px rgba(245, 158, 11, 0.12);
}

.form-control,
.form-select {
    border-color: #d7dee8;
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(45, 137, 239, 0.16);
}

.table > thead > tr > th,
.table > :not(caption) > thead > tr > th {
    background-color: var(--table-head-bg);
    color: var(--table-head-text);
    border-bottom-color: var(--table-head-border);
    font-weight: 700;
}

.table > tbody > tr:hover > td {
    background-color: var(--surface-soft);
}

.icon-select-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f6f9fc;
    border: 1px solid rgba(27, 42, 65, 0.1);
}

.icon-select-preview__icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef5fc;
    color: var(--accent-dark);
    font-size: 22px;
    flex-shrink: 0;
}

.icon-select-preview__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.icon-select-preview__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.icon-picker-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 122px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.icon-picker-option:hover {
    border-color: rgba(31, 75, 122, 0.5);
    box-shadow: 0 10px 22px rgba(24, 42, 65, 0.08);
    transform: translateY(-1px);
}

.icon-picker-preview {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eef5fc;
    color: var(--accent-dark);
    font-size: 22px;
}

.icon-picker-label {
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.icon-picker-value {
    font-size: 12px;
    color: var(--muted);
    word-break: break-word;
}

.btn-check:checked + .icon-picker-option {
    border-color: var(--accent);
    background: #f0f6fc;
    box-shadow: 0 0 0 2px rgba(31, 75, 122, 0.16);
}

.btn-check:focus-visible + .icon-picker-option {
    outline: 2px solid rgba(31, 75, 122, 0.3);
    outline-offset: 2px;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active {
    background: #eef3fa;
    color: var(--accent);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef3fa;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.pagination .page-link {
    border-radius: 10px;
    border-color: #dbe4f0;
    color: #334155;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--accent), #2674ff);
    border-color: transparent;
}

.pagination .page-link:hover {
    color: var(--accent-dark);
    background: var(--surface-accent);
}

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

.stat {
    padding: 18px;
}

.stat h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.stat p {
    margin: 0;
    color: var(--muted);
}

.link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 680px) {
    .notification-dropdown.dropdown-menu {
        min-width: 0;
    }

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

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