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

    :root {
      --green: #0a5c42;
      --green-deep: #063d2b;
      --gold: #e8b84a;
      --gold-light: #f5d78e;
      --surface: #ffffff;
      --muted: #6b7f75;
      --border: #c8ddd3;
      --error: #c0392b;
      --success: #1e8449;
    }

    html[lang="ar"] body { font-family: 'Tajawal', sans-serif; direction: rtl; }
    html[lang="en"] body, html[lang="al"] body { font-family: 'Inter', sans-serif; direction: ltr; }

    body {
      min-height: 100vh;
      background: var(--green-deep);
      background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(232, 184, 74, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(10, 92, 66, 0.5) 0%, transparent 60%);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 24px 16px 40px;
    }

    .lang-wrapper {
      position: fixed;
      top: 16px;
      left: 16px;
      z-index: 10;
    }

    html[lang="ar"] .lang-wrapper { left: auto; right: 16px; }

    .lang-select {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.2);
      color: #fff;
      padding: 7px 14px;
      border-radius: 20px;
      font-family: inherit;
      font-size: 13px;
      cursor: pointer;
      outline: none;
      backdrop-filter: blur(6px);
    }

    .lang-select option { color: #333; background: #fff; }

    /* العلامة — أعلى المنتصف */
    .brand-top {
      text-align: center;
      margin-top: clamp(32px, 8vh, 72px);
      margin-bottom: clamp(36px, 6vh, 64px);
      width: 100%;
      max-width: 480px;
    }

    .brand-logo {
      width: 56px;
      height: 56px;
      margin: 0 auto 16px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--gold), var(--gold-light));
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 24px rgba(232, 184, 74, 0.35);
    }

    .brand-logo i { font-size: 26px; color: var(--green-deep); }

    .brand-title {
      font-size: clamp(2rem, 6vw, 2.8rem);
      font-weight: 800;
      color: #fff;
      letter-spacing: 1px;
      line-height: 1.2;
      text-shadow: 0 2px 12px rgba(0,0,0,0.25);
    }

    .brand-subtitle {
      margin-top: 10px;
      font-size: 0.95rem;
      color: rgba(255,255,255,0.65);
      font-weight: 400;
    }

    /* نموذج الدخول — منتصف الشاشة */
    .login-box {
      width: 100%;
      max-width: 380px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .form-group { display: flex; flex-direction: column; gap: 7px; }

    .form-group label {
      font-size: 13px;
      font-weight: 500;
      color: rgba(255,255,255,0.75);
      text-align: center;
    }

    .input-wrapper { position: relative; }

    .form-input {
      width: 100%;
      padding: 15px 18px;
      background: var(--surface);
      border: 2px solid transparent;
      border-radius: 12px;
      color: #1a2e24;
      font-family: inherit;
      font-size: 15px;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
      text-align: center;
    }

    .form-input:focus {
      border-color: var(--gold);
      box-shadow: 0 0 0 4px rgba(232, 184, 74, 0.2);
    }

    .form-input::placeholder { color: #aab8b0; }

    .password-toggle {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
      color: var(--muted);
      font-size: 17px;
      padding: 6px;
    }

    html[lang="ar"] .password-toggle { left: 10px; }
    html[lang="en"] .password-toggle, html[lang="al"] .password-toggle { right: 10px; }

    .error-msg {
      background: rgba(192, 57, 43, 0.15);
      border: 1px solid rgba(192, 57, 43, 0.4);
      color: #ffb3ad;
      padding: 11px 14px;
      border-radius: 10px;
      font-size: 13px;
      text-align: center;
      display: none;
    }

    .btn {
      width: 100%;
      padding: 15px;
      border: none;
      border-radius: 12px;
      font-family: inherit;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.15s, box-shadow 0.15s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--gold), #d4a030);
      color: var(--green-deep);
      box-shadow: 0 6px 20px rgba(232, 184, 74, 0.35);
      margin-top: 4px;
    }

    .btn-primary:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 28px rgba(232, 184, 74, 0.45);
    }

    .btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

    .btn-secondary {
      background: transparent;
      border: 1px solid rgba(255,255,255,0.25);
      color: rgba(255,255,255,0.7);
      font-size: 14px;
      font-weight: 500;
      padding: 12px;
    }

    .btn-secondary:hover {
      border-color: rgba(255,255,255,0.5);
      color: #fff;
    }

    .btn-portal {
      background: rgba(10, 92, 66, 0.9);
      border: 1px solid rgba(255,255,255,0.2);
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      padding: 12px;
    }

    .btn-portal:hover {
      background: var(--green);
      transform: translateY(-1px);
      box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }

    .forgot-link {
      display: block;
      text-align: center;
      color: rgba(255,255,255,0.5);
      font-size: 13px;
      text-decoration: none;
      transition: color 0.2s;
    }

    .forgot-link:hover { color: var(--gold-light); }

    /* Modal */
    #forgotPasswordModal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.65);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .modal-content {
      background: var(--surface);
      border-radius: 16px;
      max-width: 400px;
      width: 100%;
      padding: 28px 24px;
      position: relative;
    }

    .modal-content .close {
      position: absolute;
      top: 12px;
      left: 12px;
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 22px;
      cursor: pointer;
    }

    html[lang="en"] .modal-content .close,
    html[lang="al"] .modal-content .close { left: auto; right: 12px; }

    .modal-content h3 {
      color: var(--green-deep);
      font-size: 18px;
      margin-bottom: 18px;
      text-align: center;
    }

    .modal-content label {
      display: block;
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 5px;
    }

    .modal-content input {
      width: 100%;
      padding: 11px 14px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-family: inherit;
      font-size: 14px;
      margin-bottom: 12px;
      outline: none;
    }

    .modal-content input:focus { border-color: var(--green); }

    .modal-content .btn { margin-bottom: 8px; }

    #fp_msg { text-align: center; font-size: 13px; margin-top: 6px; }

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