/* =====================================================
   ARUNACHAL MEGA DRAW — FINAL ADMIN CSS
   SAME LOOK + CLEAN STRUCTURE
   ===================================================== */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --success: #16a34a;
  --success-dark: #15803d;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --warning: #f59e0b;
  --info: #0ea5e9;

  --dark: #0f172a;
  --dark-2: #111827;
  --dark-3: #1e293b;

  --text: #1f2937;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f3f6fb;
  --bg-soft: #f8fafc;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 18px 38px rgba(15, 23, 42, 0.12);

  --transition: all 0.25s ease;
}

/* =====================================================
   RESET
   ===================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(79, 70, 229, 0.08),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(14, 165, 233, 0.08),
      transparent 24%
    ),
    linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  transition: var(--transition);
}

/* =====================================================
   MAIN LAYOUT
   ===================================================== */

.admin-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 18px;
  z-index: 1000;
  color: #fff;
  background: linear-gradient(180deg, #0b1220 0%, #111827 45%, #0f172a 100%);
  box-shadow: 6px 0 24px rgba(15, 23, 42, 0.16);
  -webkit-overflow-scrolling: touch;
}

.main {
  margin-left: 250px;
  width: calc(100% - 250px);
  min-width: 0;
  padding: 30px;
}

.content {
  margin-top: 10px;
}

/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar h2 {
  margin: 0 0 28px;
  padding: 10px 12px 16px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.5px;
}

.sidebar a {
  display: block;
  padding: 13px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  text-decoration: none;
  color: #dbe4f0;
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.sidebar a:hover {
  background: rgba(79, 70, 229, 0.18);
  color: #fff;
  transform: translateX(4px);
}

.sidebar a:active {
  transform: scale(0.98);
}

/* =====================================================
   PAGE HEADER
   ===================================================== */

.header {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  padding: 18px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  word-break: break-word;
}

/* =====================================================
   COMMON CARDS / CONTAINERS
   ===================================================== */

.form-container,
.form-card,
.table-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  min-width: 0;
}

.form-container,
.form-card {
  max-width: 650px;
  padding: 32px;
}

.table-card {
  padding: 25px;
  margin-top: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.form-container h2,
.form-card h2,
.table-card h2,
.table-card h3 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  word-break: break-word;
}

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 26px 24px;
  border-radius: 22px;
  color: white;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.16);
  transition: var(--transition);
}

.card::before {
  content: "";
  position: absolute;
  top: -35px;
  right: -35px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.22);
}

.card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.95;
  position: relative;
  z-index: 2;
}

.card p {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 700;
  position: relative;
  z-index: 2;
  word-break: break-word;
}

.card1 {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}
.card2 {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}
.card3 {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}
.card4 {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}
.card5 {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

/* =====================================================
   FORMS
   ===================================================== */

form {
  width: 100%;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  outline: none;
  transition: var(--transition);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
  background: #fff;
}

input[type="file"] {
  padding: 11px;
  background: #fafafa;
  border: 1px dashed #cbd5e1;
  cursor: pointer;
}

input[type="date"] {
  cursor: pointer;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.submit-btn,
.btn,
table button,
.add-agent-btn,
.table-btn {
  display: inline-block;
  border: none;
  outline: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 20px;
  transition: var(--transition);
  max-width: 100%;
  word-break: break-word;
}

.submit-btn,
.btn {
  background: linear-gradient(135deg, var(--success), #05567c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.22);
}

.submit-btn:hover,
.btn:hover {
  background: linear-gradient(135deg, var(--success-dark), #16a34a);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.28);
}

.submit-btn:active,
.btn:active,
table button:active,
.table-btn:active,
.add-agent-btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #4f46e5);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #ef4444);
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--danger-dark), var(--danger));
}

/* =====================================================
   ALERT / MESSAGE BOXES
   ===================================================== */

.form-message,
.success-msg,
.error-msg,
.info-msg,
.warning-msg {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  border: 1px solid transparent;
  word-break: break-word;
}

.form-message {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #111827;
}

.success-msg {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.error-msg {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.info-msg {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}

.warning-msg {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* =====================================================
   TABLES
   ===================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

table th {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  padding: 14px 12px;
  text-align: left;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

table td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
  color: #1f2937;
  line-height: 1.6;
  word-break: break-word;
}

table tr:hover {
  background: #f8fbff;
}

table img {
  max-width: 100px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.table-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.table-card a:hover {
  text-decoration: underline;
}

/* =====================================================
   STATUS BADGES
   ===================================================== */

.status-pending,
.status-approved,
.completed,
.status-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pending {
  color: #b45309;
  background: #fef3c7;
}

.status-approved {
  color: #166534;
  background: #dcfce7;
}

.completed {
  color: #475569;
  background: #e2e8f0;
  font-weight: 600;
}

.active-badge {
  background: #ecfdf3;
  color: #027a48;
}

.inactive-badge {
  background: #fef3f2;
  color: #b42318;
}

/* =====================================================
   AGENTS PAGE
   ===================================================== */

.agents-top-card {
  padding: 0;
  margin-bottom: 24px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.agents-top-left h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.agents-top-left p {
  margin: 0 0 18px;
  font-size: 14px;
  color: #334155;
}

.agents-top-actions {
  display: block;
}

.add-agent-btn {
  background: linear-gradient(135deg, #16a34a, #0f766e);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
  margin-bottom: 10px;
}

.add-agent-btn:hover {
  transform: translateY(-1px);
}

.agents-table-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow-x: auto;
}

.agents-table {
  width: 100%;
  min-width: 100%;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  font-size: 14px;
}

.agents-table th {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  padding: 16px 14px;
  text-align: left;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.agents-table td {
  padding: 16px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
  color: #1f2937;
  line-height: 1.6;
}

.agents-table tr:hover {
  background: #f8fbff;
}

.agents-table a {
  text-decoration: none;
  font-weight: 600;
}

.table-action-group {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
}

.table-btn {
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.edit-btn {
  background: #eef2ff;
  color: #3730a3;
}

.status-btn {
  background: #ecfeff;
  color: #0f766e;
}

.delete-btn {
  background: #fef2f2;
  color: #b91c1c;
}

.table-btn:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

.empty-data-box {
  padding: 30px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 15px;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(
      circle at top left,
      rgba(79, 70, 229, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(14, 165, 233, 0.14),
      transparent 25%
    ),
    linear-gradient(135deg, #0f172a, #111827, #1e293b);
}

.login-container {
  width: 100%;
  max-width: 430px;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  padding: 42px 34px;
  border-radius: 24px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.24);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.login-card h1 {
  margin-bottom: 6px;
  font-size: 30px;
  color: var(--dark);
  font-weight: 700;
}

.login-card p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.login-card .submit-btn {
  width: 100%;
  margin-top: 10px;
  font-size: 15px;
  padding: 13px 18px;
}

/* =====================================================
   ORDER ACTION BUTTONS
   ===================================================== */

.order-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 220px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.action-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
  text-decoration: none !important;
}

.action-contacted {
  background: #eef4ff;
  color: #2f6fed !important;
  border-color: #d9e6ff;
}

.action-confirm {
  background: #e8fff1;
  color: #1e9f53 !important;
  border-color: #c8f1d8;
}

.action-complete {
  background: #f1ecff;
  color: #7a49e0 !important;
  border-color: #ddd0ff;
}

.action-cancel {
  background: #fff0f0;
  color: #d93025 !important;
  border-color: #ffd4d1;
}

/* =====================================================
   ORDER STATUS BADGES
   ===================================================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-new {
  background: #fff3cd;
  color: #b78103;
}

.status-contacted {
  background: #e8f1ff;
  color: #2463eb;
}

.status-confirmed {
  background: #e8fff1;
  color: #1e9f53;
}

.status-completed {
  background: #f1ecff;
  color: #7a49e0;
}

.status-cancelled {
  background: #ffe8e8;
  color: #d93025;
}

/* =========================
           NEW DELETE BUTTON ONLY
           Old classes untouched
        ========================= */
.action-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.action-delete:hover {
  background: #e11d48;
  color: #fff;
  border-color: #e11d48;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.18);
}

.action-delete i {
  font-size: 13px;
}

/* Optional: keep actions clean if many buttons */
.order-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.text-center {
  text-align: center;
}
.w-100 {
  width: 100%;
}

.mt-10 {
  margin-top: 10px;
}
.mt-20 {
  margin-top: 20px;
}
.mt-30 {
  margin-top: 30px;
}

.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px;
}
.mb-30 {
  margin-bottom: 30px;
}

/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
    padding: 22px 14px;
  }

  .main {
    margin-left: 220px;
    width: calc(100% - 220px);
    padding: 22px;
  }

  .dashboard-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .card p {
    font-size: 30px;
  }

  .form-container,
  .form-card {
    max-width: 100%;
  }

  .table-action-group {
    flex-wrap: wrap;
  }
}

/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 18px 14px;
    box-shadow: none;
  }

  .sidebar h2 {
    margin-bottom: 18px;
    padding-bottom: 12px;
    font-size: 22px;
  }

  .sidebar a {
    margin-bottom: 6px;
    padding: 12px;
    font-size: 14px;
  }

  .main {
    margin-left: 0;
    width: 100%;
    padding: 18px 12px 28px;
  }

  .header {
    font-size: 20px;
    padding: 16px 18px;
    margin-bottom: 18px;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .card p {
    font-size: 28px;
  }

  .form-container,
  .form-card,
  .table-card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .form-container h2,
  .form-card h2,
  .table-card h2,
  .table-card h3,
  .agents-top-left h2 {
    font-size: 19px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 14px;
    padding: 12px 13px;
    border-radius: 10px;
  }

  .submit-btn,
  .btn,
  table button,
  .add-agent-btn,
  .table-btn {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
    font-size: 14px;
  }

  .form-message,
  .success-msg,
  .error-msg,
  .info-msg,
  .warning-msg {
    font-size: 13px;
    padding: 13px 14px;
    border-radius: 12px;
  }

  table {
    font-size: 13px;
    min-width: 680px;
  }

  .agents-table {
    min-width: 950px;
    font-size: 13px;
  }

  table th,
  table td,
  .agents-table th,
  .agents-table td {
    padding: 10px 9px;
  }

  table img {
    max-width: 80px;
  }

  .login-card {
    padding: 34px 22px;
    border-radius: 20px;
  }

  .login-card h1 {
    font-size: 26px;
  }

  .table-action-group {
    flex-direction: row;
    flex-wrap: nowrap;
    width: max-content;
  }

  .order-action-group {
    gap: 6px;
    min-width: 240px;
  }

  .action-btn,
  .status-badge {
    font-size: 12px;
    padding: 7px 12px;
    min-height: 32px;
  }
}

/* =====================================================
   SMALL MOBILE
   ===================================================== */

@media (max-width: 480px) {
  .sidebar {
    padding: 16px 12px;
  }

  .sidebar h2 {
    font-size: 20px;
  }

  .sidebar a {
    font-size: 13px;
    padding: 11px 12px;
  }

  .main {
    padding: 14px 10px 24px;
  }

  .header {
    font-size: 18px;
    padding: 14px 15px;
    border-radius: 14px;
  }

  .card {
    padding: 20px 16px;
  }

  .card h3 {
    font-size: 13px;
  }

  .card p {
    font-size: 25px;
  }

  .form-container,
  .form-card,
  .table-card {
    padding: 15px 14px;
  }

  .form-container h2,
  .form-card h2,
  .table-card h2,
  .table-card h3,
  .agents-top-left h2 {
    font-size: 18px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 13px;
    padding: 11px 12px;
  }

  .submit-btn,
  .btn,
  table button,
  .add-agent-btn,
  .table-btn {
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 10px;
  }

  .form-message,
  .success-msg,
  .error-msg,
  .info-msg,
  .warning-msg {
    font-size: 12px;
    padding: 12px 13px;
  }

  table {
    min-width: 620px;
    font-size: 12px;
  }

  .agents-table {
    min-width: 920px;
    font-size: 12px;
  }

  table th,
  table td,
  .agents-table th,
  .agents-table td {
    padding: 9px 8px;
  }

  table img {
    max-width: 70px;
  }

  .login-page {
    padding: 14px;
  }

  .login-card {
    padding: 28px 18px;
    border-radius: 18px;
  }

  .login-card h1 {
    font-size: 23px;
  }

  .login-card p {
    font-size: 13px;
  }

  .order-action-group {
    min-width: 220px;
  }

  .action-btn,
  .status-badge {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 30px;
  }
}
