/* =========================================
   ADMIN PANEL STYLES (admin.css)
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
:root { --admin-primary: #2C3E50; --admin-accent: #B76E79; --bg: #f4f6f9; }

/* --- LOGIN PAGE --- */
.login-body { background: linear-gradient(135deg, #fdf8f5, #e0eaf5); display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-container { background: #fff; padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); width: 100%; max-width: 400px; text-align: center; }
.admin-logo { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; border: 2px solid var(--admin-accent); }
.login-header h2 { font-family: 'Playfair Display', serif; color: var(--admin-primary); margin-bottom: 5px; }
.login-header p { color: #777; font-size: 14px; margin-bottom: 30px; }

.input-group { position: relative; margin-bottom: 20px; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.input-group input { width: 100%; padding: 12px 15px 12px 40px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; transition: 0.3s; }
.input-group input:focus { border-color: var(--admin-accent); }

.error-msg { color: #e74c3c; font-size: 13px; margin-bottom: 15px; display: none; }
.admin-btn { width: 100%; background: var(--admin-primary); color: #fff; padding: 12px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.admin-btn:hover { background: var(--admin-accent); }
.back-link { display: inline-block; margin-top: 20px; color: #777; font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--admin-primary); }

/* --- DASHBOARD LAYOUT --- */
.dashboard-body { display: flex; background: var(--bg); min-height: 100vh; overflow-x: hidden; }

/* Sidebar */
.sidebar { width: 250px; background: #fff; border-right: 1px solid #eee; display: flex; flex-direction: column; transition: 0.3s; z-index: 100; }
.sidebar-logo { padding: 20px; text-align: center; border-bottom: 1px solid #eee; }
.sidebar-logo img { width: 50px; border-radius: 50%; margin-bottom: 10px; }
.sidebar-logo h2 { font-size: 18px; color: var(--admin-primary); }
.sidebar-menu { list-style: none; padding: 20px 0; }
.sidebar-menu li a { display: flex; align-items: center; gap: 15px; padding: 15px 25px; color: #555; text-decoration: none; font-weight: 500; transition: 0.3s; }
.sidebar-menu li a:hover, .sidebar-menu li a.active { background: #fdf8f5; color: var(--admin-accent); border-right: 4px solid var(--admin-accent); }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; width: calc(100% - 250px); }
.topbar { background: #fff; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.toggle-btn { font-size: 20px; cursor: pointer; display: none; color: #333; }
.admin-profile { display: flex; align-items: center; gap: 15px; font-weight: 500; color: #333; }
.admin-profile img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.dashboard-content { padding: 30px; }
.page-title { font-size: 24px; color: var(--admin-primary); margin-bottom: 25px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; padding: 20px; border-radius: 12px; display: flex; align-items: center; gap: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); border: 1px solid #eee; }
.stat-icon { width: 60px; height: 60px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 24px; }
.stat-info h3 { font-size: 14px; color: #777; font-weight: 500; margin-bottom: 5px; }
.stat-info p { font-size: 24px; font-weight: 600; color: #333; }

/* Table */
.table-container { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); border: 1px solid #eee; overflow: hidden; }
.table-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.refresh-btn { background: #e0eaf5; color: var(--admin-primary); border: none; padding: 8px 15px; border-radius: 6px; cursor: pointer; font-weight: 500; transition: 0.3s; }
.refresh-btn:hover { background: var(--admin-primary); color: #fff; }

.loading-state { padding: 50px; text-align: center; color: #777; font-size: 16px; }
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #fdfdfd; color: #555; font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
td { color: #333; }

.status-badge { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-badge.pending { background: #fff3e0; color: #e67e22; }
.status-badge.dispatched { background: #e3f2fd; color: #3498db; }
.status-badge.delivered { background: #e8f5e9; color: #2ecc71; }
.status-badge.cancelled { background: #feebe8; color: #e74c3c; }

.action-select { padding: 6px; border-radius: 4px; border: 1px solid #ddd; outline: none; font-family: 'Poppins'; font-size: 12px; cursor: pointer; }

/* Toast */
#toastBox { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; align-items: flex-end; z-index: 5000; }
.toast { width: 300px; background: #fff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-top: 10px; display: flex; align-items: center; gap: 15px; border-left: 5px solid #2ecc71; animation: slideIn 0.3s forwards; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Mobile */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -250px; height: 100vh; }
    .sidebar.active { left: 0; box-shadow: 5px 0 15px rgba(0,0,0,0.1); }
    .main-content { width: 100%; }
    .toggle-btn { display: block; }
}