:root{
    --bg:#f3f6fb;
    --card:#ffffff;
    --line:#e7edf5;
    --text:#172033;
    --muted:#6b7280;
    --primary:#2563eb;
    --primary-2:#1d4ed8;
    --sidebar-1:#0f172a;
    --sidebar-2:#1e293b;
    --success-bg:#dcfce7;
    --success-tx:#166534;
    --danger-bg:#fee2e2;
    --danger-tx:#991b1b;
    --warn-bg:#fef3c7;
    --warn-tx:#92400e;
    --shadow:0 10px 30px rgba(15, 23, 42, 0.06);
    --radius:18px;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:'Segoe UI', Roboto, Arial, sans-serif;
    background:linear-gradient(180deg,#f8fbff 0%, #f3f6fb 100%);
    color:var(--text);
}

/* layout */
.app-layout{
    display:flex;
    min-height:100vh;
}

/* sidebar */
.sidebar{
    width:280px;
    background:linear-gradient(180deg,var(--sidebar-1),var(--sidebar-2));
    color:#fff;
    padding:18px 14px;
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    overflow-y:auto;
    border-right:1px solid rgba(255,255,255,0.04);
}

.sidebar::-webkit-scrollbar{
    width:8px;
}
.sidebar::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.12);
    border-radius:999px;
}

.sidebar-brand{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
    padding:10px 8px 16px;
    border-bottom:1px solid rgba(255,255,255,0.08);
}

.brand-logo{
    width:46px;
    height:46px;
    border-radius:14px;
    background:linear-gradient(135deg,var(--primary),#4f8dfc);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:18px;
    box-shadow:0 12px 24px rgba(37,99,235,0.28);
}

.sidebar-brand h5{
    font-size:16px;
    font-weight:700;
}
.sidebar-brand small{
    color:#cbd5e1;
}

.sidebar-nav{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding-top:8px;
}

.sidebar-section-title{
    margin-top:16px;
    margin-bottom:6px;
    padding:0 10px;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#94a3b8;
    font-weight:700;
}

.sidebar-link{
    color:#e5e7eb;
    text-decoration:none;
    padding:11px 12px;
    border-radius:12px;
    transition:all .2s ease;
    display:flex;
    align-items:center;
    gap:10px;
    font-size:14px;
    font-weight:500;
}

.sidebar-link i{
    width:18px;
    text-align:center;
    font-size:15px;
    opacity:.95;
}

.sidebar-link:hover{
    background:rgba(255,255,255,0.08);
    color:#fff;
    transform:translateX(2px);
}

.sidebar-link.active{
    background:linear-gradient(90deg, rgba(37,99,235,0.95), rgba(59,130,246,0.85));
    color:#fff;
    box-shadow:0 12px 24px rgba(37,99,235,0.20);
}

/* main */
.main-area{
    margin-left:280px;
    width:calc(100% - 280px);
    min-height:100vh;
}

/* topbar */
.topbar{
    background:rgba(255,255,255,.75);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--line);
    padding:16px 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    position:sticky;
    top:0;
    z-index:10;
}

.topbar-left{
    display:flex;
    align-items:center;
    gap:14px;
}

.page-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:999px;
    padding:8px 14px;
    box-shadow:var(--shadow);
    font-weight:600;
}

.page-chip i{
    color:var(--primary);
}

.topbar-user-card{
    display:flex;
    align-items:center;
    gap:12px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:999px;
    padding:8px 10px 8px 8px;
    box-shadow:var(--shadow);
}

.user-avatar{
    width:38px;
    height:38px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--primary),#60a5fa);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-weight:700;
    box-shadow:0 8px 18px rgba(37,99,235,0.24);
}

.user-meta{
    display:flex;
    flex-direction:column;
    line-height:1.1;
}
.user-meta strong{
    font-size:13px;
}
.user-meta small{
    color:var(--muted);
}

.btn-danger-soft{
    border:none;
    background:#fff1f2;
    color:#be123c;
    border-radius:999px;
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.btn-danger-soft:hover{
    background:#ffe4e6;
    color:#9f1239;
}

/* content */
.content-area{
    padding:24px;
}

/* cards */
.card-pro{
    background:var(--card);
    border-radius:var(--radius);
    padding:22px;
    box-shadow:var(--shadow);
    border:1px solid rgba(231,237,245,.9);
}

.stat-card{
    padding:22px;
    border-radius:var(--radius);
    background:linear-gradient(180deg,#ffffff 0%, #fbfdff 100%);
    box-shadow:var(--shadow);
    border:1px solid rgba(231,237,245,.9);
    position:relative;
    overflow:hidden;
}

.stat-card::after{
    content:"";
    position:absolute;
    right:-20px;
    top:-20px;
    width:90px;
    height:90px;
    border-radius:50%;
    background:rgba(37,99,235,0.06);
}

.stat-number{
    font-size:30px;
    font-weight:800;
    margin-top:6px;
    color:#0f172a;
}

/* tables */
.table{
    border-radius:14px;
    overflow:hidden;
    margin-bottom:0;
}

.table thead th{
    background:#f8fafc;
    font-weight:700;
    font-size:13px;
    color:#334155;
    border-bottom:1px solid var(--line);
}

.table td{
    vertical-align:middle;
    border-color:#eef2f7;
}

.table tbody tr:hover{
    background:#fbfdff;
}

/* forms */
.form-control,
.form-select{
    border-radius:12px;
    border:1px solid #dbe4ef;
    min-height:46px;
    padding:.7rem .9rem;
    box-shadow:none;
}

textarea.form-control{
    min-height:auto;
}

.form-control:focus,
.form-select:focus{
    border-color:#8bb4ff;
    box-shadow:0 0 0 4px rgba(37,99,235,0.10);
}

/* buttons */
.btn{
    border-radius:12px;
    font-weight:600;
    padding:.6rem 1rem;
}

.btn-primary{
    background:linear-gradient(135deg,var(--primary),var(--primary-2));
    border:none;
    box-shadow:0 10px 20px rgba(37,99,235,.18);
}

.btn-primary:hover{
    background:linear-gradient(135deg,var(--primary-2),#1e40af);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-danger{
    border-radius:12px;
}

/* alerts */
.alert{
    border:none;
    border-radius:14px;
    box-shadow:var(--shadow);
}

/* badges */
.badge-soft{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:7px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.badge-aprobado{
    background:var(--success-bg);
    color:var(--success-tx);
}

.badge-rechazado{
    background:var(--danger-bg);
    color:var(--danger-tx);
}

.badge-pendiente{
    background:var(--warn-bg);
    color:var(--warn-tx);
}

/* util */
.list-group-item{
    background:transparent;
}

.border.rounded.p-3{
    background:#fff;
    border-color:#eef2f7 !important;
    border-radius:14px !important;
}

.card-pro img{
    display:block;
    border-radius:14px !important;
}

.lead{
    font-size:1.05rem;
}

/* login */
.login-wrap{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 35%),
        radial-gradient(circle at bottom right, rgba(59,130,246,.10), transparent 35%),
        linear-gradient(180deg,#f7faff 0%, #eef4fb 100%);
}

.login-card{
    border:none;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 24px 60px rgba(15,23,42,.12);
}

.login-card .card-body{
    background:rgba(255,255,255,.95);
}

/* responsive */
@media (max-width: 991px){
    .sidebar{
        position:relative;
        width:100%;
        bottom:auto;
        border-right:none;
    }

    .main-area{
        margin-left:0;
        width:100%;
    }

    .app-layout{
        flex-direction:column;
    }

    .topbar{
        padding:14px 16px;
    }

    .content-area{
        padding:16px;
    }
}