/* SecureBank ATM Suite – enterprise UI */
:root {
  --brand-primary: #0c4a6e;
  --brand-primary-dark: #082f49;
  --brand-accent: #f59e0b;
  --brand-accent-soft: rgba(245, 158, 11, 0.15);
  --surface: #f8fafc;
  --surface-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --sidebar-width: 272px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.container {
  width: min(1160px, 92vw);
  margin-inline: auto;
}

/* ---------- Landing ---------- */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-primary);
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary), #0ea5e9);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:not(.btn):hover {
  color: var(--brand-primary);
  text-decoration: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  background: radial-gradient(1200px 600px at 80% -20%, rgba(14, 165, 233, 0.25), transparent),
    linear-gradient(180deg, #f0f9ff 0%, var(--surface) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 36ch;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-card {
  background: var(--surface-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-val {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-primary);
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  max-width: 52ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--brand-accent);
  font-size: 1.25rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-band {
  background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary));
  color: #e0f2fe;
  padding: 3.5rem 0;
  text-align: center;
  border-radius: var(--radius);
  margin: 2rem 0 0;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
}

.cta-band p {
  margin: 0 0 1.5rem;
  opacity: 0.92;
}

.landing-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-accent);
  color: #1c1917;
}

.btn-primary:hover {
  background: #d97706;
  color: #1c1917;
}

.btn-secondary {
  background: #fff;
  color: var(--brand-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-info {
  background: #e0f2fe;
  color: var(--brand-primary-dark);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}

.form-control:focus {
  outline: 2px solid rgba(14, 165, 233, 0.35);
  outline-offset: 0;
  border-color: #0ea5e9;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* ---------- Admin layout ---------- */
.admin-body {
  min-height: 100vh;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--brand-primary-dark) 0%, #0c4a6e 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand .logo-mark {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.sidebar-brand span {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.25;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.65rem;
}

.sidebar-section {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.75rem 1rem 0.35rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.875rem;
  margin-bottom: 2px;
  text-decoration: none;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav a.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  font-weight: 600;
}

.sidebar-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
}

.sidebar-foot a {
  color: #94a3b8;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.admin-content {
  padding: 1.75rem;
  flex: 1;
}

@media (max-width: 960px) {
  .admin-sidebar {
    display: none;
  }

  .mobile-nav-wrap {
    display: block !important;
  }
}

.mobile-nav-wrap {
  display: none;
  padding: 0 1rem 1rem;
}

.mobile-nav-wrap select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ---------- Cards & tables ---------- */
.card {
  background: var(--surface-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-body {
  padding: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.data-table th,
table.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warn {
  background: #fef3c7;
  color: #92400e;
}

.badge-muted {
  background: #e2e8f0;
  color: #475569;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.metric {
  background: var(--surface-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-top: 0.25rem;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0c4a6e 0%, #082f49 50%, #0e7490 100%);
  padding: 2rem;
}

.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.login-card .subtitle {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-shell .admin-sidebar {
  width: 240px;
}
