/* ==========================
   GLOBAL CONFIG
========================== */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI', sans-serif;
}

:root{
    --bg: #020617;
    --card: rgba(17, 24, 39, 0.85);
    --blue: #38bdf8;
    --green: #22c55e;
    --yellow: #f59e0b;
    --text-muted: #94a3b8;
}

body{
    background: linear-gradient(135deg, #020617, #0f172a, #111827);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================
   SIDEBAR (Matches Main Dashboard)
========================== */
.sidebar{
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: 0.3s ease-in-out;
}

.logo{
    text-align: center;
    padding: 25px;
    font-size: 24px;
    font-weight: 700;
    color: var(--blue);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 2px;
}

.sidebar ul{
    list-style: none;
    padding: 15px;
}

.sidebar ul li{
    margin-bottom: 10px;
}

.sidebar ul li a{
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    padding: 14px;
    border-radius: 12px;
    transition: 0.3s;
}

.sidebar ul li a:hover, .sidebar ul li a.active-link{
    background: rgba(56, 189, 248, 0.15);
    color: var(--blue);
    transform: translateX(5px);
}

/* ==========================
   CONTENT WRAPPER
========================== */
.content{
    margin-left: 260px;
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
}

/* ==========================
   TOPBAR
========================== */
.topbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    backdrop-filter: blur(15px);
    padding: 15px 25px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 30px;
}

.topbar h2{
    font-size: clamp(18px, 4vw, 26px);
}

.sync{
    color: var(--text-muted);
    font-size: 14px;
}

#last_sync {
    color: #cbd5e1;
    font-weight: bold;
}

.menu-btn{
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* ==========================
   DASHING ANIMATED CARDS
========================== */
.cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.card{
    background: var(--card);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.6s ease-out both;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.card p{
    color: var(--text-muted);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.card h1{
    font-size: 48px;
    font-weight: 800;
}

/* Dynamic Card Colors & Custom Shadows */
.card.tare h1 { color: var(--blue); }
.card.gross h1 { color: var(--green); }
.card.pending h1 { color: var(--yellow); }

/* Hover Effects with Glowing Borders */
.card.tare:hover {
    transform: translateY(-8px);
    border-color: var(--blue);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}

.card.gross:hover {
    transform: translateY(-8px);
    border-color: var(--green);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.25);
}

.card.pending:hover {
    transform: translateY(-8px);
    border-color: var(--yellow);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25);
}

/* ==========================
   LIVE PULSE INDICATORS
========================== */
.pulse-indicator {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.blue-pulse { background: var(--blue); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); animation: pulseBlue 1.8s infinite; }
.green-pulse { background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: pulseGreen 1.8s infinite; }
.yellow-pulse { background: var(--yellow); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); animation: pulseYellow 1.8s infinite; }

@keyframes pulseBlue { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); } }
@keyframes pulseGreen { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes pulseYellow { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }

/* ==========================
   ANIMATIONS
========================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stagger Animation Load */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

/* ==========================
   RESPONSIVE DESIGN (MOBILE FIX)
========================== */
@media(max-width: 900px){
    .sidebar{
        left: -260px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.6);
    }

    .sidebar.active{
        left: 0;
    }

    .content{
        margin-left: 0;
        padding: 15px;
    }

    .menu-btn{
        display: block;
    }
    
    .cards {
        grid-template-columns: 1fr; /* मोबाइल पर कार्ड एक के नीचे एक आएंगे */
        gap: 15px;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .card h1 {
        font-size: 38px;
    }
}