/* ═══════════════════════════════════════════════════
   NATEK SOFTWARES — Admin Panel Stylesheet
═══════════════════════════════════════════════════ */

:root {
  --navy:       #0a0f2c;
  --navy-2:     #0d1438;
  --cyan:       #00d4ff;
  --teal:       #0ea5e9;
  --cyan-glow:  rgba(0,212,255,0.15);
  --sidebar-w:  260px;
  --sidebar-bg: #0a0f2c;
  --main-bg:    #f4f6fb;
  --card-bg:    #ffffff;
  --border:     rgba(0,0,0,0.08);
  --text:       #1a2040;
  --muted:      #7a8299;
  --radius:     12px;
  --shadow:     0 2px 12px rgba(0,0,0,0.07);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--text); }

/* ─── LOGIN ─── */
.admin-login-body { background: var(--navy); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.admin-login-wrap { width: 100%; padding: 24px; }
.admin-login-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(0,212,255,0.15);
  backdrop-filter: blur(16px); border-radius: 20px; padding: 40px;
  max-width: 420px; margin: 0 auto;
}
.admin-login-logo { text-align: center; margin-bottom: 32px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.brand-name-lg { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 28px; color: #fff; letter-spacing: -1px; }
.accent { color: var(--cyan); }

/* ─── LAYOUT ─── */
.admin-body { background: var(--main-bg); }
.admin-layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─── */
.admin-sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  border-right: 1px solid rgba(0,212,255,0.08);
  z-index: 1000; transition: transform var(--transition);
  overflow-y: auto;
}
.admin-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.brand-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--cyan), var(--teal)); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 17px; color: var(--navy); flex-shrink: 0; }
.brand-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 16px; color: #fff; }
.brand-sub { font-size: 10px; color: rgba(255,255,255,0.3); letter-spacing: 0.5px; }

.admin-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-section {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.25); padding: 14px 8px 6px; font-family: 'Syne', sans-serif;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px; text-decoration: none;
  color: rgba(255,255,255,0.6); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.admin-nav-item i { font-size: 16px; flex-shrink: 0; }
.admin-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.admin-nav-item.active { background: rgba(0,212,255,0.15); color: var(--cyan); }

.admin-sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 14px; color: var(--navy);
}
.admin-user-name { font-size: 13px; font-weight: 600; color: #fff; }
.admin-user-role { font-size: 11px; color: rgba(255,255,255,0.3); }
.admin-logout { color: rgba(255,255,255,0.4); font-size: 18px; text-decoration: none; transition: color var(--transition); }
.admin-logout:hover { color: #ff6b6b; }

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

.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 28px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 100;
}
.sidebar-toggle { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; display: none; padding: 0; }
.admin-breadcrumb { font-size: 14px; color: var(--muted); }
.admin-breadcrumb a { color: var(--teal); text-decoration: none; }

.admin-content { padding: 28px; flex: 1; }

/* ─── PAGE HEADER ─── */
.admin-page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.admin-page-header h1 { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; margin: 0; }
.admin-page-header p { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

/* ─── CARDS ─── */
.admin-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.admin-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.admin-card-header h5, .admin-card-header h6 { font-family: 'Syne', sans-serif; font-weight: 700; margin: 0; font-size: 15px; }
.admin-card-body { padding: 20px; }

/* ─── STAT WIDGETS ─── */
.stat-widget {
  background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-widget::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--ic, var(--teal)); }
.stat-widget-icon { font-size: 1.6rem; color: var(--ic, var(--teal)); margin-bottom: 12px; }
.stat-widget-num { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-widget-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-widget-link { font-size: 12px; font-weight: 600; color: var(--teal); text-decoration: none; margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; }

/* ─── TABLE ─── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead th {
  padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted);
  border-bottom: 1px solid var(--border); background: #fafbff;
  font-family: 'Syne', sans-serif;
}
.admin-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8f9ff; }

/* ─── AVATAR PLACEHOLDER ─── */
.admin-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--cyan); font-size: 16px; }

/* ─── INPUTS ─── */
.natek-input { border: 1.5px solid var(--border); border-radius: 8px; padding: 9px 13px; font-size: 14px; transition: all var(--transition); }
.natek-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,165,233,0.12); outline: none; }

/* ─── BUTTONS ─── */
.btn-natek { background: linear-gradient(135deg, var(--cyan), var(--teal)); color: var(--navy) !important; font-family: 'Syne', sans-serif; font-weight: 700; border: none; border-radius: 8px; padding: 9px 20px; transition: all var(--transition); }
.btn-natek:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,255,0.35); }

/* ─── RESPONSIVE SIDEBAR ─── */
@media (max-width: 992px) {
  .admin-main { margin-left: 0; }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
}

/* ── Reply view ─────────────────────────────────── */
.reply-card { border: 1.5px solid rgba(14,165,233,0.25); }
.reply-meta { background: #f8faff; border: 1px solid #eaecf5; border-radius: 8px; overflow: hidden; }
.reply-meta-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid #eaecf5; }
.reply-meta-row:last-child { border-bottom: none; }
.reply-meta-label { font-size: 12px; font-weight: 700; color: #aab0c8; text-transform: uppercase; letter-spacing: 0.8px; width: 60px; flex-shrink: 0; font-family: 'Syne', sans-serif; }
.reply-meta-value { font-size: 13px; color: #2a3050; }
.reply-textarea { font-size: 14px; line-height: 1.75; resize: vertical; min-height: 200px; }
.reply-preview-notice { background: rgba(14,165,233,0.07); border: 1px solid rgba(14,165,233,0.2); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #4a5270; }
.reply-preview-notice i { color: var(--teal); }

/* ── Sender detail items ── */
.sender-detail-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid #f0f2fa; }
.sdi-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(14,165,233,0.1); display: flex; align-items: center; justify-content: center; color: var(--teal); font-size: 13px; flex-shrink: 0; margin-top: 2px; }
.sdi-label { font-size: 11px; font-weight: 700; color: #aab0c8; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 2px; font-family: 'Syne', sans-serif; }
.sdi-value { font-size: 13px; color: #2a3050; font-weight: 500; }

/* ── Mini email preview ── */
.email-mini-preview { font-family: 'DM Sans', Arial, sans-serif; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.emp-header { background: linear-gradient(135deg, #0a0f2c, #1a2a6c); padding: 16px 18px; display: flex; align-items: center; gap: 10px; }
.emp-logo-icon { width: 28px; height: 28px; background: linear-gradient(135deg, #00d4ff, #0ea5e9); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; color: #0a0f2c; flex-shrink: 0; font-family: 'Syne', sans-serif; }
.emp-brand { font-size: 13px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -0.3px; font-family: 'Syne', sans-serif; }
.emp-brand span { color: #00d4ff; }
.emp-sub { font-size: 9px; color: rgba(255,255,255,0.4); letter-spacing: 0.8px; margin-top: 1px; }
.emp-body { background: #fff; padding: 14px 16px; }
.emp-greeting { font-size: 12px; color: #1a2040; margin: 0 0 4px; }
.emp-intro { font-size: 11px; color: #8892b0; margin: 0 0 10px; line-height: 1.5; }
.emp-response-block { border-left: 3px solid #00d4ff; background: #f8faff; border-radius: 0 6px 6px 0; padding: 9px 11px; }
.emp-response-label { font-size: 10px; font-weight: 700; color: #0ea5e9; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; font-family: 'Syne', sans-serif; }
.emp-response-text { font-size: 11px; color: #4a5270; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 120px; overflow-y: auto; }
.emp-footer { background: #0a0f2c; padding: 9px 16px; text-align: center; font-size: 10px; color: rgba(255,255,255,0.3); }
