/* ---------------- Admin panel styles ---------------- */
.login-body {
    min-height: 100vh; display: grid; place-items: center;
    background: linear-gradient(135deg, #0f4c81, #08375d); padding: 20px;
}
.login-card { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 40px; width: min(420px, 100%); }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .logo { width: 68px; height: 68px; border-radius: 50%; background: var(--primary); color:#fff; display:grid; place-items:center; font-weight:800; font-size:22px; margin: 0 auto 12px; border: 3px solid var(--accent); }
.login-brand h1 { font-size: 20px; color: var(--primary); }
.login-brand p { color: var(--muted); font-size: 14px; }

/* Layout */
.admin-wrap { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #0d1b26; color: #c3d0da; padding: 0 0 30px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand .logo { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color:#fff; display:grid; place-items:center; font-weight:800; border: 2px solid var(--accent); }
.sidebar .brand .logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sidebar .brand b { color: #fff; font-size: 15px; line-height: 1.2; }
.sidebar nav { padding: 16px 12px; }
.sidebar nav .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #5f7382; padding: 14px 12px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: #c3d0da; border-radius: 8px; font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar nav .submenu { margin: 2px 0 10px 8px; border-left: 1px dashed rgba(255,255,255,.2); padding-left: 8px; }
.sidebar nav .submenu .subitem { font-size: 13px; padding: 7px 10px; margin-bottom: 2px; color: #9fb2bf; }
.sidebar nav .submenu .subitem.active { background: rgba(15, 76, 129, 0.35); color: #fff; }
.sidebar nav a .badge-count { margin-left: auto; background: var(--danger); color:#fff; font-size:11px; padding: 1px 8px; border-radius: 20px; }

.admin-main { background: #eef2f6; min-height: 100vh; }
.admin-topbar { background: #fff; padding: 12px 28px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(15,35,60,.06); border-bottom: 1px solid #e8edf2; position: sticky; top: 0; z-index: 20; }
.admin-topbar h2 { font-size: 19px; color: var(--dark); font-weight: 700; }
.admin-topbar .user { display: flex; align-items: center; gap: 6px; }
.admin-topbar .user .topbar-sep { width: 1px; height: 26px; background: #e5eaf0; margin: 0 6px; }
.admin-topbar .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color:#fff; display:grid; place-items:center; font-weight:700; font-size: 13px; }
.admin-content { padding: 30px; }
.mobile-toggle { display: none; background:none; border:none; font-size:24px; color:var(--primary); cursor:pointer; }

/* Cards & stats */
.admin-stats { display:grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 30px; }
.admin-stat { background:#fff; border-radius:12px; padding:22px; box-shadow: 0 6px 18px rgba(0,0,0,.05); display:flex; align-items:center; gap:16px; }
.admin-stat .ic { width:52px; height:52px; border-radius:12px; display:grid; place-items:center; font-size:24px; background: var(--light); }
.admin-stat b { font-size: 28px; display:block; color:var(--primary); }
.admin-stat span { color: var(--muted); font-size:14px; }

.box { background:#fff; border-radius:12px; box-shadow: 0 6px 18px rgba(0,0,0,.05); margin-bottom: 24px; }
.box .box-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.box .box-head h3 { font-size: 18px; color: var(--dark); }
.box .box-body { padding: 24px; }

/* Table */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.admin-table th { background: var(--light); color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tbody tr:hover { background: #f8fafc; }
.admin-table .actions { display: flex; gap: 8px; }

.btn-edit { background:#e3f0fb; color: var(--primary); }
.btn-del { background:#fde3e3; color: var(--danger); }
.btn-view { background:#e6f6ec; color: var(--success); }

.form-actions { display:flex; gap:12px; margin-top: 10px; }
.help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.switch-row { display:flex; gap:22px; flex-wrap:wrap; }
.check { display:flex; gap:8px; align-items:center; font-weight:600; }

.empty { text-align:center; padding: 40px; color: var(--muted); }
.badge-status { font-size:11px; font-weight:700; padding: 3px 10px; border-radius:20px; }
.badge-on { background:#e6f6ec; color:#1f8a52; }
.badge-off { background:#f1f1f1; color:#888; }

.tabs { display:flex; gap:6px; border-bottom: 2px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 10px 18px; font-weight:600; color:var(--muted); border-bottom: 3px solid transparent; margin-bottom:-2px; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }

@media (max-width: 900px) {
    .admin-wrap { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -280px; width: 260px; z-index: 100; transition: left .25s; }
    .sidebar.open { left: 0; }
    .mobile-toggle { display: block; }
    .admin-stats { grid-template-columns: repeat(2,1fr); }
}

/* Topbar notification bell */
.notif-wrap{position:relative}
.notif-btn{background:transparent;border:0;border-radius:50%;width:38px;height:38px;cursor:pointer;position:relative;line-height:1;display:inline-flex;align-items:center;justify-content:center;color:#5a6f80;transition:background .15s,color .15s}
.notif-btn:hover{background:#eef3f8;color:var(--primary)}
.notif-btn svg{display:block}
.notif-dot{position:absolute;top:2px;right:2px;background:#e14444;color:#fff;border-radius:10px;padding:1px 5px;font-size:10px;font-weight:700;line-height:1.3;min-width:16px;text-align:center;box-shadow:0 0 0 2px #fff}
.notif-drop,.profile-drop{position:absolute;right:0;top:48px;background:#fff;border:1px solid #e5eaf0;border-radius:12px;box-shadow:0 12px 32px rgba(15,35,60,.12);display:none;z-index:200;overflow:hidden}
.notif-drop{width:340px}
.notif-drop.open,.profile-drop.open{display:block;animation:dropFade .14s ease-out}
@keyframes dropFade{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.notif-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #eef1f5}
.notif-head strong{font-size:14px;color:var(--dark);font-weight:700}
.notif-badge{background:#eaf3fb;color:var(--primary);font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:20px}
.notif-body{max-height:340px;overflow-y:auto}
.notif-item{display:flex;align-items:flex-start;gap:11px;padding:11px 16px;border-bottom:1px solid #f2f5f8;text-decoration:none;color:#233241;transition:background .12s}
.notif-item:last-child{border-bottom:none}
.notif-item:hover{background:#f7fafd}
.notif-ico{width:32px;height:32px;flex:0 0 32px;border-radius:8px;background:#eaf3fb;color:var(--primary);display:inline-flex;align-items:center;justify-content:center}
.notif-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.notif-title{font-weight:600;font-size:13px;color:var(--dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notif-meta{font-size:11.5px;color:var(--muted);margin-top:2px}
.notif-empty{padding:28px 16px;text-align:center;color:var(--muted);font-size:13px;display:flex;flex-direction:column;align-items:center;gap:10px}
.notif-empty-ico{width:44px;height:44px;border-radius:50%;background:#eaf7ee;color:#1f8a52;display:inline-flex;align-items:center;justify-content:center}
.notif-foot{display:block;text-align:center;padding:10px 16px;font-size:12.5px;font-weight:600;color:var(--primary);text-decoration:none;background:#fafbfd;border-top:1px solid #eef1f5}
.notif-foot:hover{background:#eef4fa}

/* Topbar profile dropdown */
.profile-wrap{position:relative}
.profile-btn{background:transparent;border:0;border-radius:8px;padding:4px 8px 4px 4px;display:inline-flex;align-items:center;gap:9px;cursor:pointer;transition:background .15s}
.profile-btn:hover{background:#eef3f8}
.profile-btn .avatar{width:32px;height:32px;font-size:12.5px}
.profile-meta{display:flex;flex-direction:column;line-height:1.2;text-align:left;max-width:140px}
.profile-name{font-weight:600;font-size:13px;color:var(--dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-role{font-size:11px;color:var(--muted);font-weight:500}
.profile-caret{color:#8a9aab;margin-left:1px}
.profile-drop{width:250px;top:52px}
.profile-head{display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid #eef1f5}
.profile-avatar-lg{width:40px;height:40px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:700;font-size:15px;flex-shrink:0}
.profile-name-lg{font-weight:700;font-size:13.5px;color:var(--dark);line-height:1.2}
.profile-email{font-size:11.5px;color:var(--muted);margin-top:2px;word-break:break-all}
.profile-item{display:flex;align-items:center;gap:10px;padding:10px 16px;font-size:13px;color:#3d4d5e;text-decoration:none;background:none;border:none;width:100%;text-align:left;font-weight:500;cursor:pointer;font-family:inherit}
.profile-item:hover{background:#f5f9fd;color:var(--primary)}
.profile-item svg{color:#8a9aab;flex-shrink:0}
.profile-item:hover svg{color:var(--primary)}
.profile-sep{height:1px;background:#eef1f5;margin:4px 0}
.profile-item-danger{color:#b02929}
.profile-item-danger svg{color:#c66a6a}
.profile-item-danger:hover{background:#fdeaea;color:#8b1e1e}
.profile-item-danger:hover svg{color:#8b1e1e}

@media (max-width: 640px){
    .profile-meta{display:none}
    .profile-btn{padding:4px}
    .notif-drop{width:300px}
    .admin-topbar{padding:10px 16px}
}

