/* ============================================================
   PN ANNSETU NETWORKS - EMPLOYEE MANAGEMENT SYSTEM (EMS) STYLES
   ============================================================ */

:root {
  --green-deep: #00361A;
  --green-mid: #1A4D2E;
  --green-accent: #059669;
  --green-light: #D1FAE5;
  --green-bg: #ECFDF5;
  --amber: #F59E0B;
  --amber-light: #FEF3C7;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --blue: #3B82F6;
  --blue-light: #DBEAFE;
  
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-light: #64748B;
  --border: #E2E8F0;
  --border-focus: #1A4D2E;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ──────────────────────────────────────────── */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 54, 26, 0.15);
}

.nav-title-group {
  display: flex;
  flex-direction: column;
}

.nav-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green-deep);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nav-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--green-deep);
  background: var(--green-bg);
}

.nav-cta {
  background: var(--green-deep);
  color: #FFFFFF !important;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-cta:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ── LAYOUT & CONTAINERS ────────────────────────────── */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  width: 100%;
  flex: 1;
}

/* ── HERO BANNER ────────────────────────────────────── */
.ems-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.ems-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin-bottom: 24px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.stat-lbl {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-top: 4px;
}

/* ── TABBED NAVIGATION ──────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.tab-btn {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--green-deep);
}

.tab-btn.active {
  color: var(--green-deep);
  border-bottom-color: var(--green-deep);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── SEARCH & FILTER CONTROLS ───────────────────────── */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--green-light);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  outline: none;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--green-deep);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-dark);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-light);
}

.btn-danger {
  background: var(--red-light);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red);
  color: #FFFFFF;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ── DATA TABLES ────────────────────────────────────── */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg);
  padding: 14px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 16px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(248, 250, 252, 0.8);
}

/* ── BADGES & PILLS ─────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-emp {
  background: var(--green-light);
  color: var(--green-deep);
}

.badge-int {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-active {
  background: #DCFCE7;
  color: #15803D;
}

.badge-inactive {
  background: var(--red-light);
  color: var(--red);
}

.badge-leave {
  background: var(--amber-light);
  color: #B45309;
}

/* ── CARD GENERATOR CANVAS SECTION ─────────────────── */
.generator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 1024px) {
  .generator-grid {
    grid-template-columns: 1fr;
  }
}

.card-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card-box-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Canvas Drop Zone & Drag Handle */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
}

.drop-zone:hover {
  border-color: var(--green-accent);
  background: var(--green-bg);
}

.canvas-editor-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  margin-top: 16px;
}

.canvas-editor-img {
  width: 100%;
  display: block;
  user-select: none;
}

.stamp-draggable {
  position: absolute;
  padding: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px dashed var(--green-accent);
  border-radius: var(--radius-sm);
  cursor: move;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.stamp-qr {
  width: 64px;
  height: 64px;
  background: #EEE;
  border-radius: 4px;
}

.stamp-id-text {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--green-deep);
  margin-top: 4px;
}

/* ── MODALS ─────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-backdrop.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: span 2;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--green-light);
}

.modal-footer {
  padding: 16px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ── PUBLIC VERIFICATION PAGE ──────────────────────── */
.verify-card-wrap {
  max-width: 640px;
  margin: 40px auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.verify-header {
  background: var(--green-deep);
  color: #FFFFFF;
  padding: 32px 24px;
  text-align: center;
}

.verify-seal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #FFFFFF;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.verify-seal img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.verify-status-banner {
  padding: 12px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.verify-status-banner.valid {
  background: #DCFCE7;
  color: #15803D;
}

.verify-status-banner.invalid {
  background: var(--red-light);
  color: var(--red);
}

.verify-details-list {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.verify-detail-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.verify-detail-item:last-child {
  border-bottom: none;
}

.verify-detail-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.verify-detail-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* ── FOOTER ────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: auto;
}

.hidden {
  display: none !important;
}
