/* ===== Genel ===== */
:root {
  --primary: #1a3a6e;
  --primary-light: #2d5aa0;
  --accent: #f0a500;
  --bg: #f4f6fb;
  --card-shadow: 0 4px 20px rgba(0,0,0,.10);
}

body {
  background: var(--bg);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #2c3e50;
}

/* ===== Navbar ===== */
#mainNav {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
#mainNav .nav-link { color: rgba(255,255,255,.8) !important; transition: color .2s; }
#mainNav .nav-link:hover { color: #fff !important; }

/* ===== Main content ===== */
.main-content { padding: 1.5rem 0; min-height: calc(100vh - 60px); }

/* ===== Login ===== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #4a7cc7 100%);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo {
  font-size: 3rem;
  color: var(--primary);
  display: block;
  text-align: center;
  margin-bottom: .5rem;
}

/* ===== Dashboard stat cards ===== */
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--primary);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .stat-icon { font-size: 2rem; opacity: .7; }
.stat-card .stat-num  { font-size: 2rem; font-weight: 700; color: var(--primary); }

/* ===== Section title ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--primary); }

/* ===== Tables ===== */
.table-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.table-card .table { margin: 0; }
.table-card .table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border: none;
  white-space: nowrap;
}
.table-card .table tbody tr:hover { background: #f0f4ff; }

/* ===== Forms ===== */
.form-card {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  max-width: 640px;
  margin: 0 auto;
}

/* ===== ID Card ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

/* The actual printed card — fixed px so html2canvas is consistent */
.id-card {
  width: 856px;
  height: 540px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: 'Segoe UI', system-ui, sans-serif;
  /* scale it down on screen */
  transform: scale(0.52);
  transform-origin: top left;
  flex-shrink: 0;
}

/* Outer container keeps the visual space */
.card-visual {
  width: calc(856px * 0.52);
  height: calc(540px * 0.52);
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  flex-shrink: 0;
}

/* Download buttons row */
.card-actions { display: flex; gap: .5rem; }

/* ===== Class section title ===== */
.class-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  padding: .5rem 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

/* ===== Badges ===== */
.badge-role {
  font-size: .7rem;
  padding: .3em .6em;
  border-radius: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
  .card-grid { grid-template-columns: 1fr; }
  .id-card   { transform: scale(0.40); }
  .card-visual {
    width: calc(856px * 0.40);
    height: calc(540px * 0.40);
  }
  .form-card { padding: 1.25rem; }
}
