/*
  GSMPakistan CronJob - Unified Theme Overrides
  --------------------------------------------
  Goal:
  - Make all app pages (except dashboard.php) share the SAME layout + style as cronjobs_history.php.
  - Provide mobile-friendly defaults (off-canvas sidebar + responsive tables).
*/

@import url('../../sidebar_theme.css');

:root{
  --gsmpk-banner-grad: linear-gradient(90deg, #06b6d4 0%, #3b82f6 40%, #6366f1 70%, #8b5cf6 100%);
  --gsmpk-bg: #f8fafc;
  --gsmpk-card: #ffffff;
  --gsmpk-text: #0f172a;
  --gsmpk-muted: #64748b;
  --gsmpk-border: rgba(0,0,0,.06);
}

/* Base */
html, body { overflow-x: hidden; }

body{
  background: var(--gsmpk-bg) !important;
  color: var(--gsmpk-text) !important;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

/* Main content wrapper used across pages */
.main-content{
  flex: 1;
  min-height: 100vh;
  background: var(--gsmpk-bg) !important;
  padding: 0 !important;
}

/* ─────────────────────────────────────────────────────────────
   Banner Header (same style as cronjobs_history.php)
   ───────────────────────────────────────────────────────────── */
.header{
  background-image: var(--gsmpk-banner-grad) !important;
  color: #fff !important;
  padding: 3.25rem 1.5rem 3rem !important;
  border-radius: 0 0 1.5rem 1.5rem !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.14) !important;
  position: relative;
  overflow: hidden;
}

/* Subtle glow */
.header::before{
  content: "";
  position: absolute;
  inset: -40% -25%;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 50%),
              radial-gradient(circle at 80% 30%, rgba(255,255,255,.12), transparent 55%),
              radial-gradient(circle at 60% 90%, rgba(255,255,255,.10), transparent 55%);
  transform: rotate(-8deg);
  pointer-events: none;
}

.header > *{ position: relative; z-index: 1; }

.header-icon{
  width: 78px;
  height: 78px;
  border-radius: 22px;
  margin: 0 auto 1rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 16px 30px rgba(0,0,0,.18);

  /* Prevent per-page CSS from turning this into a big "text icon" */
  font-size: 1rem !important;
  text-shadow: none !important;
}

.header-icon i{
  font-size: 2rem !important;
  color: #fff;
}

/* Make subtitle readable */
.header .lead{
  color: rgba(255,255,255,.92) !important;
}

/* ─────────────────────────────────────────────────────────────
   Cards / tables look consistent across all pages
   ───────────────────────────────────────────────────────────── */
.main-content .card,
.main-content .form-card,
.main-content .settings-card,
.main-content .content-card{
  border: 0 !important;
  border-radius: 1rem !important;
  background: var(--gsmpk-card) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.06) !important;
}

/*
  IMPORTANT
  ---------
  Some pages (e.g. website_settings.php) use .form-card/.settings-card
  but do not define any padding locally.

  That caused headings/inputs to appear "cut" against the card edge.
  We enforce a consistent inner padding here so all pages match the
  cronjobs_history.php look.
*/
.main-content .form-card,
.main-content .settings-card,
.main-content .content-card{
  padding: 2rem !important;
}

.main-content .table-responsive{
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.04);
  background: #fff;
}

/* Better table readability */
.main-content table.table thead th{
  white-space: nowrap;
}
.main-content table.table td,
.main-content table.table th{
  vertical-align: middle;
}

/* Nice code blocks (System Status page) */
pre.code-block, pre.codeblock, pre{
  border-radius: 1rem;
}



/* Common utility text styles */
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.hint{
  color: var(--gsmpk-muted);
  font-size: .9rem;
}


/* ─────────────────────────────────────────────────────────────
   Mobile tweaks
   ───────────────────────────────────────────────────────────── */
@media (max-width: 991.98px){
  .header{
    padding: 2.4rem 1rem 2.2rem !important;
    border-radius: 0 0 1.1rem 1.1rem !important;
  }

  .header-icon{
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .main-content .form-card,
  .main-content .settings-card,
  .main-content .content-card{
    padding: 1.25rem !important;
  }

  /* Ensure big tables can scroll on mobile */
  .main-content .table-responsive{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
