/* ============================================================
   SubManager Public Site - Main Stylesheet
   ============================================================ */

:root {
  --bg: #0d0d1a;
  --bg2: #13132a;
  --card-bg: rgba(255,255,255,0.04);
  --stroke: rgba(255,255,255,0.10);
  --text: #ffffff;
  --muted: #9999cc;
  --accent1: #ff7a00;
  --accent2: #ff3d00;
  --green: #00c97a;
  --red: #e03535;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.container { width: 94%; max-width: 1200px; margin: 0 auto; }

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border-bottom: 2px solid rgba(0,0,0,0.25);
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.brand .title { font-size: 20px; line-height: 1.1; }
.brand .subtitle { font-size: 11px; opacity: 0.85; }

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

input, select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.22);
  color: #fff;
  outline: none;
  font-size: 13px;
}
input::placeholder { color: rgba(255,255,255,0.75); }

/* Dropdown option styling */
select option {
  background: #1e1e2e;
  color: #ff7a00;
  font-weight: 700;
}
select option:hover,
select option:focus,
select option:checked {
  background: #2a2a3a;
  color: #ff7a00;
}

.navlinks {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 13px;
}

.badge {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.badge-alert {
  background: rgba(220,50,50,0.4);
  border-color: #e03535;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.22);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,0.12); }
.btn:active { transform: scale(0.97); }
.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.secondary { background: rgba(255,255,255,0.08); }
.btn.primary { background: var(--accent1); border-color: var(--accent1); }
.btn.primary:hover { background: var(--accent2); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.success { background: var(--green); border-color: var(--green); color: #000; }

/* ── HERO ── */
.hero {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.80) 100%),
    url('/assets/img/bg-hero-1.jpg') center / cover no-repeat;
  border-bottom: 1px solid var(--stroke);
}
.hero-inner {
  padding: 28px 0 32px 0;
  display: flex;
  align-items: stretch;
  min-height: 0;
}
.hero-grid {
  display: flex;
  gap: 28px;
  align-items: center;
  width: 100%;
}
.hero-image-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.65);
  display: block;
  max-width: 420px;
}
.hero-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── FEATURED SLIDER ── */
.featured-wrap {
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  position: relative;
}
.featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.featured-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.featured-arrows { display: flex; gap: 6px; }

.featured-slide {
  display: none;
}
.featured-slide.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

.featured-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4));
  flex-shrink: 0;
}
.featured-info { flex: 1; min-width: 0; }
.featured-name { font-weight: 900; font-size: 18px; margin-bottom: 4px; }
.featured-desc { font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 8px; }
.featured-price { font-weight: 900; color: #ffd08a; font-size: 20px; margin-bottom: 10px; }
.featured-billing { font-size: 11px; color: var(--muted); }
.featured-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dots */
.featured-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.2s;
}
.dot.active { background: var(--accent1); }

/* ── MAIN CONTENT ── */
.main { padding: 24px 0 40px 0; }

.section-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent1);
  display: inline-block;
}

/* ── SERVICE GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.15s;
}
.card:hover {
  border-color: rgba(255,122,0,0.4);
  transform: translateY(-2px);
}

.service-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.service-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.service-name {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 6px;
}
.service-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}
.service-price {
  font-weight: 900;
  color: #ffd08a;
  font-size: 18px;
  margin-bottom: 4px;
}
.service-billing {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.service-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Category filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  margin-top: 8px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent1);
  border-color: var(--accent1);
  color: #fff;
}

/* ── CART ── */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 10px;
}
.cart-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.cart-name { font-weight: 900; margin-bottom: 3px; }
.cart-meta { font-size: 12px; color: var(--muted); }
.cart-price { font-weight: 900; color: #ffd08a; font-size: 18px; white-space: nowrap; }
.cart-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--stroke);
  margin-top: 8px;
}
.cart-total-label { color: var(--muted); font-size: 13px; }
.cart-total-amount { font-weight: 900; font-size: 26px; color: #ffd08a; }

/* ── FORMS ── */
.form-card {
  max-width: 480px;
  margin: 40px auto;
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 32px;
}
.form-card h2 { margin-bottom: 6px; font-size: 24px; }
.form-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--muted); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px;
}
.form-row textarea { resize: vertical; min-height: 100px; }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }

.notice {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.notice.error { background: rgba(224,53,53,0.15); border: 1px solid rgba(224,53,53,0.35); color: #ff8f8f; }
.notice.success { background: rgba(0,201,122,0.12); border: 1px solid rgba(0,201,122,0.3); color: #00c97a; }
.notice.info { background: rgba(255,122,0,0.1); border: 1px solid rgba(255,122,0,0.25); color: #ffa040; }

/* ── PORTAL ── */
.portal-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin-top: 24px; }
.sidebar {
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.15s;
  margin-bottom: 4px;
}
.sidebar a:hover, .sidebar a.active {
  background: rgba(255,122,0,0.15);
  color: var(--accent1);
}
.content-area {
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
}

/* ── MESSAGES ── */
.message-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  max-width: 80%;
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 14px;
}
.message-bubble.admin {
  background: rgba(255,122,0,0.15);
  border: 1px solid rgba(255,122,0,0.25);
  margin-right: auto;
}
.message-bubble.user {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  margin-left: auto;
  text-align: right;
}
.message-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── ADMIN ── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border-bottom: 2px solid var(--stroke);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status-badge.active { background: rgba(0,201,122,0.2); color: var(--green); }
.status-badge.inactive { background: rgba(255,255,255,0.08); color: var(--muted); }
.status-badge.featured { background: rgba(255,122,0,0.2); color: var(--accent1); }
.status-badge.pending { background: rgba(255,200,0,0.2); color: #ffd000; }
.status-badge.completed { background: rgba(0,201,122,0.2); color: var(--green); }

/* ── PAGINATION ── */
.pagination { margin: 24px 0 8px 0; text-align: center; }
.page-link {
  display: inline-block;
  margin: 0 3px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.page-link.active { background: var(--accent1); border-color: var(--accent1); }
.page-link:hover:not(.active) { background: rgba(255,255,255,0.12); }

/* ── FOOTER ── */
footer {
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid var(--stroke);
  margin-top: 40px;
}
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
}
.footer-links a { color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent1); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ── UPLOAD AREA ── */
.upload-area {
  border: 2px dashed var(--stroke);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-area:hover { border-color: var(--accent1); }
.upload-preview { width: 64px; height: 64px; object-fit: contain; margin: 10px auto; display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-grid { flex-direction: column; }
  .hero-image { max-width: 100%; width: 100%; }
  .portal-grid { grid-template-columns: 1fr; }
  .sidebar { display: flex; flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 600px) {
  .navbar { gap: 8px; }
  .brand .title { font-size: 17px; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr; }
}