:root {
  --bg-primary: #080b11;
  --bg-card: rgba(15, 23, 42, 0.45);
  --bg-card-hover: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.5);
  
  --primary: #06b6d4;
  --primary-hover: #22d3ee;
  --primary-glow: rgba(6, 182, 212, 0.2);
  
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.3);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Grid Background */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  z-index: 1;
  pointer-events: none;
}

/* Blur Blobs */
.blob {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  animation: pulse 12s infinite alternate;
}

.blob-1 {
  background-color: var(--primary);
  top: -10%;
  right: 10%;
}

.blob-2 {
  background-color: #8b5cf6;
  bottom: -10%;
  left: 10%;
  animation-delay: 4s;
}

@keyframes pulse {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, -50px) scale(1.1);
  }
}

/* Main Container */
.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

/* Card */
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.login-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

/* Shake Animation on Error */
.login-card.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Logo & Header */
.header {
  text-align: center;
  margin-bottom: 36px;
}

.logo-wrapper {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
  position: relative;
}

.logo-wrapper::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  z-index: -1;
  opacity: 0.5;
  filter: blur(4px);
}

.logo-icon {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Form Styling */
.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: left;
  letter-spacing: 0.2px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background: rgba(8, 11, 17, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

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

.form-input:focus {
  border-color: var(--primary);
  background: rgba(8, 11, 17, 0.8);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input:focus + .input-icon {
  fill: var(--primary);
}

/* Password Toggle Eye */
.password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.password-toggle:hover {
  color: var(--text-secondary);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.form-input-pwd {
  padding-right: 44px;
}

/* Helper actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.remember-me input {
  margin-right: 8px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.forgot-password:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Login Button */
.btn-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(1px);
}

/* Loading state */
.btn-submit.loading {
  pointer-events: none;
  color: transparent;
}

.spinner {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
  display: block;
}

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

/* Alert Notification */
.alert-banner {
  display: flex;
  align-items: flex-start;
  background-color: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #fda4af;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-banner.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 100px;
  margin-bottom: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.alert-icon {
  width: 18px;
  height: 18px;
  fill: var(--error);
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Footer / Extra info */
.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer a:hover {
  color: var(--primary);
}

/* Security Policies Layout */
.policies-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 860px;
  padding: 24px;
}

.policies-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.policies-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.policies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-wrapper-small {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.logo-wrapper-small svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.policies-title-group {
  flex: 1;
  text-align: left;
  margin-left: 4px;
}

.policies-title-group h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 2px;
  text-transform: capitalize;
}

.policies-title-group .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.policy-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.policy-badge.confidential {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fda4af;
}

.policies-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}

.policies-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-smooth);
  gap: 10px;
  text-align: left;
}

.sidebar-menu a svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.sidebar-menu a:hover svg {
  color: var(--primary);
}

.sidebar-menu a.active {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--primary);
}

.sidebar-menu a.active svg {
  color: var(--primary);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  height: 40px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.policies-content {
  min-height: 340px;
  text-align: left;
}

.policy-section {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.policy-section.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.policy-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}

.policy-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.policy-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  margin-top: 24px;
}

.policy-highlight {
  background: rgba(6, 182, 212, 0.06);
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 16px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #a5f3fc;
}

.policy-highlight strong {
  color: var(--primary);
  font-weight: 600;
}

.policy-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.policy-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.policy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Responsive Policy Layout */
@media (max-width: 768px) {
  .policies-container {
    max-width: 100%;
    padding: 16px;
  }
  
  .policies-card {
    padding: 24px;
  }
  
  .policies-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .policies-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 20px;
  }
  
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .sidebar-menu li {
    flex: 1 1 auto;
  }
  
  .sidebar-menu a {
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .btn-back {
    margin-top: 16px;
    width: 100%;
  }
}

