/* =========================================================
   MailFooter - Modern Dual-Card Login Portal Styles
   ========================================================= */

:root {
  --bg-dark: #070a13;
  --bg-card: rgba(13, 19, 33, 0.75);
  --bg-card-hover: rgba(18, 26, 45, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(78, 224, 0, 0.35);
  --border-card-admin: rgba(22, 119, 255, 0.35);
  --accent-green: #4ee000;
  --accent-green-glow: rgba(78, 224, 0, 0.25);
  --accent-blue: #1677ff;
  --accent-blue-glow: rgba(22, 119, 255, 0.25);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  font-family: var(--font-family);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Glows */
.ambient-glow-1 {
  position: fixed;
  top: -15%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(78, 224, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-2 {
  position: fixed;
  bottom: -20%;
  right: 15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.portal-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  background: rgba(7, 10, 19, 0.6);
}

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

.portal-logo {
  height: 56px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(78, 224, 0, 0.28));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.portal-logo:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 3px 16px rgba(78, 224, 0, 0.38));
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(78, 224, 0, 0.08);
  border: 1px solid rgba(78, 224, 0, 0.25);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-green);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.link-overview {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.link-overview:hover {
  color: #fff;
}

/* Main Container */
.portal-main {
  flex: 1;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.portal-intro {
  text-align: center;
  max-width: 640px;
  margin-bottom: 40px;
}

.portal-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  max-width: 980px;
}

/* Dual Card Base */
.portal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.card-staff:hover {
  border-color: var(--border-card-hover);
  box-shadow: 0 25px 50px -12px var(--accent-green-glow);
}

.card-admin:hover {
  border-color: var(--border-card-admin);
  box-shadow: 0 25px 50px -12px var(--accent-blue-glow);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 12px;
}

.card-badge.staff-badge {
  background: rgba(78, 224, 0, 0.12);
  color: #4ee000;
  border: 1px solid rgba(78, 224, 0, 0.3);
}

.card-badge.admin-badge {
  background: rgba(22, 119, 255, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(22, 119, 255, 0.3);
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.staff-icon {
  background: rgba(78, 224, 0, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(78, 224, 0, 0.2);
}

.admin-icon {
  background: rgba(22, 119, 255, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(22, 119, 255, 0.2);
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
  min-height: 42px;
}

/* Forms */
.card-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--accent-green);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 0.2s;
}

.form-input {
  width: 100%;
  background: rgba(5, 8, 17, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 13px 14px 13px 42px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(8, 13, 27, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.card-staff .form-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(78, 224, 0, 0.15);
}

.card-admin .form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
}

.form-input::placeholder {
  color: var(--text-dim);
}

/* Autocomplete / Directory Tags Dropdown */
.directory-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.directory-dropdown.show {
  display: block;
}

.dropdown-item {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

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

.dropdown-item:hover, .dropdown-item.active {
  background: rgba(78, 224, 0, 0.12);
}

.item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Buttons */
.btn-submit {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 10px;
}

.btn-staff {
  background: #4ee000;
  color: #050811;
  box-shadow: 0 4px 15px rgba(78, 224, 0, 0.35);
}

.btn-staff:hover {
  background: #5bf700;
  box-shadow: 0 6px 20px rgba(78, 224, 0, 0.5);
  transform: translateY(-1px);
}

.btn-admin {
  background: #1677ff;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(22, 119, 255, 0.35);
}

.btn-admin:hover {
  background: #2f85ff;
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.5);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Feedback & Result Panels */
.feedback-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  display: none;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.feedback-success {
  background: rgba(78, 224, 0, 0.1);
  border: 1px solid rgba(78, 224, 0, 0.25);
  color: #86efac;
}

/* User Not Found Call-To-Action Box */
.not-found-box {
  display: none;
  margin-top: 20px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
  animation: fadeIn 0.25s ease-out;
}

.not-found-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 6px;
}

.not-found-desc {
  font-size: 12.5px;
  color: #e2e8f0;
  margin-bottom: 14px;
  line-height: 1.5;
}

.btn-create-sig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  transition: all 0.2s;
}

.btn-create-sig:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Footer */
.portal-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 32px 24px;
  font-size: 13.5px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.portal-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.portal-footer-logo {
  height: 38px;
  width: auto;
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px rgba(78, 224, 0, 0.2));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.portal-footer-logo:hover {
  opacity: 1;
  transform: scale(1.03);
}

.portal-footer p {
  line-height: 1.6;
  margin: 0;
}

.portal-footer span {
  color: #f1f5f9;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 860px) {
  .portal-header {
    padding: 18px 24px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .portal-card {
    padding: 28px 22px;
  }
  .portal-title {
    font-size: 28px;
  }
}
