:root {
  --primary: #041E42;
  --secondary: #013559;
  --accent: #1D4F91;
  --bg: #ffffff;
  --text: #0f1e3a;
  --muted: #6c86aa;
  --card: #ffffff;
  --border: #ABCAE9;
  --divider: #e8eff7;
  --shadow: 0 10px 28px rgba(0, 0, 0, .08);
  --radius: 14px;
  --focus: #cfe3fb;
  --fs-body: clamp(13px, 1.3vw, 16px);
  --fs-small: clamp(12px, 1.1vw, 14px);
  --page-w: min(520px, 100% - 40px);
}

/* Base */
* { box-sizing: border-box }
body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.55;
  overflow-x: hidden;
}

/* Header */
.app-bar {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: .8rem;
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow);
}
.app-logo { font-weight: 800 }

/* Background shapes */
.bg-shapes { position: fixed; inset: 0; pointer-events: none; z-index: -1 }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .17; background: var(--accent) }
.blob.one { width: 520px; height: 520px; top: -220px; right: -220px; background: var(--primary) }
.blob.two { width: 420px; height: 420px; bottom: -200px; left: -200px; background: var(--secondary) }
.blob.three { width: 320px; height: 320px; top: 45%; left: 50%; transform: translate(-50%, -50%) }

/* Layout */
main.page {
  width: var(--page-w);
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  gap: 12px;
}
h1.title {
  font-weight: 800;
  color: var(--primary);
  font-size: clamp(22px, 4vw, 36px);
  text-align: center;
}

/* Form */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.field label {
  font-weight: 700;
  color: #0f2b55;
  font-size: var(--fs-small);
}
.field input,
.field textarea {
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 44px;
  transition: .15s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--focus);
  border-color: #86b5ea;
  background: #f9fbff;
}

/* Button */
.btn {
  padding: .7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  width: 100%;
  min-height: 44px;
  transition: .15s;
}
.btn:hover { background: #164074 }
.btn[disabled] { opacity: .6; cursor: not-allowed }

/* Messages */
.msg {
  font-size: 14px;
  padding: .6rem .8rem;
  border-radius: 10px;
  margin-top: 12px;
  text-align: right;
  display: none;
}
.msg.ok {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #b4e0b9;
}
.msg.err {
  background: #fdecea;
  color: #8a1c1c;
  border: 1px solid #f5c2c7;
}

/* Field-level error highlight */
.error-msg {
  color: #b42318;
  font-size: 13px;
  margin-bottom: 4px;
  font-weight: 600;
}

.field.error input,
.field.error textarea {
  border-color: #b42318;
  background: #fff6f6;
}