/* ==========================================================================
   i-HRMS (Human Resource Management System) - Clean & Minimal White Theme
   Design: Strict White Mode | Matching i-CMS Logo Design
   ========================================================================== */

:root {
  /* Clean White Palette */
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-subtle: #f8fafc;

  /* Brand Colors */
  --brand-orange: #f97316;
  --brand-blue: #1d4ed8;
  --brand-gradient: linear-gradient(135deg, #ff7a18 0%, #f97316 36%, #1d4ed8 100%);
  --brand-btn-primary: #1d4ed8;
  --brand-btn-primary-hover: #1e40af;
  --brand-btn-orange: #f97316;
  --brand-btn-orange-hover: #ea580c;

  /* Text & Borders */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-light: #e2e8f0;
  --border-input: #cbd5e1;
  --border-focus: #1d4ed8;

  /* Alerts */
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #991b1b;

  /* Shadows */
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --focus-ring: 0 0 0 3px rgba(29, 78, 216, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Wrapper Layout */
.login-wrapper {
  width: 100%;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   Logo Section (i-CMS design)
   ========================================================================== */

.brand-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ihrms-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.ihrms-text-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  padding: 0 4px;
}

.ihrms-logo-text {
  display: block;
  font-family: 'Orbitron', 'Plus Jakarta Sans', sans-serif;
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.20em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  text-transform: uppercase;
}

/* DV Analytics mini badge */
.ihrms-dv-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  margin-top: 2px;
}

.ihrms-dv-badge:hover {
  opacity: 1;
}

.ihrms-dv-by {
  font-family: 'Arial Nova', 'Arial Novo', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.ihrms-dv-img {
  width: 82px;
  height: auto;
  display: block;
}

/* ==========================================================================
   Simple Login Card
   ========================================================================== */

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

/* Role Selector Tab */
.role-selector {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 6px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.role-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.role-icon {
  width: 17px;
  height: 17px;
}

.role-btn:hover {
  color: var(--text-main);
}

.role-btn.active {
  background: #ffffff;
  color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.role-btn.active .role-icon {
  stroke: var(--brand-blue);
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 7px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

.input-wrap input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.input-wrap input:hover {
  border-color: #94a3b8;
}

.input-wrap input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

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

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

/* Alert Box */
.alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 14px;
  text-align: center;
}

.alert-box.hidden {
  display: none;
}

.alert-box.error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

.alert-box.success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

/* Submit Button */
.btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.btn-primary {
  background-color: var(--brand-btn-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--brand-btn-primary-hover);
}

.btn-primary:active {
  transform: scale(0.99);
}

/* Responsive */
@media (max-width: 480px) {
  .ihrms-logo-text {
    font-size: 2.6rem;
    letter-spacing: 0.16em;
  }
  .login-card {
    padding: 22px 18px 26px 18px;
  }
}
