/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
  /* Color Palette */
  --primary: #089789;          /* Main Teal */
  --primary-hover: #0a7368;
  --primary-light: #e0e7ff;
  --text-main: #0f172a;        /* Deep Slate */
  --text-muted: #64748b;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  
  /* Dashboard Theme */
  --dash-bg: #0f172a;
  --dash-sidebar: #1e293b;
  --dash-card: #334155;
  --dash-accent: #38bdf8;

  /* Typography */
  --font-family: 'Poppins', sans-serif;

  /* Elevation & Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
}
.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  gap: 5%;
}
/* Language Selector Styles */
.language-selector select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.9rem 2.2rem 0.9rem 0.9rem;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);

  /* Custom Arrow Icon (Teal) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23089789' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
}

.language-selector select {
    accent-color: #089789;
}
.language-selector select:hover {
  border-color: #089789;
  background-color: #bcf1eb;
}

.language-selector select:focus {
  outline: none;
  border-color: #089789;
  box-shadow: 0 0 0 3px rgba(8, 151, 137, 0.2);
}

.language-selector select option {
  background: #fff;
  color: var(--text-main);
}
.language-selector select option:hover {
  background: #089789;
  accent-color: #089789;
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(8, 151, 137, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(8, 151, 137, 0.45);
}

.btn-outline {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-outline:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(8, 151, 137, 0.45);
}

/* ==========================================================================
   3. BACKGROUND GLOW SHAPES
   ========================================================================== */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}

.shape1 {
  width: 400px;
  height: 400px;
  background-color: rgba(8, 151, 137, 0.25); /* Teal glow */
  top: -100px;
  left: -100px;
}

.shape2 {
  width: 450px;
  height: 450px;
  background-color: rgba(56, 189, 248, 0.2); /* Soft sky blue glow */
  bottom: -150px;
  right: -100px;
}

.shape3 {
  width: 300px;
  height: 300px;
  background-color: rgba(8, 151, 137, 0.15);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   4. REGISTRATION FORM & CARD
   ========================================================================== */
.auth {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 520px;
  padding: 2.5rem 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
}

/* Form Layout */
.auth form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  font-size: 0.925rem;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-group textarea {
  resize: vertical;
  min-height: 85px;
}

/* Input Focus Glow */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(8, 151, 137, 0.18);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

/* Password Toggle Field Wrapper */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 2.75rem;
}

.password-field i {
  position: absolute;
  right: 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.password-field i:hover {
  color: var(--primary);
}

/* ==========================================================================
   PASSWORD RULES & VALIDATION CHECKLIST
   ========================================================================== */
.password-rules {
  margin-top: 0.6rem;
  padding: 0.75rem 0.9rem;
  background-color: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.password-rules p {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.password-rules p i {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: var(--transition);
}

/* Validated State (Active when JavaScript detects rule met) */
.password-rules p.valid {
  color: #059669; /* Emerald Green */
  font-weight: 500;
}

.password-rules p.valid i {
  color: #059669;
}




.form-group input.error,
.form-group textarea.error{

    border:2px solid #ef4444;
    background:#fef2f2;

}

.form-group input.success,
.form-group textarea.success{

    border:2px solid #22c55e;
    background:#f0fdf4;

}

.error-message {
    font-size: 13px;
    color: #ef4444;
    margin-top: 5px;
    min-height: 0;
    height: 0;
    overflow: hidden;
    transition: 0.3s ease;
}

.error-message.show {
    height: 20px;
}

.password-rules .valid{

    color:#16a34a;

}

.password-rules .invalid{

    color:#ef4444;

}




/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.checkbox input[type="checkbox"] {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.checkbox label {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Submit Button */
.register-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

/* Footer Link */
.auth-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  margin-left: 0.25rem;
}

.auth-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* =========================================================
   SUCCESS / ERROR POPUP
   ========================================================= */

.toast {
    position: fixed;
    top: 30px;
    right: 30px;

    min-width: 320px;
    max-width: 420px;

    padding: 18px 20px;

    background: #ffffff;

    border-radius: 14px;

    display: flex;
    align-items: flex-start;
    gap: 14px;

    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.15);

    border-left: 5px solid var(--primary);

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    transform: translateX(120%);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}


/* SHOW POPUP */

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* ICON */

.toast i {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 1px;
}


/* MESSAGE */

#toastMessage {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-main);
}


/* SUCCESS */

.toast.success {
    border-left-color: #16a34a;
}

.toast.success i {
    color: #16a34a;
}


/* ERROR */

.toast.error {
    border-left-color: #ef4444;
}

.toast.error i {
    color: #ef4444;
}


/* MOBILE */

@media (max-width: 600px) {

    .toast {
        top: 20px;
        left: 20px;
        right: 20px;

        min-width: auto;
        max-width: none;

        transform: translateY(-120%);
    }

    .toast.show {
        transform: translateY(0);
    }

}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background-color: var(--bg-card);
}

/* Responsive Scaling */
@media (max-width: 768px) {
  .auth {
    padding: 1.5rem 1rem;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
    width: 90%;
  }

  .auth-header h2 {
    font-size: 1.5rem;
  }
}

