.wcmal-wrapper {
  --wcmal-bg: #f7f7f8;
  --wcmal-card-bg: #ffffff;
  --wcmal-text: #1f2937;
  --wcmal-muted: #6b7280;
  --wcmal-primary: #2563eb;
  --wcmal-primary-dark: #1d4ed8;
  --wcmal-border: #e5e7eb;
  --wcmal-success: #0f9d58;
  --wcmal-error: #d93025;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--wcmal-bg);
  border-radius: 16px;
}
.wcmal-wrapper--modal { padding: 0; background: transparent; border-radius: 0; }
.wcmal-card {
  position: relative;
  width: min(100%, 430px); background: var(--wcmal-card-bg); border: 1px solid var(--wcmal-border);
  border-radius: 14px; box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08); padding: 22px;
}
.wcmal-title { margin: 0 0 8px; font-size: 1.4rem; color: var(--wcmal-text); }
.wcmal-subtitle { margin: 0 0 16px; color: var(--wcmal-muted); font-size: 0.92rem; }
.wcmal-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.wcmal-tab { border: 1px solid var(--wcmal-border); background: #fff; color: var(--wcmal-text); border-radius: 10px; font-weight: 700; cursor: pointer; padding: 10px; }
.wcmal-tab.is-active { background: var(--wcmal-primary); border-color: var(--wcmal-primary); color: #fff; }
.wcmal-form { display: none; }
.wcmal-form.is-active { display: block; }
.wcmal-field { margin-bottom: 12px; }
.wcmal-field label { display: block; margin-bottom: 6px; color: var(--wcmal-text); font-weight: 600; font-size: 0.9rem; }
.wcmal-field input[type='text'], .wcmal-field input[type='password'], .wcmal-field input[type='email'] { width: 100%; border: 1px solid var(--wcmal-border); border-radius: 10px; padding: 11px 12px; font-size: 0.95rem; transition: 0.2s ease; }
.wcmal-field input:focus { outline: none; border-color: var(--wcmal-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.wcmal-row { margin: 10px 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wcmal-row--single { margin: 0 0 16px; }
.wcmal-checkbox { display: inline-flex; gap: 8px; align-items: center; color: var(--wcmal-muted); font-size: 0.9rem; }
.wcmal-link { color: var(--wcmal-primary); text-decoration: none; font-weight: 600; }
.wcmal-link--password { display: inline-block; padding: 4px 0; }
.wcmal-link:hover { color: var(--wcmal-primary-dark); }
.wcmal-submit { width: 100%; border: 0; border-radius: 10px; padding: 11px 14px; color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; background: var(--wcmal-primary); transition: transform 0.15s ease, box-shadow 0.2s ease; }
.wcmal-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(37, 99, 235, 0.2); }
.wcmal-submit:disabled { opacity: 0.75; cursor: not-allowed; transform: none; }
.wcmal-message { margin-top: 12px; border-radius: 10px; padding: 10px 12px; display: none; align-items: center; gap: 8px; font-weight: 600; }
.wcmal-message.is-success, .wcmal-message.is-error, .wcmal-message.is-loading { display: inline-flex; width: 100%; }
.wcmal-message.is-success { color: var(--wcmal-success); background: #ecfdf3; }
.wcmal-message.is-error { color: var(--wcmal-error); background: #fff1f2; }
.wcmal-message.is-loading { color: #1e3a8a; background: #eff6ff; }
.wcmal-spinner { width: 15px; height: 15px; border-radius: 999px; border: 2px solid rgba(37, 99, 235, .25); border-top-color: var(--wcmal-primary); animation: wcmal-spin .75s linear infinite; }
.wcmal-dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; opacity: .85; }
@keyframes wcmal-spin { to { transform: rotate(360deg); } }
.wcmal-notice { border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.wcmal-notice--error { background: #ffefef; color: var(--wcmal-error); }
.wcmal-modal { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; }
.wcmal-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.wcmal-modal__dialog { position: relative; width: min(95vw, 480px); max-height: 90vh; overflow: visible; z-index: 2; }
.wcmal-modal__dialog .wcmal-card { padding-top: 30px; }
.wcmal-modal__close { position: absolute; top: 12px; right: 35px; z-index: 6; border: 0; cursor: pointer; background: transparent; color: #111; box-shadow: none; font-size: 24px; line-height: 1; padding: 0; width: 24px; height: 24px; }
html[dir='rtl'] .wcmal-card { text-align: right; }
html[dir='rtl'] .wcmal-modal__close { right: auto; left: 35px; }
@media (max-width: 600px) { .wcmal-wrapper { padding: 10px; border-radius: 12px; } .wcmal-card { padding: 16px; border-radius: 12px; } }
