*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: #f0f4f8; color: #2d3748; min-height: 100vh; }

/* Shell */
.admin-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar { width: 240px; min-height: 100vh; background: #0a3d62; color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.admin-sidebar .brand { padding: 24px 20px 16px; font-size: 1.05rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.12); line-height: 1.4; }
.admin-sidebar .brand span { color: #4fc3f7; }
.admin-nav { list-style: none; padding: 12px 0; flex: 1; }
.admin-nav li a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: rgba(255,255,255,.75); text-decoration: none; font-size: .875rem; font-weight: 500; transition: all .2s; }
.admin-nav li a i { width: 18px; text-align: center; font-size: .95rem; }
.admin-nav li a:hover, .admin-nav li a.active { background: rgba(255,255,255,.12); color: #fff; }

/* Main */
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 0 28px; height: 64px; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 10; }
.admin-topbar h2 { font-size: 1rem; font-weight: 600; color: #0a3d62; }
.admin-topbar .user { display: flex; align-items: center; gap: 16px; font-size: .875rem; color: #555; }
.admin-logout { background: transparent; border: 1px solid #d0dde8; border-radius: 6px; padding: 6px 14px; cursor: pointer; color: #555; font-size: .8rem; font-weight: 500; transition: all .2s; }
.admin-logout:hover { background: #dc3545; border-color: #dc3545; color: #fff; }
.admin-content { padding: 28px; flex: 1; overflow-y: auto; }

/* Page head */
.admin-page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-page-head h1 { font-size: 1.35rem; font-weight: 700; color: #0a3d62; }

/* Stat cards */
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-stat-card { background: #fff; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.admin-stat-card .ic { width: 48px; height: 48px; border-radius: 10px; background: #e8f4fd; display: flex; align-items: center; justify-content: center; color: #1a6a9e; font-size: 1.2rem; flex-shrink: 0; }
.admin-stat-card .num { font-size: 1.6rem; font-weight: 800; color: #0a3d62; line-height: 1; }
.admin-stat-card .lbl { font-size: .78rem; color: #888; margin-top: 4px; }

/* Panel box */
.admin-panel-box { background: #fff; border-radius: 12px; padding: 22px 24px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.admin-panel-box h3 { font-size: .95rem; font-weight: 700; color: #0a3d62; margin-bottom: 12px; }

/* Module grid */
.admin-module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.admin-module { background: #f8fbff; border: 1px solid #d8eaf7; border-radius: 10px; padding: 18px 16px; text-decoration: none; transition: all .2s; display: block; }
.admin-module:hover { background: #e8f4fd; border-color: #1a6a9e; }
.admin-module h4 { font-size: .875rem; font-weight: 700; color: #0a3d62; margin-bottom: 6px; }
.admin-module p { font-size: .78rem; color: #777; margin-bottom: 10px; line-height: 1.5; }

/* Pills & badges */
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.pill.on { background: #d4edda; color: #155724; }
.pill.off { background: #f8d7da; color: #721c24; }
.pill.unread { background: #cce5ff; color: #004085; }
.admin-badge { display: inline-block; background: #0a3d62; color: #fff; padding: 4px 12px; border-radius: 6px; font-size: .75rem; font-weight: 600; }

/* Forms */
.admin-form { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.admin-form h3 { font-size: 1rem; font-weight: 700; color: #0a3d62; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: #0a3d62; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=url], .field input[type=number], .field input[type=password],
.field input[type=datetime-local], .field input[type=file], .field select, .field textarea,
.admin-form input[type=text], .admin-form input[type=email], .admin-form input[type=tel],
.admin-form input[type=url], .admin-form input[type=number], .admin-form input[type=password],
.admin-form input[type=datetime-local], .admin-form input[type=file], .admin-form select, .admin-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d0dde8; border-radius: 7px; font-size: .875rem; outline: none; font-family: inherit; transition: border-color .2s; background: #fff;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { border-color: #1a6a9e; }
.field textarea, .admin-form textarea { min-height: 90px; resize: vertical; }
.field .checkbox { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; color: #333; cursor: pointer; }
.field .checkbox input { width: auto; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }

/* Buttons */
.admin-btn-sm { background: #0a3d62; color: #fff; border: none; border-radius: 7px; padding: 8px 18px; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: background .2s; font-family: inherit; }
.admin-btn-sm:hover { background: #1a6a9e; color: #fff; }
.admin-btn-ghost { background: transparent; border: 1px solid #d0dde8; color: #555; }
.admin-btn-ghost:hover { background: #f0f4f8; color: #0a3d62; }

/* Table */
.admin-table-wrap { background: #fff; border-radius: 12px; overflow: auto; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th { background: #0a3d62; color: #fff; padding: 11px 14px; text-align: left; font-weight: 600; white-space: nowrap; font-size: .8rem; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid #f0f4f8; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fbff; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.del { background: transparent; border: 1px solid #dc3545; color: #dc3545; border-radius: 6px; padding: 5px 12px; font-size: .75rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .2s; }
.del:hover { background: #dc3545; color: #fff; }
.avatar { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* States */
.admin-empty { text-align: center; padding: 48px 24px; color: #aaa; font-size: .9rem; }
.admin-error { background: #fff2f2; border: 1px solid #f5c6cb; border-radius: 8px; padding: 12px 16px; color: #dc3545; font-size: .875rem; }
.admin-success { background: #e8f8f0; border: 1px solid #c3e6cb; border-radius: 8px; padding: 12px 16px; color: #155724; font-size: .875rem; }

/* Login page */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#0a3d62,#1a6a9e); padding: 20px; }
.admin-login-box { background: #fff; border-radius: 16px; padding: 48px 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.admin-login-box .logo { font-size: 1.3rem; font-weight: 800; color: #0a3d62; text-align: center; margin-bottom: 8px; }
.admin-login-box .logo span { color: #1a6a9e; }
.admin-login-box .sub { text-align: center; color: #888; font-size: .85rem; margin-bottom: 32px; }

/* Breadcrumb style page header for inner admin pages */
.admin-inner-head { background: linear-gradient(135deg,#0a3d62,#1a6a9e); color:#fff; padding:20px 28px; border-radius:10px; margin-bottom:24px; }
