/* ===== HRIMS Employee ID System - Main Styles ===== */

:root {
  --primary: #1a3a6c;
  --primary-light: #2656a8;
  --primary-dark: #0f2347;
  --accent: #e8a020;
  --accent-dark: #c8880a;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --light-bg: #f4f6fb;
  --card-shadow: 0 4px 20px rgba(26, 58, 108, 0.12);
  --border-radius: 12px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light-bg);
  color: #2d3748;
  min-height: 100vh;
}

/* ===== PAGES ===== */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ===== LOGIN PAGE ===== */
#page-login {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#page-login.active { display: flex; }

.login-wrapper {
  width: 100%;
  max-width: 440px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.login-logo h1 {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-logo p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-top: 4px;
}

.login-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.login-card .subtitle {
  color: #718096;
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.form-group .input-icon-wrap {
  position: relative;
}

.form-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 16px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  color: #2d3748;
}

.form-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(38, 86, 168, 0.15);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 58, 108, 0.4);
}

.login-hint {
  background: #ebf4ff;
  border-left: 4px solid var(--primary-light);
  border-radius: 4px;
  padding: 10px 14px;
  margin-top: 20px;
  font-size: 12.5px;
  color: #4a5568;
}

.login-hint code {
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }
.alert-danger { background: #fff5f5; border: 1px solid #fed7d7; color: var(--danger); }
.alert-success { background: #f0fff4; border: 1px solid #c6f6d5; color: var(--success); }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--primary);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.navbar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.navbar-brand .brand-text {
  display: flex;
  flex-direction: column;
}

.navbar-brand .brand-text span:first-child {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.navbar-brand .brand-text span:last-child {
  font-size: 11px;
  opacity: 0.7;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.btn-logout {
  padding: 7px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover { background: rgba(255,255,255,0.22); }

/* ===== DASHBOARD ===== */
.dashboard-body {
  padding: 28px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.page-header p {
  font-size: 14px;
  color: #718096;
  margin-top: 2px;
}

/* ===== STATS ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid transparent;
}

.stat-card.blue { border-color: var(--primary-light); }
.stat-card.green { border-color: var(--success); }
.stat-card.amber { border-color: var(--accent); }
.stat-card.red { border-color: var(--danger); }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card.blue .stat-icon { background: #ebf4ff; }
.stat-card.green .stat-icon { background: #f0fff4; }
.stat-card.amber .stat-icon { background: #fffbeb; }
.stat-card.red .stat-icon { background: #fff5f5; }

.stat-info .stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 13px;
  color: #718096;
  margin-top: 4px;
}

/* ===== SECTION CARD ===== */
.section-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.section-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-body { padding: 24px; }

/* ===== BUTTONS ===== */
.btn {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1e8035; transform: translateY(-1px); }

.btn-warning { background: var(--accent); color: #fff; }
.btn-warning:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b02a37; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

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

/* ===== FORM ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 5px;
}

.form-field input, .form-field select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
  color: #2d3748;
  background: #fff;
}

.form-field input:focus, .form-field select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(38,86,168,0.1);
}

.form-field input[readonly] {
  background: #f7fafc;
  color: #718096;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

/* ===== AUTO-FIELDS BADGE ===== */
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ebf4ff;
  border: 1px dashed var(--primary-light);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.auto-badge strong { color: var(--primary-dark); }

/* ===== UPLOAD ===== */
.upload-zone {
  border: 2px dashed #cbd5e0;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f7fafc;
}

.upload-zone:hover {
  border-color: var(--primary-light);
  background: #ebf4ff;
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: #dbeafe;
}

.upload-zone .upload-icon { font-size: 40px; margin-bottom: 8px; }
.upload-zone p { color: #4a5568; font-size: 14px; }
.upload-zone .hint { font-size: 12px; color: #a0aec0; margin-top: 4px; }

.progress-bar-wrap {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  margin-top: 12px;
  overflow: hidden;
  display: none;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 99px;
  transition: width 0.3s;
}

/* ===== SEARCH ===== */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input:focus {
  border-color: var(--primary-light);
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
}

/* ===== ID CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.id-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(26,58,108,0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.id-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(26,58,108,0.18);
}

.id-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.id-card-header::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.id-card-header .org-name {
  font-size: 10px;
  opacity: 0.8;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.id-card-header .emp-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.id-card-header .emp-desig {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 3px;
}

.id-card-body {
  padding: 14px 16px;
}

.id-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.id-card-info .info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: #4a5568;
}

.id-card-info .info-item .ico {
  width: 18px;
  text-align: center;
  color: var(--primary-light);
  font-size: 12px;
}

.id-card-info .info-item strong { color: #2d3748; }

.qr-wrap {
  flex-shrink: 0;
}

.qr-wrap img, .qr-wrap canvas {
  width: 72px;
  height: 72px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px;
}

.id-card-footer {
  border-top: 1px solid #e2e8f0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.id-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.expiry-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 600;
}

.expiry-badge.valid { background: #c6f6d5; color: #1a6635; }
.expiry-badge.expiring { background: #fef3c7; color: #92400e; }
.expiry-badge.expired { background: #fed7d7; color: #9b1c1c; }

.card-actions {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h4 { font-size: 18px; font-weight: 700; color: #4a5568; margin-bottom: 6px; }
.empty-state p { font-size: 14px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--border-radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--primary); }

.btn-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f4f6fb;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #718096;
  transition: background 0.2s;
}
.btn-modal-close:hover { background: #e2e8f0; color: #2d3748; }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  border-left: 4px solid transparent;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.info { border-color: var(--primary-light); }
.toast.warning { border-color: var(--accent); }

.toast-icon { font-size: 20px; }
.toast-msg { flex: 1; font-weight: 500; color: #2d3748; }

/* ===== PRINT PREVIEW ===== */
#page-print { background: #e8e8e8; }
#page-print.active { display: block; }

.print-toolbar {
  background: var(--primary);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.print-toolbar h3 { color: #fff; font-size: 15px; }

.print-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  margin: 20px auto;
  padding: 15mm;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.print-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8mm;
}

.print-id-card {
  border: 1px solid #c8d0e0;
  border-radius: 8px;
  overflow: hidden;
  page-break-inside: avoid;
  break-inside: avoid;
}

.print-card-top {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 10px 12px 8px;
  color: #fff;
}

.print-card-top .org { font-size: 7px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.print-card-top .pname { font-size: 12px; font-weight: 700; line-height: 1.2; margin-top: 3px; }
.print-card-top .pdesig { font-size: 9px; opacity: 0.85; }

.print-card-mid {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.print-card-details { flex: 1; }
.print-card-details .det { font-size: 8.5px; color: #4a5568; margin-bottom: 4px; }
.print-card-details .det strong { color: #1a3a6c; }

.print-qr img, .print-qr canvas { width: 52px; height: 52px; }

.print-card-foot {
  border-top: 1px solid #e2e8f0;
  padding: 5px 12px;
  background: #f7f9ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.print-card-foot .pid { font-size: 9px; font-weight: 700; color: var(--primary); }
.print-card-foot .pexp { font-size: 8px; color: #718096; }

/* ===== SIDEBAR NAV ===== */
.app-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 20px 0;
  flex-shrink: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #4a5568;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: var(--light-bg);
  color: var(--primary);
}

.sidebar-nav a.active {
  background: #ebf4ff;
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 700;
}

.sidebar-nav a .nav-icon { font-size: 18px; }

.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #a0aec0;
  padding: 16px 24px 6px;
}

.main-content { flex: 1; overflow-x: hidden; }

/* ===== TABS ===== */
.tab-nav {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
  gap: 4px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: -2px;
}

.tab-btn:hover { color: var(--primary); background: #f7fafc; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

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

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  background: var(--light-bg);
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f4f8;
  color: #2d3748;
  vertical-align: middle;
}

.data-table tr:hover td { background: #f7fafc; }

.data-table .dept-chip {
  background: #ebf4ff;
  color: var(--primary);
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .print-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-body { padding: 16px; }
  .print-sheet { width: 100%; padding: 10mm; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== PRINT MEDIA ===== */
@media print {
  .no-print, .navbar, .sidebar, .print-toolbar, .print-sheet-meta { display: none !important; }
  #page-print { background: #fff !important; }
  .print-sheet {
    margin: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
    min-height: unset;
  }
  .print-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .print-id-card { page-break-inside: avoid; break-inside: avoid; }
  body { background: #fff; }
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }
