:root {
    --app-bg: #f5f7fb;
    --app-surface: #ffffff;
    --app-sidebar: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    --app-primary: #0f766e;
    --app-accent: #f59e0b;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body.app-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 25%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.08), transparent 20%),
        var(--app-bg);
    color: var(--app-text);
    min-height: 100vh;
}

body.login-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.22), transparent 24%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.18), transparent 22%),
        linear-gradient(135deg, #0f172a 0%, #111827 100%);
    color: var(--app-text);
    min-height: 100vh;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    background: var(--app-sidebar);
    color: #fff;
    padding: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 12px 0 30px rgba(15, 23, 42, 0.12);
}

.sidebar-brand {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1rem;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 118, 110, 0.35));
    font-size: 1.1rem;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.login-brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
}

.brand-title {
    font-weight: 800;
    line-height: 1.2;
}

.sidebar-menu {
    display: grid;
    gap: 0.55rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.95), rgba(6, 182, 212, 0.75));
    transform: translateX(4px);
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 1rem 1.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-user {
    display: flex;
    align-items: center;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--app-primary), #0ea5e9);
    display: grid;
    place-items: center;
    color: #fff;
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-wrapper {
    padding: 1.35rem;
}

.card-modern {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.96);
}

.hero-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 118, 110, 0.94));
    color: #fff;
    border: 0;
    overflow: hidden;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.72);
}

.hero-copy {
    color: rgba(255, 255, 255, 0.8);
    max-width: 52rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.92rem;
}

.hero-panel-side {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.hero-status-badge {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    font-weight: 700;
    font-size: 0.82rem;
}

.mini-metric {
    border-radius: 16px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.09);
}

.mini-metric-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
}

.mini-metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.dashboard-table thead th {
    white-space: nowrap;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.detail-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--app-primary), #0ea5e9);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #0f766e 58%, #14b8a6 100%);
    color: #fff;
}

.settings-hero::after {
    content: '';
    position: absolute;
    inset: auto -12% -55% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.settings-hero-copy,
.settings-hero-meta {
    position: relative;
    z-index: 1;
}

.section-label-light {
    color: rgba(255, 255, 255, 0.72);
}

.settings-hero-text {
    max-width: 56rem;
    color: rgba(255, 255, 255, 0.82);
}

.settings-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.settings-preview-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.98));
}

.settings-preview-logo {
    width: 148px;
    height: 148px;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.12));
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.settings-preview-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-preview-box {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.settings-favicon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.settings-favicon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 0.65rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--app-border);
    padding-bottom: 0.65rem;
}

.info-row span {
    color: var(--app-muted);
}

.info-row strong {
    text-align: right;
    font-weight: 600;
}

.detail-card {
    border: 1px solid var(--app-border);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.detail-card-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--app-muted);
    margin-bottom: 0.7rem;
}

.photo-preview {
    border-radius: 18px;
    border: 1px solid var(--app-border);
    overflow: hidden;
    background: #fff;
    min-height: 260px;
}

.photo-preview img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    color: #fff;
    min-height: 150px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(20deg);
}

.stat-card .icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stat-primary { background: linear-gradient(135deg, #0f766e, #06b6d4); }
.stat-warning { background: linear-gradient(135deg, #f59e0b, #f97316); }
.stat-danger { background: linear-gradient(135deg, #dc2626, #ef4444); }
.stat-dark { background: linear-gradient(135deg, #1f2937, #111827); }

.table thead th {
    background: #f8fafc;
    color: var(--app-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
}

.badge-soft-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.badge-soft-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 1040px;
    min-height: 620px;
    max-height: calc(100vh - 2rem);
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
    background: #fff;
}

.login-aside {
    background: linear-gradient(145deg, #0f766e, #0f172a);
    color: #fff;
    padding: 2rem;
    min-height: 100%;
    overflow: hidden;
}

.login-form {
    padding: 2rem;
    background: #fff;
    overflow-y: auto;
}

.login-form .form-control,
.login-form .btn,
.login-form .alert {
    max-width: 100%;
}

.login-form .btn-lg {
    min-height: 50px;
}

@media (min-width: 992px) {
    .login-form {
        padding: 2.35rem 2.4rem;
    }
}

@media (max-width: 991.98px) {
    .login-shell {
        padding: 1rem;
    }

    .login-card {
        max-height: none;
        min-height: auto;
    }

    .login-aside {
        min-height: auto;
    }

    .login-card {
        border-radius: 22px;
    }
}

.form-control,
.form-select {
    border-radius: 14px;
    min-height: 48px;
}

.btn {
    border-radius: 14px;
}

@media (max-width: 992px) {
    .app-sidebar {
        position: fixed;
        left: -100%;
        z-index: 20;
        transition: left 0.2s ease;
    }

    .app-shell.sidebar-open .app-sidebar {
        left: 0;
    }

    .content-wrapper,
    .topbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
