/* ===============================
   GLOBAL STYLES
   File: custom-portal.css
=============================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
  font-family: "Poppins", sans-serif;
  background: #f8fafc;
  color: #1e293b;
  transition: background 0.3s ease, color 0.3s ease;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 { margin-top: 0; color: #1e293b; }
a { color: #2563eb; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #1d4ed8; }

/* Dashboard container */
.customer-dashboard {
  max-width: 1100px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease;
}

.customer-dashboard h2 { font-size: 1.8rem; color: #1e293b; }

.logout {
  background: #ef4444;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease;
}
.logout:hover { background: #dc2626; }

/* Services container: responsive grid of cards */
.services-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (min-width: 768px) {
  .services-container { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1200px) {
  .services-container { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.service-card h4 { font-size: 1.15rem; color: #0f172a; margin-bottom: 12px; }

.service-info { margin-top: 8px; }
.service-info p { margin: 6px 0; font-size: 0.95rem; line-height: 1.35; }
.service-info strong { display: inline-block; width: 120px; color: #475569; }

/* status colors */
.status-active { color: #10b981; font-weight: 600; }
.status-expired { color: #ef4444; font-weight: 600; }

/* Buttons */
.btn { display:inline-block; padding:8px 14px; border-radius:6px; text-decoration:none; font-size:0.9rem; font-weight:500; transition: transform .15s ease, background 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-secondary { background: #f1f5f9; color: #111; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

/* Forms */
.custom-form { max-width: 420px; margin: 60px auto; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 3px 14px rgba(0,0,0,0.1); transition: background 0.3s ease; }
.custom-form h2 { text-align:center; margin-bottom:18px; font-size:1.4rem; color:#0f172a; }
.custom-form label { display:block; font-weight:600; color:#475569; margin-bottom:6px; }
.custom-form input[type="text"], .custom-form input[type="email"], .custom-form input[type="password"], .custom-form select {
  width:100%; padding:10px 12px; margin-bottom:14px; border:1px solid #cbd5e1; border-radius:8px; font-size:1rem; outline:none; transition: box-shadow .15s ease, border-color .15s ease;
}
.custom-form input[type="text"]:focus, .custom-form input[type="email"]:focus, .custom-form input[type="password"]:focus { border-color: #2563eb; box-shadow: 0 4px 14px rgba(37,99,235,0.08); }
.custom-form input[type="submit"] { width:100%; padding:12px; border-radius:8px; border:none; background:#2563eb; color:#fff; font-weight:600; cursor:pointer; transition: background .18s ease; }
.custom-form input[type="submit"]:hover { background:#1d4ed8; }
.custom-form p { text-align:center; color:#555; font-size:0.95rem; }

/* dark mode */
body.dark-mode { background: #0f172a; color:#e2e8f0; }
body.dark-mode a { color: #60a5fa; }
body.dark-mode .customer-dashboard { background:#111827; color:#e6eef8; box-shadow:none; }
body.dark-mode .service-card { background:#0b1220; border-color:#1f2937; box-shadow:none; }
body.dark-mode .custom-form { background:#0b1220; color:#e6eef8; box-shadow:none; }
body.dark-mode .custom-form input, body.dark-mode .custom-form select { background:#111827; border-color:#24303b; color:#e6eef8; }
body.dark-mode .btn-secondary { background:#24303b; color:#e6eef8; }

/* animations */
@keyframes fadeIn { from {opacity:0; transform:translateY(8px);} to {opacity:1; transform:translateY(0);} }
.service-card, .custom-form { animation: fadeIn 0.45s ease forwards; }

/* small screens spacing */
@media (max-width: 480px) {
  .service-info strong { display:block; width:100%; margin-bottom:6px; }
  .services-container { gap: 12px; padding: 0 12px; }
  .customer-dashboard { padding: 18px; margin: 20px auto; }
}
/* Dark mode text color adjustments */
body.dark-mode,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode p,
body.dark-mode label,
body.dark-mode strong,
body.dark-mode span,
body.dark-mode .service-info p,
body.dark-mode .customer-dashboard h2,
body.dark-mode .custom-form h2,
body.dark-mode .custom-form p {
  color: #ffffff !important;
}

/* Keep status colors visible */
body.dark-mode .status-active { color: #10b981 !important; }
body.dark-mode .status-expired { color: #ef4444 !important; }

/* Ensure buttons retain readable colors */
body.dark-mode .btn-primary { background: #2563eb; color: #fff; }
body.dark-mode .btn-primary:hover { background: #1e40af; }
body.dark-mode .btn-secondary { background: #1f2937; color: #fff; }
body.dark-mode .btn-danger { background: #ef4444; color: #fff; }
body.dark-mode .btn-danger:hover { background: #dc2626; }

/* Links remain visible */
body.dark-mode a,
body.dark-mode a:visited { color: #60a5fa; }
body.dark-mode a:hover { color: #93c5fd; }
