/* admin/assets/css/admin.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: #f4f6f9;
}

/* Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #111827;
  color: white;
  transition: 0.3s;
}

.sidebar .logo {
  padding: 20px;
  text-align: center;
  background: #1f2937;
}

.sidebar .menu {
  list-style: none;
}

.sidebar .menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar .menu li a {
  display: block;
  padding: 15px 20px;
  color: #d1d5db;
  text-decoration: none;
  transition: 0.3s;
}

.sidebar .menu li a:hover {
  background: #374151;
  color: white;
}

.sidebar .logout {
  color: #f87171;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  background: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.topbar button {
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Content */
.content-area {
  padding: 30px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    height: 100%;
    z-index: 1000;
  }

  .sidebar.active {
    left: 0;
  }
}

/* Bottom Section */
.premium-footer {
  background: linear-gradient(135deg, #0f172a, #020617);
  color: #cbd5e1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  /* margin-top: 50px; */
  padding-top: 15px;
  padding-bottom: 10px;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

/* =========================
        RESPONSIVE
   ========================= */

@media (max-width: 768px) {
  .premium-footer {
    padding: 60px 0 20px;
  }

  .footer-grid {
    gap: 35px;
  }
}

.dev-logo {
  height: 22px;
  /* small size */
  width: auto;
  vertical-align: middle;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

/* Hover effect */
.dev-logo-link:hover .dev-logo {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px #00bcd4);
}

/* ===============================
   LOGIN PAGE DESIGN
================================ */

.login-body {
  background: linear-gradient(135deg, #111827, #2563eb);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.login-card h2 {
  margin-bottom: 5px;
  color: #111827;
}

.login-subtitle {
  font-size: 14px;
  margin-bottom: 25px;
  color: #6b7280;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  font-size: 14px;
}

.input-group label {
  position: absolute;
  left: 10px;
  top: 12px;
  font-size: 14px;
  color: #9ca3af;
  transition: 0.3s;
  pointer-events: none;
}

.input-group input:focus + label,
.input-group input:valid + label {
  top: -8px;
  left: 8px;
  background: white;
  padding: 0 5px;
  font-size: 12px;
  color: #2563eb;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.login-btn:hover {
  background: #1e40af;
}

.login-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 13px;
}

/* ===============================
   SUPER ADMIN LANDING PAGE
================================ */

.sa-body {
  font-family: "Segoe UI", sans-serif;
  background: #f9fafb;
}

/* Navbar */
.sa-navbar {
  background: #111827;
  padding: 15px 0;
}

.sa-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.sa-navbar .sa-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sa-logo {
  color: white;
}

.sa-login-btn {
  background: #2563eb;
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.sa-login-btn:hover {
  background: #1e40af;
}

/* Hero */
.sa-hero {
  background: linear-gradient(135deg, #111827, #2563eb);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.sa-hero h1 {
  font-size: 36px;
  margin-bottom: 15px;
}

.sa-hero p {
  font-size: 16px;
  margin-bottom: 25px;
  color: #e5e7eb;
}

.sa-primary-btn {
  background: white;
  color: #111827;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.sa-primary-btn:hover {
  background: #e5e7eb;
}

/* Features */
.sa-features {
  padding: 70px 0;
}

.sa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.sa-card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.sa-card h3 {
  margin-bottom: 10px;
  color: #111827;
}

/* Responsive */
@media (max-width: 768px) {
  .sa-hero h1 {
    font-size: 26px;
  }
}

/* ===============================
   ADMIN LANDING PAGE
================================ */

.admin-landing-body {
  font-family: "Segoe UI", sans-serif;
  background: #f9fafb;
}

/* Navbar */
.admin-landing-navbar {
  background: #1e293b;
  padding: 15px 0;
}

.admin-landing-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.admin-landing-navbar .admin-landing-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-landing-logo {
  color: white;
}

.admin-landing-login {
  background: #22c55e;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.admin-landing-login:hover {
  background: #15803d;
}

/* Hero */
.admin-landing-hero {
  background: linear-gradient(135deg, #1e293b, #2563eb);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.admin-landing-hero h1 {
  font-size: 36px;
  margin-bottom: 15px;
}

.admin-landing-hero p {
  font-size: 16px;
  margin-bottom: 25px;
  color: #e2e8f0;
}

.admin-landing-btn {
  background: white;
  color: #1e293b;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.admin-landing-btn:hover {
  background: #e2e8f0;
}

/* Features */
.admin-landing-features {
  padding: 70px 0;
}

.admin-landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.admin-landing-card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.admin-landing-card h3 {
  margin-bottom: 10px;
  color: #1e293b;
}

/* Footer */

/* Responsive */
@media (max-width: 768px) {
  .admin-landing-hero h1 {
    font-size: 26px;
  }
}

.success-msg {
  background: #dcfce7;
  color: #166534;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* ===============================
   CREATE ADMIN PROFESSIONAL DESIGN
================================ */

.create-admin-card {
  max-width: 520px;
  margin: 20px auto;
  padding: 40px;
}

.create-admin-form {
  margin-top: 20px;
}

.password-group {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 14px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
}

.success-msg {
  background: #dcfce7;
  color: #166534;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* ===============================
   PROFILE IMAGE UPLOAD
================================ */

.upload-group {
  margin-bottom: 20px;
}

.upload-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
  font-weight: 500;
}

.upload-group input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  transition: 0.3s;
}

.upload-group input[type="file"]:hover {
  background: #f1f5f9;
}

/* Profile Image Preview */
.profile-preview {
  margin-top: 10px;
  text-align: center;
}

.profile-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #2563eb;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===============================
   PERMISSION CHECKBOX DESIGN
================================ */

.permission-box {
  margin: 20px 0;
  padding: 15px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.permission-box label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
  color: #374151;
}

.permission-box input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #2563eb;
  transform: scale(1.1);
}

/* ===============================
   EMAIL STATUS TEXT
================================ */

#email-status {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* ===============================
   PASSWORD STRENGTH BAR
================================ */

.strength-meter {
  height: 6px;
  background: #e5e7eb;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden;
}

#strength-bar {
  height: 6px;
  width: 0%;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* ===============================
   RESPONSIVE IMPROVEMENT
================================ */

@media (max-width: 480px) {
  .create-admin-card {
    padding: 25px;
  }

  .permission-box {
    padding: 12px;
  }
}

.profile-card {
  text-align: center;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

/* ===============================
   TABLE DESIGN
================================ */

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.table th {
  background: #f3f4f6;
  font-weight: 600;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 40px;
  height: 40px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.active {
  background: #dcfce7;
  color: #166534;
}

.badge.inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-sm {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  margin-right: 5px;
}

.btn-sm.edit {
  background: #2563eb;
  color: white;
}

.btn-sm.toggle {
  background: #facc15;
  color: black;
}

.btn-sm.delete {
  background: #ef4444;
  color: white;
}

/* ===============================
   DASHBOARD DESIGN
================================ */

.dashboard-container {
  padding: 20px;
}

@media (max-width: 480px) {
  .dashboard-container {
    padding: 15px;
  }
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border-radius: 12px;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.dashboard-card h3 {
  font-size: 28px;
  margin: 0;
}

.dashboard-card p {
  margin: 0;
  font-size: 14px;
}

.card-icon {
  font-size: 32px;
}

/* Card Colors */
.dashboard-card.blue {
  background: #2563eb;
}
.dashboard-card.green {
  background: #16a34a;
}
.dashboard-card.orange {
  background: #f59e0b;
}
.dashboard-card.purple {
  background: #7c3aed;
}
.dashboard-card.dark {
  background: #1e293b;
}

/* Responsive Table */
@media (max-width: 768px) {
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .btn-sm {
    display: inline-block;
    margin-bottom: 5px;
  }
}

/* ===============================
   PROFESSIONAL MOBILE NAVIGATION
================================ */

/* Hide mobile topbar on desktop */
.mobile-topbar {
  display: none;
}

/* Overlay */
.sidebar-overlay {
  display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: white;
    padding: 12px 15px;
  }

  .mobile-topbar button {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100%;
    width: 250px;
    z-index: 1001;
    transition: 0.3s ease;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    width: 100%;
  }

  .admin-wrapper {
    flex-direction: column;
  }
}

/* ===============================
   SIDEBAR DROPDOWN MENU
================================ */

.has-sub > a {
  cursor: pointer;
}

.submenu {
  display: none;
  list-style: none;
  background: #1f2937;
}

.submenu li a {
  padding-left: 35px;
  font-size: 14px;
  color: #cbd5e1;
}

.submenu li a:hover {
  background: #374151;
  color: white;
}

.has-sub.active .submenu {
  display: block;
}

/* ===============================
   PROFESSIONAL FORM DESIGN
================================ */

.form-card {
  max-width: 700px;
  margin: 30px auto;
  padding: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  margin-bottom: 6px;
  color: #374151;
  font-weight: 500;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.form-actions {
  margin-top: 25px;
  display: flex;
  gap: 10px;
}

.btn-cancel {
  background: #e5e7eb;
  color: #111827;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
}

.btn-cancel:hover {
  background: #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-card {
  height: 130px;
  border-radius: 12px;
}

.dashboard-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.chart-card {
  height: 420px;
}

.chart-card canvas {
  height: 300px !important;
}

.logo {
  display: flex;
  align-items: center; /* vertical alignment */
  gap: 10px; /* space between logo and text */
}

/* Logo Image */
.logo-icon img {
  height: 55px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Logo Text */
.logo h4 {
  margin: 0;
  font-size: 20px;
  color: #fff;
  text-align: left;
}
.table-header {
  background: #1f2937;
  color: #fff;
}

.orders-table thead th {
  background-color: #1f2937 !important;
  color: white !important;
}

/* ===============================
   RESPONSIVE HARDENING
================================ */

.main-content {
  min-width: 0;
}

.content-area {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap .table {
  margin-bottom: 0;
  min-width: 640px;
}

@media (max-width: 992px) {
  .content-area {
    padding: 20px 16px;
  }

  .chart-card {
    height: auto;
  }

  .chart-card canvas {
    height: 260px !important;
  }

  .dashboard-card {
    height: auto;
    min-height: 120px;
  }
}

@media (max-width: 768px) {
  .mobile-topbar h3 {
    margin: 0;
    font-size: 1rem;
  }

  .content-area > .container,
  .content-area > .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  .card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-header form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header form .form-control {
    flex: 1;
    min-width: 180px;
  }

  .card-header form .btn {
    white-space: nowrap;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn,
  .form-actions .btn-cancel {
    width: 100%;
    text-align: center;
  }

  .logo h4 {
    font-size: 16px;
  }

  .table-wrap .table {
    min-width: 560px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (max-width: 576px) {
  .content-area {
    padding: 14px 10px;
  }

  .login-wrapper {
    padding: 14px;
  }

  .login-card {
    padding: 26px 18px;
  }

  .dashboard-card h3 {
    font-size: 24px;
  }

  .table-wrap .table {
    min-width: 520px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }
}
