html,
body {
  margin:0;
  padding:0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
/* ==============================
          COURSES-PAGE
============================== */
.admin-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f5f6fa;
  color: #222;
}

.sidebar {
  width: 240px;
  background: #ff5c6c;
  color: white;
  transition: width 0.3s ease;
  padding: 16px;
}

.admin-wrapper.collapsed .sidebar {
  width: 70px;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 24px;
}

.sidebar nav button {
  width: 100%;
  background: transparent;
  border: none;
  color: white;
  padding: 12px;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.admin-wrapper.collapsed .sidebar span {
  display: none;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.header {
  height: 64px;
  background: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.collapse-btn {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.search {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile img {
  border-radius: 50%;
}

.profile small {
  display: block;
  font-size: 12px;
  color: gray;
}

.content {
  width: 100%;
  padding: 24px 32px;
  box-sizing: border-box;
  color: #222;
  flex: 1;

  overflow-y: auto;
  overflow-x: visible;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content p,
.content span,
.content label,
.content th,
.content td {
  color: #222;
}

.table-card {
  width: 100%;
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: border-box;
  overflow-x: visible !important;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table th {
  text-align: left;
  font-weight: 600;
  padding: 14px 12px;
  border-bottom: 1px solid #eee;
  color: #111;
}

.modern-table td {
  padding: 14px 12px;
  vertical-align: middle;
  color: #222;
}

.modern-table thead{
  display: table;
  width: 100%;
  table-layout: fixed;
}

.modern-table thead th {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  box-shadow: 0 1px 0 #eee;
}

.modern-table tbody{
  display: block;
  max-height: 600px;
  overflow-y: visible !important;
}

.modern-table tbody tr{
  display: table;
  width: 100%;
  table-layout: fixed;
}

.course-name {
  font-weight: 600;
}

.muted {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.badge.free { background: #e0f2fe; color: #0369a1; }
.badge.paid { background: #ede9fe; color: #5b21b6; }
.badge.active { background: #dcfce7; color: #166534; }
.badge.frozen { background: #fee2e2; color: #991b1b; }

.icon-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 18px;
  cursor: pointer;
}

.icon-btn:hover {
  background: #e2e8f0;
}

.dropdown-cell {
  position: relative;
}

.dropdown {
  position: fixed;
  right: 0;
  top: 36px;
  min-width: 170px;
  background: #111;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  overflow: hidden;
  z-index: 1000;
  animation: fadeIn 0.18s ease;
}

.dropdown button {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  color: #fff;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}

.dropdown button:hover {
  background: rgba(255,255,255,0.08);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.link-btn:hover {
  background: #1e4ed8;
}

.primary-btn {
  background: #111;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.primary-btn:hover {
  background: #000;
}

.content input,
.content textarea,
.content select {
  background: #fff;
  color: #222;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 10px;
}

.gear-btn {
  transition: transform 0.4s ease;
}

.gear-btn i{
  color: #111;
  display: inline-block;
  transition: transform 0.4s ease;
}

.gear-btn.active i {
  transform: rotate(90deg);
}

.courses-scroll {
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
}

.courses-scroll::-webkit-scrollbar {
  width: 8px;
}

.courses-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.courses-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.courses-scroll::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.courses-scroll {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.admin-wrapper,
.main,
.content {
  overflow-x: hidden;
}

.modern-table {
  width: 100%;
  table-layout: fixed;
}

body::-webkit-scrollbar {
  display: none;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==============================
          ADMIN LOGIN/LOGOUT
============================== */

.admin-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.profile {
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 6px 10px;
  border-radius: 8px;
}

.profile:hover {
  background: rgba(0,0,0,0.06);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-box {
  background: white;
  padding: 20px;
  border-radius: 12px;
  min-width: 320px;
}
