/* ================= GLOBAL ================= */

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
}

/* ================= LOGIN PAGE ================= */

.login-body {
    min-height: 100vh;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-left h1 {
    font-size: 38px;
    margin-bottom: 15px;
}

.login-left p {
    font-size: 18px;
    opacity: 0.9;
}

.login-right {
    flex: 1;
    background: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: white;
    padding: 40px;
    width: 350px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease-in-out;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 25px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 12px;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn:hover {
    background: #1e40af;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 15px;
}

/* ================= ADMIN PANEL ================= */

.admin-body {
    background: #f4f6f9;
}

.admin-container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.top-links a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    margin-right: 10px;
}

.dashboard-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.card-box {
    flex: 1;
    min-width: 200px;
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-box:hover {
    transform: translateY(-6px);
}

.card-box h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.card-box p {
    font-size: 28px;
    font-weight: bold;
}

.total { background: linear-gradient(135deg,#1e3a8a,#2563eb); }
.pending { background: linear-gradient(135deg,#f59e0b,#d97706); }
.transit { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.delivered { background: linear-gradient(135deg,#16a34a,#15803d); }

/* ================= FORM ================= */

form {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

form input,
form select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.save-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.save-btn:hover {
    background: #1d4ed8;
}

/* ================= TABLE ================= */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th {
    background: #1e3c72;
    color: #fff;
    padding: 12px;
    text-align: center;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
text-align: center;
}

.admin-table tr:hover {
    background: #f9fafb;
}

/* ================= STATUS BADGE ================= */

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.status.Pending { background:#fef3c7; color:#92400e; }
.status.InTransit { background:#dbeafe; color:#1e40af; }
.status.Delivered { background:#d1fae5; color:#065f46; }
.status.OrderPlaced { background:#e5e7eb; color:#374151; }
.status.Processing { background:#cffafe; color:#0e7490; }
.status.Dispatched { background:#dbeafe; color:#1d4ed8; }
.status.OutforDelivery { background:#ffedd5; color:#c2410c; }

/* ================= TIMELINE ================= */

.timeline {
    margin-top: 30px;
    border-left: 3px solid #e5e7eb;
    padding-left: 30px;
}

.timeline-step {
    position: relative;
    margin-bottom: 25px;
}

.timeline-step:before {
    content:"";
    position:absolute;
    left:-8px;
    top:5px;
    width:14px;
    height:14px;
    background:#d1d5db;
    border-radius:50%;
}

.timeline-step.active {
    border-left:3px solid #2563eb;
}

.timeline-step.active:before {
    background:#2563eb;
}

/* ================= ANIMATION ================= */

@keyframes fadeIn {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:translateY(0); }
}

/* ================= SIDEBAR LAYOUT ================= */

.admin-layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:240px;
    background:linear-gradient(180deg,#1e3a8a,#2563eb);
    color:white;
    padding:30px 20px;
    display:flex;
    flex-direction:column;
}

.sidebar h2{
    margin-bottom:30px;
}

.sidebar a{
    color:white;
    text-decoration:none;
    padding:12px;
    border-radius:8px;
    margin-bottom:10px;
    transition:0.3s;
}

.sidebar a:hover{
    background:rgba(255,255,255,0.15);
}

.logout-link{
    margin-top:auto;
    background:#dc2626;
    text-align:center;
}

.logout-link:hover{
    background:#b91c1c;
}

.main-content{
    flex:1;
    background:#f4f6f9;
    padding:30px;
}

/* ================= DASHBOARD HERO ================= */

.dashboard-hero{
    background:linear-gradient(135deg,#2563eb,#1e40af);
    color:white;
    padding:30px;
    border-radius:15px;
    margin-bottom:25px;
    box-shadow:0 10px 30px rgba(0,0,0,0.1);
}

.dashboard-hero h1{
    margin:0;
    font-size:26px;
}

.dashboard-hero p{
    margin-top:8px;
    opacity:0.9;
    font-size:15px;
}

.card-box{
    position:relative;
    overflow:hidden;
}

.card-box::after{
    content:"";
    position:absolute;
    width:120px;
    height:120px;
    background:rgba(255,255,255,0.15);
    border-radius:50%;
    top:-40px;
    right:-40px;
}

.admin-container h2{
    margin-top:35px;
    margin-bottom:15px;
    color:#1e3a8a;
    font-weight:600;
}

/* HOMEPAGE DESIGN */

.homepage-body{
    margin:0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg,#1e3c72,#2a5298);
    color:white;
}

.homepage-container{
    padding:40px;
}

.homepage-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Isse overlap khatam hoga */
    gap: 10px;
    padding: 10px 0;
}

.logo {
    font-size: 24px;
    flex: 1; /* Logo ko space dega */
}

.nav-btn {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    white-space: nowrap; /* Text ko ek line mein rakhega */
}

/* Mobile ke liye khas fix */
@media (max-width: 600px) {
    .homepage-navbar {
        flex-direction: column; /* Mobile par logo upar, buttons niche */
        gap: 15px;
    }
    .nav-btn {
        margin: 0;
        width: 100%; /* Mobile par buttons barabar nazar aayenge */
        text-align: center;
    }
}

.admin-btn{
    background:#ff9800;
    color:white;
}

.user-btn{
    background:#4caf50;
    color:white;
}

.hero-section{
    text-align:center;
    margin-top:80px;
}

.hero-section h1{
    font-size:40px;
    margin-bottom:15px;
}

.hero-section p{
    font-size:18px;
    opacity:0.9;
}

.hero-buttons{
    margin-top:30px;
}

.main-btn{
    padding:12px 25px;
    background:#4caf50;
    color:white;
    text-decoration:none;
    border-radius:6px;
    margin-right:15px;
}

.secondary-btn{
    padding:12px 25px;
    background:#ff9800;
    color:white;
    text-decoration:none;
    border-radius:6px;
}

.features-section{
    margin-top:100px;
    display:flex;
    justify-content:space-around;
    flex-wrap:wrap;
}

.feature-box{
    background:rgba(255,255,255,0.1);
    padding:25px;
    border-radius:10px;
    width:250px;
    margin:15px;
    text-align:center;
}

.homepage-footer{
    margin-top:80px;
    text-align:center;
    opacity:0.8;
}

/* PREMIUM DASHBOARD */

.premium-hero{
    background: linear-gradient(135deg,#667eea,#764ba2);
    color:white;
    padding:30px;
    border-radius:15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-shadow:0 10px 25px rgba(0,0,0,0.2);
    margin-bottom:30px;
}

.premium-hero h1{
    margin:0;
}

.hero-stats{
    font-size:18px;
    background:rgba(255,255,255,0.2);
    padding:10px 15px;
    border-radius:8px;
}

.premium-cards{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.premium-card{
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.premium-card:hover{
    transform:translateY(-5px);
}

.premium-card p{
    font-size:28px;
    margin-top:10px;
    font-weight:bold;
}

/* Different Colors */

.premium-card.total{
    background: linear-gradient(135deg,#36d1dc,#5b86e5);
}

.premium-card.pending{
    background: linear-gradient(135deg,#f7971e,#ffd200);
}

.premium-card.transit{
    background: linear-gradient(135deg,#00c6ff,#0072ff);
}

.premium-card.delivered{
    background: linear-gradient(135deg,#11998e,#38ef7d);
}



.chart-container{
    background:white;
    padding:30px;
    border-radius:15px;
    box-shadow:0 10px 25px rgba(0,0,0,0.1);
    margin-bottom:40px;
    text-align:center;
}

.chart-container canvas{
    max-width:400px;
    margin:auto;
}

#monthlyChart{
    max-width: 100%;
    height: 350px !important;
}

.register-btn{
    background:#10b981;
    color:white;
}

.track-btn{
    background:#f59e0b;
    color:white;
}

.register-btn:hover{
    background:#059669;
}

.track-btn:hover{
    background:#d97706;
}

.sub-buttons{
    margin-top:15px;
    display:flex;
    gap:10px;
    justify-content:center;
    flex-wrap:wrap;
}

.sub-buttons a{
    background:#f59e0b;
    color:white;
}

.sub-buttons a:hover{
    background:#d97706;
}

.user-cards{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:20px;
    margin:20px 0;
}

.card{
    padding:20px;
    border-radius:15px;
    color:white;
    text-align:center;
    box-shadow:0 10px 20px rgba(0,0,0,0.1);
}

.card:hover{
    transform:translateY(-5px);
}

.card h3{
    margin-bottom:10px;
}

.card p{
    font-size:22px;
    font-weight:bold;
}

/* Colors */
.total{ background: linear-gradient(135deg,#36d1dc,#5b86e5); }
.pending{ background: linear-gradient(135deg,#f7971e,#ffd200); }
.transit{ background: linear-gradient(135deg,#0072ff,#00c6ff); }
.delivered{ background: linear-gradient(135deg,#38ef7d,#11998e); }


table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    text-align: center;
    padding: 12px;
}

table th {
    background: #2563eb;
    color: white;
}

table td {
    background: #f9fafb;
}

td {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;   /* 🔥 sab ek line me */
    padding: 10px;
}

th {
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.action-btns {
    display: flex;
    justify-content: center;
    gap: 8px;
}


.admin-table tr:hover{
    background:#f1f5f9;
    transition:0.3s;
}

.admin-table th{
    background:#1e3a8a;
    color:white;
}

.admin-table td{
    font-size:14px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.admin-table th {
    background: linear-gradient(135deg,#1e3a8a,#2563eb);
    color: white;
    padding: 14px;
    font-size: 14px;
}

.admin-table td {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    white-space: nowrap; /* 🔥 sab ek line me */
}

.admin-table tr:nth-child(even) {
    background: #f9fafb;
}

.admin-table tr:hover {
    background: #eef2ff;
}

.proof-box{
    background:#ffffff;
    padding:25px;
    border-radius:12px;
    box-shadow:0 10px 25px rgba(0,0,0,0.1);
    margin-bottom:25px;
}

.proof-box h2{
    margin-bottom:15px;
}

.admin-table td {
    white-space: nowrap;
}

.section-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.main-content {
    padding: 20px 40px;
}

.admin-container {
    max-width: 1200px;
    margin: auto;
}

.section-box:hover {
    transform: translateY(-3px);
    transition: 0.3s;
}

.section-box {
    background: #fff;
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    width: 95%;   /* 👈 sab ko thora wide karega */
}

.main-content {
    padding-left: 30px;
}


/* MOBILE RESPONSIVE FIX */
@media (max-width: 768px) {

    body {
        padding: 10px;
    }

    .container,
    .admin-container {
        width: 100%;
        padding: 10px;
    }

    input, select, button {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .form-grid {
        display: block !important;
    }

    .cards {
        flex-direction: column !important;
    }

    .card {
        width: 100% !important;
    }

    table {
        font-size: 12px;
        overflow-x: auto;
        display: block;
    }

    .sidebar {
        width: 100%;
        position: relative;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

.navbar-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end; 
    align-items: center; 
}

/* Mobile screen ke liye specific fix */
@media (max-width: 600px) {
    .navbar-buttons {
        justify-content: center; /* Mobile par buttons center mein dikhenge */
    }
}

/* MOBILE RESPONSIVE FIX */
@media (max-width: 768px) {

    .top-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        position: static !important;
        margin-top: 10px;
    }

    .top-buttons a {
        width: 80%;
        text-align: center;
    }

}

@media (max-width: 600px) {
    .homepage-navbar {
        flex-direction: row;
        justify-content: space-between;
    }

    .navbar-buttons {
        justify-content: flex-end;
    }
}

/* FINAL NAVBAR FIX */

.homepage-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-buttons {
    display: flex;
    gap: 10px;
}

@media (max-width: 600px) {
    .homepage-navbar {
        flex-direction: column;
        align-items: center;
    }

    .navbar-buttons {
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        width: 90%;
        text-align: center;
    }
}

