:root {
    --bota-purple: #8b5cf6;
    --bota-purple-dark: #5b21b6;
    --bota-purple-soft: #f3efff;
    --bota-green: #22c55e;
    --bota-green-dark: #15803d;
    --bota-green-soft: #eafaf1;
    --bota-gold: #f5b841;
    --bota-cyan: #38bdf8;
    --bota-ink: #182033;
    --bota-muted: #697386;
    --bota-border: #e6e9f2;
    --bota-bg: #f7fafc;
    --bota-card: #ffffff;
    --bota-shadow: 0 18px 48px rgba(24, 32, 51, .08);
    --bota-shadow-soft: 0 10px 28px rgba(24, 32, 51, .06);
}

* { font-family: 'K2D', sans-serif; }
html { scroll-behavior: smooth; }
body {
    background:
        radial-gradient(circle at 8% 8%, rgba(34, 197, 94, .12), transparent 30%),
        radial-gradient(circle at 92% 0%, rgba(139, 92, 246, .13), transparent 28%),
        linear-gradient(180deg, #fbfefd 0%, var(--bota-bg) 48%, #f8f7ff 100%);
    color: var(--bota-ink);
}

.bota-shell { min-height: 100vh; display: flex; }
.bota-sidebar {
    width: 286px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.82) 100%),
        linear-gradient(145deg, rgba(34,197,94,.18), rgba(139,92,246,.18));
    border-right: 1px solid rgba(230, 233, 242, .9);
    color: var(--bota-ink);
    padding: 22px 18px;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    backdrop-filter: blur(18px);
    box-shadow: 14px 0 40px rgba(24, 32, 51, .04);
}
.bota-main { margin-left: 286px; width: calc(100% - 286px); padding: 26px; }

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(230, 233, 242, .86);
    border-radius: 24px;
    background: rgba(255,255,255,.78);
    box-shadow: var(--bota-shadow-soft);
}
.brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--bota-green), var(--bota-purple));
    display: grid;
    place-items: center;
    font-size: 25px;
    color: #fff;
    box-shadow: 0 12px 26px rgba(34, 197, 94, .22);
}
.brand-title { font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -.2px; }
.brand-subtitle { font-size: 12px; color: var(--bota-muted); margin-top: 3px; }

.sidebar-nav { display: grid; gap: 4px; }
.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 8px 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(105, 115, 134, .12);
    color: #8a93a5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.sidebar-section-title:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.sidebar-section-title i {
    color: var(--bota-purple);
    font-size: 13px;
}
.side-link {
    color: #3c4559;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 16px;
    transition: .18s ease;
    border: 1px solid transparent;
    font-weight: 500;
}
.side-link:hover {
    background: rgba(255,255,255,.86);
    color: var(--bota-purple-dark);
    border-color: rgba(139, 92, 246, .16);
    transform: translateX(2px);
    box-shadow: 0 10px 24px rgba(24, 32, 51, .05);
}
.side-link.active {
    background: linear-gradient(135deg, #ffffff 0%, #f4f0ff 55%, #edfdf4 100%);
    color: var(--bota-purple-dark);
    border-color: rgba(139, 92, 246, .22);
    box-shadow: 0 12px 30px rgba(139, 92, 246, .12);
}
.side-link i {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: var(--bota-green-dark);
    background: var(--bota-green-soft);
}
.side-link.active i { color: #fff; background: linear-gradient(135deg, var(--bota-green), var(--bota-purple)); }
.side-children { margin-left: 14px; padding-left: 10px; border-left: 1px dashed #d9dee9; }
.side-link-child { font-size: 14px; padding: 9px 11px; }

.topbar {
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(230, 233, 242, .9);
    border-radius: 28px;
    padding: 18px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: var(--bota-shadow);
    backdrop-filter: blur(16px);
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bota-green-dark);
    background: var(--bota-green-soft);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}
.topbar h1 { font-size: 27px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--bota-border);
    color: var(--bota-purple-dark);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(24, 32, 51, .05);
}
.icon-btn:hover { color: #fff; background: var(--bota-purple); }
.time-chip, .user-chip {
    display: flex;
    gap: 9px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--bota-border);
    padding: 8px 12px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(24, 32, 51, .05);
}
.time-chip i, .user-chip i { color: var(--bota-green-dark); font-size: 18px; }
.time-chip span { display: block; font-size: 11px; color: var(--bota-muted); line-height: 1; }
.time-chip strong { display: block; font-size: 13px; color: var(--bota-ink); font-weight: 700; margin-top: 2px; white-space: nowrap; }
.user-chip { color: var(--bota-purple-dark); font-weight: 700; background: linear-gradient(135deg, #fff, var(--bota-purple-soft)); }

.btn-bota {
    background: linear-gradient(135deg, var(--bota-green), var(--bota-purple));
    color: #fff;
    border: 0;
    box-shadow: 0 14px 26px rgba(34, 197, 94, .18);
    border-radius: 14px;
    font-weight: 700;
}
.btn-bota:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 18px 32px rgba(139, 92, 246, .22); }
.btn-outline-secondary, .btn-outline-primary, .btn-outline-success, .btn-outline-danger { border-radius: 12px; }
.btn-soft-danger { background: #fff; border-color: #fee2e2; color: #dc2626; }
.btn-soft-danger:hover { background: #dc2626; color: #fff; }

.panel-card, .stat-card {
    background: rgba(255,255,255,.92);
    border-radius: 26px;
    padding: 22px;
    box-shadow: var(--bota-shadow-soft);
    border: 1px solid rgba(230, 233, 242, .92);
    backdrop-filter: blur(12px);
}
.panel-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; color: var(--bota-ink); }
.stat-card { min-height: 150px; position: relative; overflow: hidden; }
.stat-card:after {
    content: "";
    position: absolute;
    width: 92px;
    height: 92px;
    right: -28px;
    top: -28px;
    border-radius: 50%;
    background: rgba(34,197,94,.10);
}
.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bota-green-soft), var(--bota-purple-soft));
    color: var(--bota-purple);
    display: grid;
    place-items: center;
    font-size: 23px;
    margin-bottom: 12px;
}
.stat-value { font-size: 31px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { color: var(--bota-muted); font-weight: 500; }
.module-tile {
    border: 1px solid var(--bota-border);
    padding: 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    transition: .18s ease;
}
.module-tile:hover { transform: translateY(-2px); box-shadow: var(--bota-shadow-soft); }
.module-icon { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; }
.permission-group { border-bottom: 1px dashed #dce2ee; padding: 17px 0; }
.permission-title { font-weight: 800; margin-bottom: 12px; color: var(--bota-purple-dark); }
.notification-item { padding: 16px; border: 1px solid var(--bota-border); border-radius: 18px; margin-bottom: 10px; background: #fff; }
.notification-item.unread { background: #fff8e8; border-color: #f7d78b; }

.table { --bs-table-bg: transparent; }
.table thead th {
    color: #596275;
    font-size: 13px;
    font-weight: 700;
    border-bottom-color: var(--bota-border);
    background: #f9fbff;
}
.table tbody td { border-color: #eef1f6; }
code { color: var(--bota-purple-dark); background: var(--bota-purple-soft); padding: 2px 7px; border-radius: 8px; }
.badge { border-radius: 999px; font-weight: 700; padding: .42rem .62rem; }
.form-control, .form-select {
    border-radius: 14px;
    border-color: #dce2ee;
    min-height: 42px;
}
.form-control:focus, .form-select:focus {
    border-color: rgba(139, 92, 246, .55);
    box-shadow: 0 0 0 .25rem rgba(139, 92, 246, .12);
}
.form-check.border { border-color: var(--bota-border) !important; border-radius: 14px !important; background: #fff; }
.bota-alert { border: 0; border-radius: 18px; box-shadow: var(--bota-shadow-soft); }
.pagination .page-link { border-radius: 12px; margin: 0 3px; border: 1px solid var(--bota-border); color: var(--bota-purple-dark); }
.pagination .active .page-link { background: var(--bota-purple); border-color: var(--bota-purple); }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(34,197,94,.22), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(139,92,246,.23), transparent 28%),
        linear-gradient(135deg, #f7fffb 0%, #f7f4ff 54%, #fff9e7 100%);
}
.login-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: .72;
}
.login-orb-1 { width: 230px; height: 230px; left: 7%; bottom: 10%; background: rgba(34,197,94,.16); }
.login-orb-2 { width: 180px; height: 180px; right: 9%; top: 12%; background: rgba(139,92,246,.17); }
.login-card {
    width: min(468px, calc(100vw - 32px));
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 36px;
    border: 1px solid rgba(255,255,255,.8);
    position: relative;
    z-index: 1;
}
.login-logo {
    width: 78px;
    height: 78px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--bota-green), var(--bota-purple));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 38px;
    margin: 0 auto 12px;
    box-shadow: 0 18px 34px rgba(34, 197, 94, .22);
}
.login-badge {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bota-green-soft);
    color: var(--bota-green-dark);
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 10px;
}
.login-card h1 { font-weight: 800; font-size: 31px; margin-bottom: 4px; letter-spacing: -.4px; }
.login-card p, .login-footer { color: var(--bota-muted); }
.input-icon-wrap { position: relative; }
.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bota-muted);
    font-size: 18px;
}
.input-icon-wrap .form-control { padding-left: 44px; }

@media (max-width: 992px) {
    .bota-sidebar { position: static; width: 100%; min-height: auto; border-right: 0; border-bottom: 1px solid var(--bota-border); }
    .bota-shell { display: block; }
    .bota-main { margin-left: 0; width: 100%; padding: 16px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar-actions { width: 100%; justify-content: flex-start; }
    .time-chip { width: 100%; }
}

@media (max-width: 576px) {
    .login-card { padding: 28px 22px; border-radius: 26px; }
    .topbar h1 { font-size: 23px; }
    .user-chip { max-width: 100%; }
}
