:root {
    --color-primary: #1a1a1a;
    --color-secondary: #f9fafb;
    --color-accent: #374151;
    --color-surface: #f3f4f6;
    --color-slate-800: #1e293b;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-400: #94a3b8;
    --color-danger: #dc2626;
    --color-warning: #f59e0b;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-card: 0 20px 25px -15px rgba(15, 23, 42, 0.12);
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        "Inter",
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
    background-color: var(--color-secondary);
    color: var(--color-slate-800);
    line-height: 1.5;
}

.app-main {
    padding: 1rem;
}

.app-admin {
    background-color: #eef2f6;
}

.app-admin .app-main {
    padding: 0.95rem;
}

.app-admin .page-title {
    font-size: 1.34rem;
}

.app-admin .page-subtitle {
    margin-top: 0.3rem;
    font-size: 0.86rem;
}

.app-admin .card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 24px -22px rgba(15, 23, 42, 0.2);
}

.app-admin .card-header {
    padding: 0.95rem 1.15rem;
}

.app-admin .card-body {
    padding: 1rem 1.15rem;
}

.app-admin .card-footer {
    padding: 0.85rem 1.15rem;
}

.app-admin .card-title {
    font-size: 1rem;
}

.app-admin .btn:not(.btn-link) {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
}

.app-admin .badge {
    padding: 0.18rem 0.62rem;
    font-size: 0.68rem;
}

.app-admin .table thead {
    font-size: 0.72rem;
}

.app-admin .table th,
.app-admin .table td {
    padding: 0.72rem 1rem;
}

.app-admin .form-label {
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
}

.app-admin .input,
.app-admin .textarea {
    padding: 0.56rem 0.8rem;
    font-size: 0.88rem;
}

.app-admin section.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.1rem;
}

.app-admin section.space-y-8 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.35rem;
}

a {
    color: inherit;
    text-decoration: none;
}

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

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

/* Logo constraints */
img[alt*="Logo"] {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Layout utilities */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.overflow-hidden {
    overflow: hidden;
}

.z-10 {
    z-index: 10;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.bottom-0 {
    bottom: 0;
}

.right-0 {
    right: 0;
}

.top-1\/2 {
    top: 50%;
}

.left-1\/3 {
    left: 33.333333%;
}

.opacity-10 {
    opacity: 0.1;
}

.blur-2xl {
    filter: blur(40px);
}

.blur-3xl {
    filter: blur(64px);
}

/* Layout utilities */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.inline {
    display: inline;
}

.hidden {
    display: none;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.grid {
    display: grid;
}

.max-w-md {
    max-width: 28rem;
}

.max-h-24 {
    max-height: 6rem;
}

.object-contain {
    object-fit: contain;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.ml-auto {
    margin-left: auto;
}

.space-y-1 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.25rem;
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.75rem;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem;
}

.space-y-8 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 2rem;
}

.space-y-8 {
    display: flex;
    flex-direction: column;
}

.space-y-4,
.space-y-6,
.space-y-8,
.space-y-3,
.space-y-1 {
    display: flex;
    flex-direction: column;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.pt-4 {
    padding-top: 1rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.pt-16 {
    padding-top: 4rem;
}

.p-0 {
    padding: 0;
}

.p-3 {
    padding: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.w-48 {
    width: 12rem;
}

.h-48 {
    height: 12rem;
}

.w-64 {
    width: 16rem;
}

.h-64 {
    height: 16rem;
}

.w-96 {
    width: 24rem;
}

.h-96 {
    height: 24rem;
}

.rounded-full {
    border-radius: 9999px;
}

.h-20 {
    height: 5rem;
}

.w-20 {
    width: 5rem;
}

.w-full {
    width: 100%;
}

.text-center {
    text-align: center;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.font-semibold {
    font-weight: 600;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

.rounded-md {
    border-radius: 0.75rem;
}

.rounded-lg {
    border-radius: 1rem;
}

.border {
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.border-r {
    border-right: 1px solid rgba(148, 163, 184, 0.4);
}

.border-t {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.bg-white {
    background-color: #ffffff;
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-secondary {
    background-color: var(--color-secondary);
}

.bg-surface {
    background-color: var(--color-surface);
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.text-white {
    color: #ffffff;
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

.text-white\/70 {
    color: rgba(255, 255, 255, 0.7);
}

.text-primary {
    color: var(--color-primary);
}

.text-slate-800 {
    color: var(--color-slate-800);
}

.text-slate-600 {
    color: var(--color-slate-600);
}

.text-slate-500 {
    color: var(--color-slate-500);
}

.text-slate-400 {
    color: var(--color-slate-400);
}

.text-danger {
    color: var(--color-danger);
}

.font-medium {
    font-weight: 500;
}

.object-cover {
    object-fit: cover;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.92;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #08916d);
    color: #ffffff;
    box-shadow: 0 12px 20px -15px rgba(0, 98, 65, 0.8);
}

.btn-danger {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: #ffffff;
    box-shadow: 0 10px 18px -14px rgba(185, 28, 28, 0.95);
}

.btn-danger:hover {
    opacity: 0.96;
    transform: translateY(-1px);
}

.btn-cta-subtle {
    padding-inline: 1rem;
    min-width: 13rem;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border-color: rgba(0, 98, 65, 0.15);
}

.btn-outline-light {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.btn-link {
    background: transparent;
    color: var(--color-primary);
    padding: 0;
    border: none;
    border-radius: 0;
}

.card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-slate-800);
}

.card-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--color-slate-500);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background-color: #f8fafc;
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-slate-800);
}

.page-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: var(--color-slate-500);
}

.input,
.textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background-color: #ffffff;
    font-size: 0.95rem;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: rgba(0, 98, 65, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 98, 65, 0.15);
}

.input.readonly {
    background-color: var(--color-secondary);
    border-style: dashed;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-slate-600);
    margin-bottom: 0.4rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

.divider {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-slate-500);
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.alert:hover {
    transform: translateY(-1px);
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.12);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.12);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.12);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.alert-hide {
    opacity: 0;
    transform: translateY(-8px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: rgba(148, 163, 184, 0.16);
    color: var(--color-slate-600);
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.badge-muted {
    background-color: rgba(148, 163, 184, 0.2);
    color: var(--color-slate-500);
}

.stat-card {
    background: linear-gradient(160deg, #ffffff 10%, #e8f3f0 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.table thead {
    background-color: #f1f5f9;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-slate-500);
}

.table th,
.table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.table tbody tr:hover {
    background-color: rgba(0, 98, 65, 0.03);
}

.sidebar {
    width: 15.5rem;
    background:
        radial-gradient(circle at top right, rgba(15, 23, 42, 0.06), transparent 26%),
        linear-gradient(180deg, #fcfefe 0%, #f6f8fb 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    z-index: 30;
    transition: transform 0.25s ease;
}

.sidebar-brand-wrap {
    padding: 1rem 1rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-brand-logo {
    border-radius: 0.7rem;
    box-shadow: 0 10px 20px -18px rgba(15, 23, 42, 0.42);
}

.sidebar-app-name {
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #0f172a;
}

.sidebar-app-subtitle {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
}

.sidebar-panel-badge {
    display: inline-flex;
    margin-top: 0.8rem;
    padding: 0.3rem 0.55rem;
    border-radius: 9999px;
    background-color: rgba(15, 23, 42, 0.06);
    color: #475569;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-user-card {
    margin: 0.8rem 1rem 0;
    padding: 0.8rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 30px -28px rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
}

.sidebar-user-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sidebar-user-avatar {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #0b7a5d);
    flex-shrink: 0;
}

.sidebar-user-meta {
    min-width: 0;
}

.sidebar-user-name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-user-role {
    margin: 0.12rem 0 0;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
}

.sidebar-section-title {
    margin: 0 0 0.6rem;
    padding: 0 0.2rem;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #94a3b8;
}

.sidebar-hidden-on-mobile {
    transform: translateX(-110%);
}

.sidebar-open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem 0.7rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-mobile-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #64748b;
    text-transform: uppercase;
}

.sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-slate-500);
    padding: 0.2rem;
}

.sidebar-close:hover {
    color: var(--color-primary);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar-brand-title {
    font-weight: 600;
    color: var(--color-slate-800);
}

.sidebar-brand-subtitle {
    font-size: 0.75rem;
    color: var(--color-slate-500);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    color: var(--color-slate-500);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 20;
}

.sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-toggle {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1.25rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.24);
}

body.sidebar-visible {
    overflow: hidden;
}

.sidebar-scroll {
    padding: 1rem 0 0.75rem;
}

.sidebar-nav {
    padding: 0 0.75rem;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.72rem 0.8rem;
    border-radius: 0.95rem;
    color: #334155;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0);
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.sidebar-link-icon {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(148, 163, 184, 0.16);
    color: #475569;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-link-icon svg {
    width: 1rem;
    height: 1rem;
}

.sidebar-link-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-link-label {
    color: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
}

.sidebar-link-hint {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.7);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.18);
}

.sidebar-link.active {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 16px 24px -26px rgba(15, 23, 42, 0.75);
}

.sidebar-link.active .sidebar-link-icon {
    background: linear-gradient(135deg, #0f172a, #0b7a5d);
    color: #ffffff;
}

.sidebar-link.active .sidebar-link-hint {
    color: #475569;
}

.sidebar-logout-wrap {
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(220, 38, 38, 0.15);
    background: rgba(255, 255, 255, 0.82);
    color: #991b1b;
    font-weight: 700;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.sidebar-logout-link:hover {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.22);
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    background-color: rgba(148, 163, 184, 0.12);
    font-size: 0.9rem;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
}

.dot-warning {
    background-color: var(--color-warning);
}

.dot-success {
    background-color: var(--color-accent);
}

.dot-danger {
    background-color: var(--color-danger);
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    border-radius: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(11, 122, 93, 0.1), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fbfc 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-card);
}

.dashboard-overline {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
}

.dashboard-hero-note {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 13rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.dashboard-hero-note-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
}

.dashboard-hero-note strong {
    font-size: 1rem;
    color: #0f172a;
}

.dashboard-stat-grid {
    display: grid;
    gap: 0.9rem;
}

.dashboard-stat-card {
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow-card);
}

.dashboard-stat-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.dashboard-stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #0b7a5d);
    color: #ffffff;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-stat-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.dashboard-stat-foot {
    margin-top: 0.7rem;
    font-size: 0.78rem;
    color: #64748b;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-primary-panel {
    min-width: 0;
}

.dashboard-side-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-panel-subtitle {
    margin: 0.28rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.dashboard-inline-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0b7a5d;
    white-space: nowrap;
}

.dashboard-table th,
.dashboard-table td {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.dashboard-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dashboard-status-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.78rem 0.85rem;
    border-radius: 0.9rem;
    background-color: rgba(148, 163, 184, 0.1);
    font-size: 0.9rem;
}

.dashboard-status-item strong {
    margin-left: auto;
    font-size: 1rem;
    color: #0f172a;
}

.dashboard-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-quick-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.9rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-weight: 600;
    color: #0f172a;
}

.dashboard-quick-link-code {
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.08);
    color: #334155;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.user-dashboard-shell .dashboard-hero {
    background:
        radial-gradient(circle at top right, rgba(11, 122, 93, 0.08), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
}

.user-stat-grid {
    display: grid;
    gap: 0.9rem;
}

.user-stat-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow-card);
}

.user-stat-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #0b7a5d);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.page-filter-card {
    max-width: 28rem;
}

.page-filter-body {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.entity-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.entity-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.entity-grid {
    display: grid;
    gap: 1rem;
}

.entity-file-list {
    display: flex;
    flex-direction: column;
}

.entity-file-list > :not([hidden]) ~ :not([hidden]) {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.entity-file-list-plain > :not([hidden]) ~ :not([hidden]) {
    border-top: none;
    margin-top: 0.75rem;
}

.entity-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.entity-file-item-plain {
    padding: 0.8rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(248, 250, 252, 0.9);
}

.entity-file-main {
    min-width: 0;
}

.entity-file-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.entity-file-path {
    margin-top: 0.2rem;
}

.entity-file-note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #b45309;
}

.entity-file-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.entity-file-link {
    white-space: nowrap;
}

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.preview-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
}

.preview-modal-frame {
    position: absolute;
    inset: 0;
    padding: 12px 12px 16px;
}

.preview-modal-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 96vw;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    flex: 0 0 auto;
}

.preview-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.75rem;
    background: #f1f5f9;
}

.preview-modal-surface {
    width: 100%;
    min-height: 100%;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #ffffff;
}

.preview-modal-image-wrap {
    padding: 12px;
    background: #f1f5f9;
}

.preview-modal-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #ffffff;
}

.preview-modal-iframe {
    width: 100%;
    height: max(78vh, 700px);
    border: 0;
    background: #ffffff;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
}

.info-label {
    font-size: 0.8rem;
    color: var(--color-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-slate-800);
}

.link {
    color: var(--color-primary);
    font-weight: 500;
}

.divide-y > * + * {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.text-center {
    text-align: center;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-slate-400 {
    color: var(--color-slate-400);
}

.lg\\:flex {
    display: none;
}

.lg\\:col-span-2 {
    grid-column: span 1 / span 1;
}

.md\\:col-span-2 {
    grid-column: span 1 / span 1;
}

.xl\\:grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.lg\\:grid-cols-3,
.md\\:grid-cols-2,
.sm\\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.lg\\:p-10 {
    padding: 1.5rem;
}

.sm\\:flex-row {
    flex-direction: column;
}

.sm\\:block {
    display: none;
}

.sm\\:flex-row {
    flex-direction: row;
}

.sm\\:flex {
    display: flex;
}

.sm\\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.sm\\:block {
    display: none;
}

.sm\\:flex-row {
    flex-direction: column;
}

.sm\\:flex-row {
    flex-direction: column;
}

.sm\\:flex-row {
    flex-direction: column;
}

.sm\\:flex-row {
    flex-direction: column;
}

.sm\\:block {
    display: none;
}

.sm\\:flex-row {
    flex-direction: column;
}

.sm\\:flex-row {
    flex-direction: column;
}

.flex-col {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.space-y-8 {
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
.md\\:flex {
    display: flex;
}

.md\\:items-center {
    align-items: center;
}

.md\\:justify-between {
    justify-content: space-between;
}

.md\\:grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.md\\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.md\\:col-span-2 {
    grid-column: span 1 / span 1;
}

.md\\:gap-4 {
    gap: 1rem;
}

.md\\:items-end {
    align-items: flex-end;
}

.lg\\:col-span-2 {
    grid-column: span 1 / span 1;
}

.lg\\:grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.md\\:flex-row {
    flex-direction: column;
}

.lg\\:flex {
    display: none;
}

.lg\\:flex-col {
    flex-direction: column;
}

.lg\\:flex-1 {
    flex: 1 1 0%;
}

.lg\\:col-span-2 {
    grid-column: span 1 / span 1;
}

@media (min-width: 640px) {
    .sm\\:block {
        display: block;
    }
    .sm\\:flex-row {
        flex-direction: row !important;
    }
    .sm\\:flex {
        display: flex;
    }
    .sm\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sm\\:h-24 {
        height: 6rem;
    }
    .sm\\:w-24 {
        width: 6rem;
    }
    .sm\\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }
    .sm\\:text-lg {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
    .sm\\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    .sm\\:text-sm {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
    .sm\\:items-center {
        align-items: center;
    }
    .sm\\:justify-between {
        justify-content: space-between;
    }
    .sm\\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .sm\\:gap-0 {
        gap: 0;
    }
}

@media (min-width: 768px) {
    .md\\:flex {
        display: flex;
    }
    .md\\:items-center {
        align-items: center;
    }
    .md\\:justify-between {
        justify-content: space-between;
    }
    .md\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .md\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .md\\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    .md\\:items-end {
        align-items: flex-end;
    }
    .md\\:flex-row {
        flex-direction: row;
    }
    .md\\:gap-4 {
        gap: 1rem;
    }
}

@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        transform: translateX(-110%);
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
}

@media (min-width: 1024px) {
    .lg\\:hidden {
        display: none;
    }
    .lg\\:flex {
        display: flex;
    }
    .lg\\:p-10 {
        padding: 2.5rem;
    }
    .lg\\:flex-col {
        flex-direction: column;
    }
    .lg\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .lg\\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    .lg\\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .sidebar {
        position: relative;
        height: auto;
        transform: none !important;
    }
    .sidebar-header {
        display: none;
    }
    .sidebar-close {
        display: none;
    }
    .sidebar-mobile-title {
        display: none;
    }
    .sidebar-toggle {
        display: none;
    }
    #sidebar-backdrop {
        display: none !important;
    }
    body.sidebar-visible {
        overflow: auto;
    }
    .app-main {
        padding: 1.4rem 1.75rem;
    }
    .app-admin .app-main {
        padding: 1.1rem 1.35rem;
    }
    .dashboard-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .user-stat-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .dashboard-grid {
        grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 0.95fr);
    }
    .user-dashboard-grid {
        grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.95fr);
    }
    .entity-grid-admin {
        grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.95fr);
    }
    .entity-grid-admin-half {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sidebar-link-hint {
        display: none;
    }
    .sidebar-link.active .sidebar-link-hint,
    .sidebar-link:hover .sidebar-link-hint {
        display: block;
    }
}

@media (max-width: 767px) {
    .dashboard-hero {
        flex-direction: column;
    }
    .dashboard-hero-note {
        min-width: 0;
        width: 100%;
    }
    .page-toolbar,
    .entity-topbar,
    .entity-file-item,
    .preview-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-filter-body,
    .entity-file-actions,
    .preview-modal-actions {
        width: 100%;
    }
    .page-filter-body {
        flex-direction: column;
        align-items: stretch;
    }
    .preview-modal-iframe {
        height: 72vh;
    }
}

@media (min-width: 1280px) {
    .xl\\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.\\!mb-0 {
    margin-bottom: 0 !important;
}
