/* ==========================================================================
   DIGITAL TV LK - Premium Dark Theme Stylesheet
   Theme: Sleek Dark (#090d16) & Red Accents (#ED1C24)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #ED1C24;
  --primary-hover: #ff2a33;
  --primary-dark: #b80f15;
  --primary-light: rgba(237, 28, 36, 0.15);
  --primary-glow: rgba(237, 28, 36, 0.35);
  
  --dark-bg: #090d16;
  --body-bg: #090d16;
  --card-bg: #121826;
  --card-bg-hover: #182033;
  --surface-bg: #182238;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;
  
  --border-color: #1e293b;
  --border-glow: rgba(237, 28, 36, 0.25);
  --border-radius: 12px;
  
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 30px rgba(237, 28, 36, 0.2);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(237, 28, 36, 0.4);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(237, 28, 36, 0.55);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #1e293b;
  color: var(--text-main);
  border-color: #334155;
}

.btn-secondary:hover {
  background-color: #334155;
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
  color: #ffffff;
}

.btn-success {
  background-color: #059669;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #10b981;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #ef4444;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* Header & Navbar */
.main-header {
  background-color: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-container img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hero Section */
.hero {
  padding: 70px 0 50px;
  background: radial-gradient(circle at 50% 0%, rgba(237, 28, 36, 0.12) 0%, rgba(9, 13, 22, 1) 70%);
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-title span {
  color: var(--primary);
  text-shadow: 0 0 25px rgba(237, 28, 36, 0.5);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 36px;
}

/* Cards & Grid */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(237, 28, 36, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.stat-card:hover {
  border-color: rgba(237, 28, 36, 0.3);
  transform: translateY(-2px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-info h3 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 2px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-light);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: #0c111d;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #ffffff;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.2);
  background-color: #101626;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-disabled {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-package {
  background: rgba(237, 28, 36, 0.15);
  color: #ff6b70;
  border: 1px solid rgba(237, 28, 36, 0.3);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background-color: #0e1422;
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
  color: var(--text-main);
}

.custom-table tbody tr {
  transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
  background-color: #161e30;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 520px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  color: var(--text-main);
}

/* Copy Box */
.copy-box {
  display: flex;
  gap: 10px;
  background: #090d16;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.copy-box input {
  background: transparent;
  border: none;
  color: #ffffff;
}

/* Admin Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  margin-top: 30px;
  flex-grow: 1;
}

.admin-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px 14px;
  height: fit-content;
}

.admin-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.admin-menu-item a:hover {
  background-color: #1a2336;
  color: #ffffff;
}

.admin-menu-item.active a {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(237, 28, 36, 0.35);
}

/* Footer */
.main-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  background: #060910;
}

/* Media Queries */
@media (max-width: 992px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}
