*{margin:0;padding:0;box-sizing:border-box}
body{
    background:linear-gradient(135deg,#eef2f3,#dfe9f3);
    font-family:'Segoe UI',Roboto,sans-serif;
    overflow-x:hidden;
    color:#333;
}

/* ================= SIDEBAR ================= */
.sidebar{
    width:280px;
    height:100vh;
    position:fixed;
    background:linear-gradient(180deg,#1f4037,#0b3d2e);
    color:#fff;
    padding:2rem 1.5rem;
    border-radius:0 26px 26px 0;
    display:flex;
    flex-direction:column;
    transition:.4s ease;
    z-index:1000;
    box-shadow:8px 0 25px rgba(0,0,0,.25);
}

/* ================= PROFILE ================= */
.profile-section{text-align:center;margin-bottom:1.5rem}
.profile-avatar{
    width:88px;height:88px;border-radius:50%;
    margin:0 auto 1rem;
    overflow:hidden;border:3px solid rgba(255,255,255,.3)
}
.profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-name{font-weight:600}
.profile-email{font-size:.75rem;color:rgba(255,255,255,.7)}

/* ================= NAV ================= */
.nav-menu{
    flex:1;
    overflow-y:auto;
    padding-right:6px;
}
.nav-menu::-webkit-scrollbar{width:5px}
.nav-menu::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.25);
    border-radius:10px;
}

.nav-item{
    display:flex;align-items:center;gap:.9rem;
    padding:.85rem 1.1rem;margin-bottom:.45rem;
    border-radius:12px;
    color:rgba(255,255,255,.85);
    text-decoration:none;
    transition:.35s ease;
    position:relative;overflow:hidden
}
.nav-item:hover{
    transform:translateX(6px);
    background:rgba(255,255,255,.12);
    color:#fff
}
.nav-item.active{
    background:linear-gradient(135deg,#f5af19,#f12711);
    box-shadow:0 8px 18px rgba(0,0,0,.3);
}

/* ================= TOGGLE ================= */
.toggle-sidebar{
    display:none;
    position:fixed;
    top:18px;left:18px;
    background:linear-gradient(135deg,#1f4037,#0b3d2e);
    color:white;border:none;
    padding:.6rem .9rem;
    border-radius:12px;
    font-size:1.2rem;
    cursor:pointer;
    z-index:1100;
}

/* ================= MAIN ================= */
.main-content{
    margin-left:280px;
    padding:2rem;
    animation:fadeUp .7s ease;
}
@keyframes fadeUp{
    from{opacity:0;transform:translateY(25px)}
    to{opacity:1;transform:translateY(0)}
}

/* ================= HEADER ================= */
.page-header{
    background:linear-gradient(135deg,#ffffff,#f8fbff);
    padding:1.6rem 2rem;
    border-radius:22px;
    box-shadow:0 12px 30px rgba(0,0,0,.08);
    margin-bottom:2rem;
}

/* ================= STAT CARDS ================= */
.stat-card{
    border-radius:22px;
    padding:1.6rem;
    color:white;
    box-shadow:0 12px 28px rgba(0,0,0,.18);
    transition:.4s;
}
.stat-card:hover{transform:translateY(-6px)}
.stat-value{font-size:1.9rem;font-weight:700}
.stat-label{font-size:.85rem;opacity:.9}

.stat-blue{background:linear-gradient(135deg,#2196F3,#64B5F6)}
.stat-green{background:linear-gradient(135deg,#4CAF50,#81C784)}
.stat-purple{background:linear-gradient(135deg,#9C27B0,#BA68C8)}
.stat-orange{background:linear-gradient(135deg,#FF9800,#FFB74D)}

/* ================= CARDS ================= */
.data-card{
    background:linear-gradient(135deg,#ffffff,#f6f9ff);
    padding:1.8rem;
    border-radius:22px;
    box-shadow:0 12px 30px rgba(0,0,0,.08);
    margin-top:2rem;
}

/* ================= FORM ================= */
.form-control, .form-select{
    border-radius:12px;
    font-size:.9rem;
}
.btn-submit{
    background:linear-gradient(135deg,#2196F3,#64B5F6);
    border:none;
    color:white;
    padding:.6rem 1.8rem;
    border-radius:20px;
    font-weight:600;
    transition:.3s;
}
.btn-submit:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(33,150,243,.4);
}

/* ================= RESPONSIVE ================= */
@media(max-width:991px){
    .toggle-sidebar{display:block}
    .sidebar{left:-320px;opacity:0}
    .sidebar.show{left:0;opacity:1}
    .main-content{margin-left:0;padding:1rem}
}


/* ================= TOP BAR ================= */
.topbar{
    position:fixed;
    top:0;
    left:0px;
    right:0;
    height:84px;
    background:linear-gradient(135deg,#ffffff,#f4f8ff);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 1.5rem;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
    z-index:900;
    transition:left .4s ease;
}

.topbar-left{
    display:flex;
    align-items:center;
    gap:1rem;
}

.topbar-title{
    font-weight:600;
    letter-spacing:.5px;
    color:#1f2937;
}

.topbar-right{
    display:flex;
    align-items:center;
    gap:.75rem;
}

.topbar-avatar{
    width:36px;
    height:36px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid #ddd;
}

.admin-name{
    font-size:.9rem;
    color:#444;
}

/* ================= MAIN OFFSET ================= */
.main-content{
    margin-top:84px; /* space for top bar */
}

/* ================= TOGGLE UPDATE ================= */
.toggle-sidebar{
    position:static;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#1f4037,#0b3d2e);
    color:white;
    border:none;
    padding:.45rem .75rem;
    border-radius:10px;
    font-size:1.2rem;
    cursor:pointer;
}


@media(max-width:991px){
    .topbar{
        left:0;
    }

    .sidebar{
        transform:translateX(-320px);
        opacity:0;
    }
    .sidebar.show{
        transform:translateX(0);
        opacity:1;
    }

    .main-content{
        margin-left:0;
        padding:1rem;
    }
}


/* ================= ANIMATED SHAPES ================= */
.stat-card{
    position:relative;
    overflow:hidden;
}

/* Base shape */
.stat-shape{
    position:absolute;
    width:140px;
    height:140px;
    border-radius:50%;
    top:-40px;
    right:-40px;
    opacity:.25;
    filter:blur(6px);
    animation:floatShape 6s ease-in-out infinite;
}

/* Floating motion */
@keyframes floatShape{
    0%{transform:translateY(0) translateX(0)}
    50%{transform:translateY(18px) translateX(-12px)}
    100%{transform:translateY(0) translateX(0)}
}

/* Color variations per card */
.stat-blue .stat-shape{
    background:radial-gradient(circle,#ffffff55,#ffffff00);
}

.stat-green .stat-shape{
    background:radial-gradient(circle,#ffffff66,#ffffff00);
    animation-duration:7s;
}

.stat-purple .stat-shape{
    background:radial-gradient(circle,#ffffff55,#ffffff00);
    animation-duration:6.5s;
}

.stat-orange .stat-shape{
    background:radial-gradient(circle,#ffffff66,#ffffff00);
    animation-duration:8s;
}


.stat-shape{
    width:160px;
    height:160px;
    border-radius:58% 42% 63% 37% / 41% 55% 45% 59%;
    opacity:.28;
    filter:blur(5px);
    animation:blobMove 9s ease-in-out infinite;
}

@keyframes blobMove{
    0%,100%{
        border-radius:58% 42% 63% 37% / 41% 55% 45% 59%;
        transform:translate(0,0);
    }
    50%{
        border-radius:42% 58% 37% 63% / 59% 45% 55% 41%;
        transform:translate(-20px,15px);
    }
}

/* ================= STAT CARD LAYER FIX ================= */
.stat-card{
    position:relative;
    overflow:hidden;
}

/* ================= VISIBLE ANIMATED SHAPE ================= */
.stat-shape{
    position:absolute;
    width:120px;
    height:120px;
    right:-30px;
    bottom:-30px;

    background:rgba(255,255,255,.35);
    border-radius:50%;

    z-index:1;                /* IMPORTANT */
    filter:blur(2px);         /* Reduced blur */
    animation:shapeFloat 6s ease-in-out infinite;
}

/* Ensure text stays above shape */
.stat-value,
.stat-label{
    position:relative;
    z-index:2;
}

/* Floating animation */
@keyframes shapeFloat{
    0%{transform:translate(0,0)}
    50%{transform:translate(-14px,-12px)}
    100%{transform:translate(0,0)}
}

/* Color enhancement per card */
.stat-blue .stat-shape{
    background:rgba(255,255,255,1);
    animation-duration:9s;
}

.stat-green .stat-shape{
    background:rgba(255,255,255,1);
    animation-duration:7s;
}

.stat-purple .stat-shape{
    background:rgba(255,255,255,1);
    animation-duration:6.5s;
}

.stat-orange .stat-shape{
    background:rgba(255,255,255,1);
    animation-duration:8s;
}


/* ================= GLOBAL ANIMATIONS ================= */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= TOP BAR ================= */
.topbar {
    animation: fadeSlideDown .6s ease both;
}

/* ================= SIDEBAR ================= */
.sidebar {
    animation: fadeSlideUp .6s ease both;
}

/* Sidebar nav stagger */
.nav-item {
    opacity: 0;
    animation: navReveal .5s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: .1s }
.nav-item:nth-child(2) { animation-delay: .15s }
.nav-item:nth-child(3) { animation-delay: .2s }
.nav-item:nth-child(4) { animation-delay: .25s }
.nav-item:nth-child(5) { animation-delay: .3s }
.nav-item:nth-child(6) { animation-delay: .35s }

@keyframes navReveal {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ================= MAIN CONTENT ================= */
.main-content {
    animation: fadeSlideUp .7s ease both;
}

/* ================= STAT CARDS ================= */
.stat-card {
    animation: statReveal .6s ease both;
    transition: transform .3s ease, box-shadow .3s ease;
}

.stat-card:nth-child(1) { animation-delay: .15s }
.stat-card:nth-child(2) { animation-delay: .25s }
.stat-card:nth-child(3) { animation-delay: .35s }
.stat-card:nth-child(4) { animation-delay: .45s }

@keyframes statReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hover lift */
.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

/* ================= STAT VALUE PULSE ================= */
.stat-value {
    animation: valuePulse 2.5s ease-in-out infinite;
}

@keyframes valuePulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ================= SHAPE ANIMATION (ENHANCED) ================= */
.stat-shape {
    animation: shapeFloat 7s ease-in-out infinite;
}

@keyframes shapeFloat {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-22px,-18px) scale(1.15); }
    100% { transform: translate(0,0) scale(1); }
}

/* ================= DATA CARDS ================= */
.data-card {
    animation: fadeSlideUp .8s ease both;
    transition: box-shadow .3s ease;
}

.data-card:hover {
    box-shadow: 0 18px 38px rgba(0,0,0,.12);
}

/* ================= TABLE ROW HOVER ================= */
.table tbody tr {
    transition: background .25s ease, transform .25s ease;
}

/*.table tbody tr:hover {
    background: rgba(0,0,0,.03);
    transform: scale(1.01);
}*/

/* ================= FORM INTERACTIONS ================= */
.form-control,
.form-select {
    transition: border-color .25s ease, box-shadow .25s ease;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 .25rem rgba(33,150,243,.2);
}

/* ================= BUTTON ================= */
.btn-submit {
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content:'';
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:linear-gradient(120deg,transparent,rgba(255,255,255,.4),transparent);
    transition:.6s;
}

.btn-submit:hover::after {
    left:100%;
}


/* ================= LOGIN BACKGROUND ================= */
.login-body{
    min-height:100vh;
    background:linear-gradient(135deg,#0f2027,#203a43,#2c5364);
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* Animated blobs */
.login-bg{
    position:fixed;
    inset:0;
    z-index:0;
    overflow:hidden;
}

.bg-blob{
    position:absolute;
    width:300px;
    height:300px;
    border-radius:50%;
    filter:blur(80px);
    opacity:.6;
    animation:blobMove 12s infinite alternate;
}

.blob-1{
    background:#00bcd4;
    top:-100px;
    left:-100px;
}

.blob-2{
    background:#2196f3;
    bottom:-120px;
    right:-120px;
    animation-duration:14s;
}

.blob-3{
    background:#4caf50;
    top:40%;
    left:60%;
    animation-duration:16s;
}

@keyframes blobMove{
    from{transform:translate(0,0)}
    to{transform:translate(60px,40px)}
}

/* ================= LOGIN CARD ================= */
.login-wrapper{
    position:relative;
    z-index:1;
    width:100%;
    max-width:420px;
    padding:1rem;
}

.login-card{
    padding:2.5rem 2.2rem;
    border-radius:26px;
    text-align:center;
    animation:fadeSlideUp .8s ease;
}

/* Glassmorphism */
.glass{
    background:rgba(255,255,255,.15);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border:1px solid rgba(255,255,255,.25);
    box-shadow:0 30px 80px rgba(0,0,0,.35);
}

/* ================= TEXT ================= */
.login-title{
    font-weight:700;
    color:#fff;
    margin-bottom:.25rem;
}

.login-subtitle{
    color:rgba(255,255,255,.75);
    font-size:.9rem;
    margin-bottom:2rem;
}

/* ================= INPUTS ================= */
.fancy-input{
    background:rgba(255,255,255,.15);
    border:1px solid rgba(255,255,255,.3);
    border-radius:14px;
    padding:.75rem 1rem;
    color:#fff;
}

.fancy-input::placeholder{
    color:rgba(255,255,255,.6);
}

.fancy-input:focus{
    background:rgba(255,255,255,.2);
    border-color:#4fc3f7;
    box-shadow:0 0 0 .25rem rgba(79,195,247,.25);
    color:#fff;
}

/* ================= BUTTON ================= */
.btn-submit{
    background:linear-gradient(135deg,#2196f3,#00bcd4);
    border:none;
    border-radius:30px;
    padding:.7rem;
    font-weight:600;
    letter-spacing:.5px;
    transition:.4s;
}

.btn-submit:hover{
    transform:translateY(-3px);
    box-shadow:0 18px 40px rgba(0,188,212,.6);
}

/* ================= FOOTER ================= */
.login-footer{
    margin-top:1.5rem;
    color:rgba(255,255,255,.7);
    font-size:.75rem;
}


/* ================= LOGIN LOGO ================= */
.login-logo{
    display:flex;
    justify-content:center;
    margin-bottom:1rem;
}

.login-logo img{
    width:100%;
    height:auto;
    filter:drop-shadow(0 6px 18px rgba(0,0,0,.4));
    animation:logoFloat 4s ease-in-out infinite;
}

/* Subtle floating effect */
@keyframes logoFloat{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(-6px); }
}


.nav-tabs .nav-link {
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  border-bottom: 3px solid #0d6efd;
  background: #f8f9fa;
}


/* ================= CUSTOM TABS (50% EACH) ================= */

.nav-tabs{
    display:flex;
    border:none;
    background:linear-gradient(135deg,#ffffff,#f4f8ff);
    padding:6px;
    border-radius:18px;
    box-shadow:0 10px 26px rgba(0,0,0,.08);
}

/* Each tab = 50% */
.nav-tabs .nav-item{
    flex:1;
    margin:0;
}

/* Tab buttons */
.nav-tabs .nav-link{
    width:100%;
    border:none;
    border-radius:14px;
    font-weight:600;
    color:#444;
    padding:.85rem 1rem;
    transition:all .35s ease;
    background:transparent;
}

/* Hover */
.nav-tabs .nav-link:hover{
    background:rgba(0,0,0,.04);
    transform:translateY(-1px);
}

/* Active tab */
.nav-tabs .nav-link.active{
    background:linear-gradient(135deg,#2196F3,#64B5F6);
    color:#fff;
    box-shadow:0 10px 22px rgba(33,150,243,.45);
    transform:translateY(-2px);
}

/* Remove Bootstrap focus outline */
.nav-tabs .nav-link:focus{
    box-shadow:none;
}

/* ================= TAB CONTENT ================= */

.tab-content{
    background:linear-gradient(135deg,#ffffff,#f6f9ff);
    padding:1.8rem;
    margin-top:1.2rem;
    border-radius:22px;
    box-shadow:0 12px 30px rgba(0,0,0,.08);
    animation:fadeSlideUp .6s ease;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #e0e0e0;
}

/* Dropdown container */
.avatar-dropdown {
    position: relative;
}

/* Dropdown menu */
.avatar-menu {
    position: absolute;
    right: 0;
    top: 50px;
    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 25px rgba(0,0,0,.15);
    display: none;
    padding: 12px;
    z-index: 999;
}

/* Visible state */
.avatar-menu.show {
    display: block;
}

.avatar-user {
    font-weight: 600;
    margin-bottom: 8px;
}

.avatar-time {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.avatar-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.avatar-logout {
    display: block;
    text-decoration: none;
    color: #d32f2f;
    font-weight: 600;
    padding: 6px;
    border-radius: 6px;
}

.avatar-logout:hover {
    background: #fbe9e7;
}

td, tr, th {
    border: 1px solid #a5a5a5;
}

/* Base button */
.neo-mat-btn {
    position: relative;
    height: 80px;
    border-radius: 18px;
    background: #eef1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    overflow: hidden;
    box-shadow:
        8px 8px 18px rgba(0,0,0,0.08),
       -8px -8px 18px rgba(255,255,255,0.9);
    transition: all 0.25s ease;
}

/* Icon */
.neo-mat-btn .icon {
    font-size: 24px;
}

/* Hover – material glow */
.neo-mat-btn:hover {
    transform: translateY(-4px);
    color: #0d6efd;
    box-shadow:
        0 10px 25px rgba(13,110,253,0.25),
        inset 0 0 0 rgba(0,0,0,0);
}

/* Click press animation */
.neo-mat-btn:active {
    transform: scale(0.97);
    box-shadow:
        inset 6px 6px 12px rgba(0,0,0,0.12),
        inset -6px -6px 12px rgba(255,255,255,0.9);
}

/* Active page */
.neo-mat-btn.active {
    background: linear-gradient(135deg, #0d6efd, #00c6ff);
    color: #fff;
    box-shadow:
        0 10px 25px rgba(13,110,253,0.45);
}

/* Ripple animation */
.neo-mat-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    opacity: 0;
}

.neo-mat-btn:active::after {
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: width 0.6s ease, height 0.6s ease, opacity 0.8s;
}

/* Logout special */
.neo-mat-btn.logout {
    color: #dc3545;
}

.neo-mat-btn.logout:hover {
    background: linear-gradient(135deg, #dc3545, #ff6a6a);
    color: #fff;
}