/* PRIYO TELECOM - Admin Panel CSS - Classic Desktop Style */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
:root {
    --primary:#1a3c8f; --secondary:#f5a623; --dark:#0d1f4e;
    --sidebar:220px; --topbar:60px;
}
body { font-family:'Segoe UI',sans-serif; background:#f0f2f8; min-height:100vh; }

/* Desktop: sidebar+main side by side */
@media(min-width:901px) {
    body { display:flex; }
    .main { margin-left:var(--sidebar); flex:1; display:flex; flex-direction:column; }
}

/* Mobile: stacked */
@media(max-width:900px) {
    body { display:block; }
    .main { margin-left:0; display:block; }
}

/* ===== SIDEBAR ===== */
.sidebar {
    width:var(--sidebar);
    background:linear-gradient(180deg,var(--dark),var(--primary));
    position:fixed; top:0; left:0; bottom:0;
    overflow-y:auto; z-index:200;
    scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.15) transparent;
    transition:transform 0.3s ease;
}
.sidebar::-webkit-scrollbar{width:3px}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.2);border-radius:3px}
.sidebar-logo{padding:22px 20px 18px;border-bottom:1px solid rgba(255,255,255,0.1)}
.sidebar-logo h2{color:#fff;font-size:18px;font-weight:800}
.sidebar-logo h2 span{color:var(--secondary)}
.sidebar-logo p{color:rgba(255,255,255,0.45);font-size:11px;margin-top:2px}
.sidebar-logo-inner{display:flex;align-items:flex-start;justify-content:space-between}
.sidebar-close{display:none;background:none;border:none;color:rgba(255,255,255,0.6);font-size:18px;cursor:pointer;padding:2px 6px}
.nav-label{padding:14px 20px 5px;color:rgba(255,255,255,0.3);font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase}
.nav-item{display:flex;align-items:center;gap:11px;padding:11px 20px;color:rgba(255,255,255,0.7);text-decoration:none;font-size:13px;transition:0.2s;border-left:3px solid transparent}
.nav-item:hover,.nav-item.active{background:rgba(255,255,255,0.12);color:#fff;border-left-color:var(--secondary)}
.nav-item i{width:16px;font-size:14px;text-align:center}
.nav-badge{background:var(--secondary);color:var(--dark);font-size:10px;padding:2px 7px;border-radius:10px;margin-left:auto;font-weight:800;min-width:20px;text-align:center}

/* ===== OVERLAY (mobile only) ===== */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:199}

/* ===== MAIN ===== */
.main{margin-left:var(--sidebar);min-height:100vh;display:flex;flex-direction:column}

/* ===== TOPBAR ===== */
.topbar{
    background:#fff;height:var(--topbar);padding:0 25px;
    display:flex;align-items:center;justify-content:space-between;
    box-shadow:0 2px 8px rgba(0,0,0,0.06);position:sticky;top:0;z-index:100
}
.topbar-left{display:flex;align-items:center;gap:12px}
.menu-toggle{display:none;background:none;border:none;font-size:22px;color:var(--dark);cursor:pointer;padding:4px 8px;border-radius:8px}
.topbar h1{font-size:20px;font-weight:700;color:var(--dark)}
.topbar-right{display:flex;align-items:center;gap:12px}
.admin-badge{background:var(--primary);color:#fff;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:500}
.topbar-date{font-size:12px;color:#999}

/* ===== CONTENT ===== */
.content{padding:25px;flex:1}

/* ===== STATS ===== */
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:24px}
.stat-card{background:#fff;border-radius:16px;padding:20px;box-shadow:0 2px 12px rgba(0,0,0,0.05);display:flex;align-items:center;gap:14px;transition:0.2s;cursor:default}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 6px 24px rgba(0,0,0,0.1)}
.stat-icon{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.stat-icon.blue{background:#e8f0fe;color:var(--primary)}
.stat-icon.yellow{background:#fff8e6;color:#d69e2e}
.stat-icon.green{background:#f0fff4;color:#38a169}
.stat-icon.red{background:#fff5f5;color:#e53e3e}
.stat-info h3{font-size:24px;font-weight:800;color:var(--dark)}
.stat-info p{font-size:12px;color:#888;margin-top:3px}

/* ===== CARD ===== */
.card{background:#fff;border-radius:16px;padding:22px;box-shadow:0 2px 12px rgba(0,0,0,0.05);margin-bottom:20px}
.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.card-header h3{font-size:15px;font-weight:700;color:var(--dark)}
.view-all{color:var(--primary);font-size:13px;text-decoration:none;font-weight:600}

/* ===== ROW GRID ===== */
.row{display:grid;grid-template-columns:1.6fr 1fr;gap:20px}

/* ===== TABLE ===== */
.table-wrap{background:#fff;border-radius:16px;box-shadow:0 2px 12px rgba(0,0,0,0.05);overflow:hidden;margin-bottom:20px}
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:collapse;font-size:13px}
th{background:#f8fafc;padding:12px 15px;text-align:left;color:#666;font-weight:600;border-bottom:2px solid #eee;white-space:nowrap}
td{padding:11px 15px;border-bottom:1px solid #f5f5f5;vertical-align:middle}
tr:last-child td{border:none}
tr:hover td{background:#fafbff}

/* ===== BADGES ===== */
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:700}
.badge-active,.badge-success{background:#f0fff4;color:#38a169}
.badge-inactive,.badge-failed{background:#fff5f5;color:#e53e3e}
.badge-pending{background:#fffaf0;color:#d69e2e}
.badge-processing{background:#ebf8ff;color:#3182ce}
.badge-refunded{background:#faf5ff;color:#805ad5}
.badge-user{background:#e8f0fe;color:var(--primary)}
.badge-reseller{background:#fff8e6;color:#d69e2e}

/* ===== BUTTONS ===== */
.btn-add,.btn-primary{background:var(--primary);color:#fff;border:none;padding:10px 20px;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:0.2s;text-decoration:none;white-space:nowrap}
.btn-add:hover,.btn-primary:hover{background:#1530a0;transform:translateY(-1px)}
.btn-sm{padding:5px 11px;border:none;border-radius:7px;font-size:11px;cursor:pointer;font-weight:600;transition:0.2s;white-space:nowrap}
.btn-edit{background:#e8f0fe;color:var(--primary)}
.btn-edit:hover{background:var(--primary);color:#fff}
.btn-del{background:#fff5f5;color:#e53e3e}
.btn-del:hover{background:#e53e3e;color:#fff}
.btn-ok{background:#f0fff4;color:#38a169}
.btn-ok:hover{background:#38a169;color:#fff}
.btn-pr{background:#ebf8ff;color:#3182ce}
.btn-pr:hover{background:#3182ce;color:#fff}
.btn-rj{background:#fff5f5;color:#e53e3e}
.btn-rj:hover{background:#e53e3e;color:#fff}
.btn-approve{background:#38a169;color:#fff;border:none;padding:6px 12px;border-radius:8px;font-size:12px;cursor:pointer;font-weight:600}
.btn-reject{background:#e53e3e;color:#fff;border:none;padding:6px 12px;border-radius:8px;font-size:12px;cursor:pointer;font-weight:600}

/* ===== FILTERS ===== */
.filters{background:#fff;border-radius:14px;padding:16px;margin-bottom:18px;display:flex;gap:10px;flex-wrap:wrap;align-items:center;box-shadow:0 2px 8px rgba(0,0,0,0.05)}
.filter-input{padding:9px 13px;border:2px solid #e8ecf4;border-radius:8px;font-size:13px;outline:none;transition:0.2s;min-width:140px}
.filter-input:focus{border-color:var(--primary)}
.filter-input.flex1{flex:1}
.btn-filter{background:var(--primary);color:#fff;border:none;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}

/* ===== STATUS TABS ===== */
.status-tabs{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}
.stab{display:inline-flex;align-items:center;gap:5px;padding:7px 15px;border-radius:20px;font-size:13px;font-weight:600;border:2px solid #e8ecf4;color:#666;text-decoration:none;background:#fff;transition:0.2s;white-space:nowrap}
.stab.active{border-color:var(--primary);background:var(--primary);color:#fff}
.stab:hover:not(.active){border-color:var(--primary);color:var(--primary)}
.cnt{background:rgba(0,0,0,0.1);padding:1px 7px;border-radius:10px;font-size:11px}
.stab:not(.active) .cnt{background:#f0f0f0;color:#888}

/* ===== FLASH ===== */
.flash{padding:13px 18px;border-radius:10px;margin-bottom:18px;font-size:14px;font-weight:500}
.flash-success{background:#f0fff4;color:#276749;border-left:4px solid #38a169}
.flash-danger{background:#fff5f5;color:#c53030;border-left:4px solid #e53e3e}
.flash-info{background:#ebf8ff;color:#2c5282;border-left:4px solid #3182ce}
.flash-warning{background:#fffaf0;color:#c05621;border-left:4px solid #dd6b20}

/* ===== MODAL ===== */
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:300;align-items:center;justify-content:center;padding:20px}
.modal.open{display:flex}
.modal-box{background:#fff;border-radius:16px;padding:28px;width:100%;max-width:500px;max-height:92vh;overflow-y:auto}
.modal-title{font-size:18px;font-weight:700;margin-bottom:20px;color:var(--dark);display:flex;align-items:center;gap:10px}
.form-group{margin-bottom:14px}
.form-group label{display:block;font-size:13px;color:#555;margin-bottom:5px;font-weight:600}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:11px 13px;border:2px solid #e8ecf4;border-radius:10px;font-size:14px;outline:none;transition:0.2s;font-family:inherit}
.form-group input:focus,.form-group select:focus{border-color:var(--primary)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.form-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:13px}
.modal-btns{display:flex;gap:10px;margin-top:20px}
.btn-submit{flex:1;padding:12px;background:linear-gradient(135deg,var(--primary),#2856c8);color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:700;cursor:pointer}
.btn-cancel{flex:1;padding:12px;background:#eee;color:#555;border:none;border-radius:10px;cursor:pointer;font-size:14px}
.btn-cancel-modal{flex:1;padding:12px;background:#eee;color:#555;border:none;border-radius:10px;cursor:pointer;font-size:14px}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch{position:relative;width:46px;height:26px;cursor:pointer;display:inline-block}
.toggle-switch input{opacity:0;width:0;height:0}
.slider{position:absolute;inset:0;background:#ddd;border-radius:13px;transition:0.3s}
.slider::before{content:'';position:absolute;width:20px;height:20px;background:#fff;border-radius:50%;top:3px;left:3px;transition:0.3s;box-shadow:0 1px 4px rgba(0,0,0,0.2)}
input:checked+.slider{background:#38a169}
input:checked+.slider::before{left:23px}

/* ===== MISC ===== */
.empty{text-align:center;padding:50px 20px;color:#aaa}
.empty i{font-size:35px;display:block;margin-bottom:10px;color:#ddd}
.section-divider{border:none;border-top:2px dashed #e8ecf4;margin:18px 0}
.section-label{font-size:11px;font-weight:700;color:#aaa;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px}
.actions{display:flex;gap:6px;flex-wrap:wrap}
.profit-preview{background:#f0fff4;border-radius:8px;padding:10px 14px;font-size:13px;color:#276749;margin-top:8px;display:none}
.pkg-count{margin-left:auto;font-size:13px;color:#666}
.user-info strong{display:block;font-size:13px}
.user-info small{color:#888;font-size:11px}
.dep-info h4{font-size:14px;font-weight:600}
.dep-info p{font-size:12px;color:#888;margin-top:2px}
.save-btn{padding:12px 30px;background:linear-gradient(135deg,var(--primary),#2856c8);color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer}
.alert-success-box{background:#f0fff4;color:#276749;padding:12px;border-radius:10px;margin-bottom:18px;border-left:4px solid #38a169;font-size:14px}

/* ===== MOBILE RESPONSIVE ===== */
@media(max-width:900px){
    .sidebar{transform:translateX(-100%)}
    .sidebar.open{transform:translateX(0)}
    .sidebar-close{display:block !important}
    .sidebar-overlay{display:block}
    .sidebar-overlay.show{display:block;opacity:1;pointer-events:all}
    .sidebar-overlay{opacity:0;pointer-events:none;transition:opacity 0.3s}
    .main{margin-left:0 !important}
    .menu-toggle{display:flex !important}
    .topbar{padding:0 15px}
    .topbar h1{font-size:16px}
    .topbar-date{display:none}
    .content{padding:14px}
    .stats-grid{grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:16px}
    .stat-card{padding:14px 12px;gap:10px}
    .stat-icon{width:42px;height:42px;font-size:18px;border-radius:11px}
    .stat-info h3{font-size:18px}
    .stat-info p{font-size:11px}
    .row{grid-template-columns:1fr}
    .form-row,.form-row-3{grid-template-columns:1fr}
    .filters{flex-direction:column;gap:8px}
    .filter-input{min-width:unset;width:100%}
    .btn-filter{width:100%}
    .status-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
    .status-tabs::-webkit-scrollbar{display:none}
    .modal{padding:0;align-items:flex-end}
    .modal-box{border-radius:20px 20px 0 0;max-height:90vh;padding:22px 18px}
    .card{padding:16px;border-radius:12px}
    .table-wrap{border-radius:12px}
}
@media(max-width:480px){
    .admin-badge{font-size:11px;padding:5px 10px}
    .topbar h1{font-size:15px}
}
