:root {
    --sidebar-w: 272px;
    --linka-primary: #e30613;
    --linka-primary-bright: #ff3b45;
    --linka-navy: #20242a;
    --linka-ink: #17191d;
    --linka-steel: #6c7a89;
    --linka-line: rgba(224, 226, 230, 0.95);
    --linka-surface: #f4f5f7;
    --linka-surface-strong: #eeeef1;
    --premium-card-shadow: 0 24px 48px -38px rgba(23, 25, 29, 0.45);
    --premium-card-shadow-hover: 0 28px 58px -42px rgba(23, 25, 29, 0.55);
}

.app-content {
    max-width: 1320px;
    width: 100%;
    padding-top: 2rem !important;
    padding-bottom: 3.5rem !important;
}

.app-content > h3:first-of-type,
.app-content main > h3:first-of-type,
.app-content main > .d-flex:first-child h3,
.app-content .page-title {
    margin-bottom: 0.55rem !important;
    color: #20242a;
    font-size: clamp(2rem, 3vw, 2.85rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.app-content > h3:first-of-type + p,
.app-content main > h3:first-of-type + p,
.app-content .page-subtitle {
    max-width: 980px;
    color: #626b76;
    line-height: 1.7;
    font-size: 1rem;
}

.app-content h4 {
    margin: 1.35rem 0 0.8rem;
    color: #20242a;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.app-content main.container,
.app-content main.container-xxl,
.app-content > .container,
.app-content > .container-xxl {
    padding-top: 0 !important;
}

.app-content form:not(.dropdown-menu form):not(.d-inline):not(.navbar form) .form-label {
    color: #272a30;
    font-size: 0.83rem;
    font-weight: 700;
}

.app-content form:not(.dropdown-menu form):not(.d-inline):not(.navbar form) .form-control,
.app-content form:not(.dropdown-menu form):not(.d-inline):not(.navbar form) .form-select {
    min-height: 42px;
    border-radius: 0.8rem;
    border-color: #dfe2e7;
    background-color: #fff;
}

.app-content form:not(.dropdown-menu form):not(.d-inline):not(.navbar form) .form-control:focus,
.app-content form:not(.dropdown-menu form):not(.d-inline):not(.navbar form) .form-select:focus {
    border-color: rgba(227, 6, 19, 0.55);
    box-shadow: 0 0 0 0.22rem rgba(227, 6, 19, 0.10);
}

.app-content .form-text {
    color: #77808c;
}

.app-content .list-group {
    border-color: rgba(224, 226, 230, 0.95) !important;
    border-radius: 1rem !important;
    overflow: hidden;
}

.app-content .list-group-item {
    border-color: rgba(224, 226, 230, 0.72);
}

.app-content hr {
    margin: 1.45rem 0;
    border-color: rgba(224, 226, 230, 0.95);
    opacity: 1;
}

.app-content .alert {
    border: 1px solid rgba(224, 226, 230, 0.88);
    border-radius: 1rem;
    box-shadow: 0 18px 38px -34px rgba(23, 25, 29, 0.35);
}

.app-content .alert-danger {
    color: #5f0710;
    background: linear-gradient(135deg, #fff0f1 0%, #ffe3e5 100%);
    border-color: #f4b9bf;
}

.app-content .alert-warning {
    color: #654b09;
    background: linear-gradient(135deg, #fff9e8 0%, #fff0bd 100%);
    border-color: #efd47b;
}

.app-content .alert-info {
    color: #253142;
    background: linear-gradient(135deg, #f7f8fa 0%, #eceff3 100%);
    border-color: #d9dde4;
}

.app-content .alert-success {
    color: #0d5c3c;
    background: linear-gradient(135deg, #effbf4 0%, #ddf6e9 100%);
    border-color: #bde8d0;
}

.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    position: sticky;
    top: 0;
    color: #eff7ff;
    background:
        radial-gradient(circle at top left, rgba(227, 6, 19, 0.26), transparent 36%),
        linear-gradient(180deg, #252930 0%, #17191d 52%, #0f1013 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.sidebar .border-bottom {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar-brand-link {
    color: #fff;
}

.sidebar-logo {
    width: 150px;
    max-height: 42px;
    height: auto;
    object-fit: contain;
}

.sidebar-system-title {
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-system-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(239, 247, 255, 0.68);
}

.sidebar small.text-uppercase {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.88);
    border-radius: 1rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.18s ease;
}

.sidebar .nav-link i {
    font-size: 1.08rem;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(255, 59, 69, 0.94), rgba(227, 6, 19, 0.94));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 18px 28px -18px rgba(227, 6, 19, 0.85);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    color: #fff;
    padding: 0.85rem 0;
    background:
        linear-gradient(90deg, rgba(15, 16, 19, 0.98) 0%, rgba(32, 36, 42, 0.96) 48%, rgba(227, 6, 19, 0.9) 100%);
    box-shadow: 0 14px 36px -26px rgba(23, 25, 29, 0.85);
}

.topbar-brand {
    min-width: fit-content;
}

.topbar-logo {
    width: 126px;
    max-height: 34px;
    height: auto;
    object-fit: contain;
}

.topbar-brand-title {
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.topbar-brand-subtitle {
    color: rgba(238, 245, 251, 0.78);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.topbar .input-group-text,
.topbar .form-control {
    border: 0;
    background: rgba(255, 255, 255, 0.96) !important;
}

.topbar .input-group-text {
    border-radius: 999px 0 0 999px;
    color: var(--linka-steel);
}

.topbar .form-control {
    border-radius: 0 999px 999px 0;
    box-shadow: none !important;
    font-size: 0.88rem;
}

.topbar .form-control::placeholder {
    color: #7c8a98;
}

.topbar .btn-icon,
.topbar .btn-user {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbfe;
}

.topbar .btn-icon:hover,
.topbar .btn-user:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ffffff 0%, #eeeef1 100%);
    color: var(--linka-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
}

.topbar .user-dropdown {
    min-width: 244px;
    margin-top: 0.65rem;
    padding: 0.45rem;
    overflow: hidden;
    border: 1px solid rgba(224, 226, 230, 0.96);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 58px -32px rgba(23, 25, 29, 0.45);
}

.topbar .user-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 32px;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    border-left: 1px solid rgba(224, 226, 230, 0.96);
    border-top: 1px solid rgba(224, 226, 230, 0.96);
    background: #fff;
}

.topbar .user-dropdown-header {
    position: relative;
    z-index: 1;
    padding: 0.85rem 0.95rem 0.75rem;
}

.topbar .user-dropdown-kicker {
    display: block;
    color: #7b8490;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.topbar .user-dropdown-email {
    display: block;
    margin-top: 0.42rem;
    color: #20242a;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.topbar .user-dropdown .dropdown-divider {
    margin: 0.35rem -0.45rem;
    border-color: rgba(224, 226, 230, 0.95);
    opacity: 1;
}

.topbar .user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 42px;
    padding: 0.62rem 0.78rem;
    border-radius: 0.72rem;
    color: #2d333b;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.1;
}

.topbar .user-dropdown-item i {
    width: 1.1rem;
    color: #6f7782;
    font-size: 1rem;
    line-height: 1;
}

.topbar .user-dropdown-item:hover,
.topbar .user-dropdown-item:focus {
    color: #17191d;
    background: linear-gradient(135deg, #fff1f2 0%, #f8f0f1 100%);
}

.topbar .user-dropdown-item:hover i,
.topbar .user-dropdown-item:focus i {
    color: #e30613;
}

.topbar .user-dropdown-logout {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.card-stat,
.stat-card,
.action-card,
.table-modern,
.card {
    border-color: rgba(224, 226, 230, 0.95);
}

.app-content .card {
    overflow: hidden;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--premium-card-shadow);
}

.app-content .card-header {
    padding: 0.95rem 1.05rem;
    border-bottom-color: rgba(224, 226, 230, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.app-content .card-header h3,
.app-content .card-header h4,
.app-content .card-header h5,
.app-content .card-header h6 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.card-stat,
.stat-card {
    border: 1px solid rgba(224, 226, 230, 0.95);
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: var(--premium-card-shadow);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card-stat .card-body {
    padding: 1.25rem;
}

.stat-card:hover,
.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--premium-card-shadow-hover);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card .rounded-circle,
.stat-card .rounded-3,
.action-card .rounded-3 {
    width: 46px !important;
    height: 46px !important;
    border-radius: 1rem !important;
    background: linear-gradient(135deg, rgba(255, 59, 69, 0.10), rgba(227, 6, 19, 0.16)) !important;
    color: #e30613 !important;
}

.stat-card .fs-4 {
    font-size: 1.75rem !important;
    line-height: 1;
    font-weight: 800 !important;
}

.stat-label,
.small.text-muted.text-uppercase {
    font-size: 0.72rem !important;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.stat-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(255, 59, 69, 0.12), rgba(227, 6, 19, 0.18));
    color: var(--linka-primary);
    transition: all 0.2s ease;
}

.table td,
.table th {
    vertical-align: middle;
}

.table-modern thead th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--linka-steel);
    background: #fafafa;
    border-bottom: 1px solid var(--linka-line);
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.table-modern tbody td {
    font-size: 0.89rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-color: rgba(224, 226, 230, 0.72);
}

.action-card {
    border-radius: 1.05rem;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.btn-ghost {
    background-color: #fafafa;
    border-color: var(--linka-line);
    color: var(--linka-steel);
}

.btn-primary,
.btn-table-open,
.btn-action-open {
    border-color: transparent !important;
    background: linear-gradient(135deg, #20242a 0%, #0f1013 100%) !important;
    color: #fff !important;
    box-shadow: 0 18px 28px -22px rgba(23, 25, 29, 0.9);
}

.btn-primary:hover,
.btn-table-open:hover,
.btn-action-open:hover {
    background: linear-gradient(135deg, #b5000f 0%, #e30613 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #e30613;
    border-color: #e30613;
}

.btn-outline-primary:hover {
    color: #fff;
    background: #e30613;
    border-color: #e30613;
}

.badge.bg-danger {
    background: #e30613 !important;
}

.badge.bg-warning {
    background: #f4c20d !important;
}

.btn-ghost:hover {
    background-color: var(--linka-surface-strong);
    border-color: #d7d9dd;
    color: var(--linka-ink);
}

.sidebar-collapsed .sidebar {
    width: 84px;
}

.sidebar-collapsed .sidebar .nav-link .bi {
    margin-right: 0 !important;
}

.sidebar-collapsed .sidebar .nav-link,
.sidebar-collapsed .sidebar-brand-link {
    text-align: center;
}

.sidebar-collapsed .sidebar .badge,
.sidebar-collapsed .sidebar .nav-link span,
.sidebar-collapsed .sidebar small,
.sidebar-collapsed .sidebar .d-md-inline,
.sidebar-collapsed .sidebar .sidebar-logo,
.sidebar-collapsed .sidebar .sidebar-system-subtitle {
    display: none !important;
}
