:root
    {
 --bg:#f6f7fb;
  --surface:#fff;
  --soft:#f9fafb;
  --ink:#111827;
  --muted:#667085;
  --line:#d6dbe5;
  --primary:#2f3fe3;
  --primary-dark:#1e2bbd;
  --primary-soft:#eef0ff;
  --success:#16803c;
  --success-soft:#e8f7ee;
  --warning:#b45309;
  --warning-soft:#fff7ed;
  --danger:#c81e1e;
  --danger-soft:#fff1f2;
  --radius:7px;
  --shadow:0 10px 24px rgba(17,24,39,.07);
  --focus:0 0 0 4px rgba(47,63,227,.22);
    }

* { box-sizing: border-box; margin: 0; padding: 0; } /* everything tight */

img { vertical-align: top; } /* remove 3px jog */


html, body {
    background: #f4f4f4;
    font-family: 'Open Sans','Lato', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    }

section { width: 100%; background: #fff; padding: 0 20px; } }
section > div { max-width: 1200px; margin: 0 auto; padding: 30px 0 20px 0; background: linear-gradient(to right, #1a469a, #659bf7); }

main > div { max-width: 1200px; margin: 0 auto; padding: 20px; }

header { width: 100%; background: #fff; color: #000; border-bottom: 1px solid #ccc; }

header > div { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px; }

footer > div { max-width: 1200px; margin: 0 auto; padding: 20px; text-align: center; font-size: 0.9rem; color: var(--muted); }

nav a { font-weight: bold; text-decoration: none; padding: 10px 12px;  border-radius: var(--radius); color: #000; }
nav a:hover { background: #eef0ff; color: var(--primary); }

.grid-1{display:grid;gap:20px;grid-template-columns:repeat(1,minmax(0,1fr));margin-bottom:20px}
.grid-2{display:grid;gap:20px;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:20px}
.grid-3{display:grid;gap:20px;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:20px}
.grid-4{display:grid;gap:20px;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:20px}


@media (max-width: 768px){
  .grid-3, .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 568px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns:repeat(1,minmax(0,1fr)); }

}


.card{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow)}
.card h2{margin:0 0 8px;font-size:1.35rem}.card p{color:var(--muted)}

.page-center {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.page-center .card {
  width: 100%;
  max-width: 400px;
}

.field label{display:block;font-weight:600;margin-bottom:7px}.field small{display:block;color:var(--muted);margin-top:6px}

input,select,textarea,.readonly{width:100%;min-height:50px;padding:12px 13px;border:1px solid #cbd3df;border-radius:var(--radius);background:white;color:var(--ink)}

textarea{min-height:118px;resize:vertical}.readonly{background:var(--soft);display:flex;align-items:center}

input:focus,select:focus,textarea:focus,.btn:focus,a:focus{outline:none;box-shadow:var(--focus)}

input[aria-invalid="true"],select[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:var(--danger)}

input[type="submit"], button { font-family: inherit; font-weight: 500; font-size: 16px; padding: 10px 15px;
        background: var(--primary); color: #fff; width: 100%; }

header button { color: #000; }

.card input { margin-bottom: 20px; }

.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;border-radius:var(--radius);border:1px solid transparent;padding:0 18px;font-weight:600;cursor:pointer;text-decoration:none;transition:background-color 0.2s ease;width:100%;}

.btn-primary{background:var(--primary);color:white}
.btn-primary:hover{background:var(--primary-dark);text-decoration:none}
.btn-secondary{background:var(--primary-soft);color:var(--primary);border-color:#dfe3ff}
.btn-ghost{background:white;color:var(--ink);border-color:var(--line)}
.btn-danger{background:var(--danger-soft);color:var(--danger);border-color:#fecdd3}



.role-switcher {
  position: relative;
}


.role-trigger {
  height: 48px;
  padding: 0 16px;

  display: flex;
  align-items: center;
  gap: 10px;

  border: 1px solid #d1d5db;
  border-radius: 14px;

  background: white;
  cursor: pointer;

  font-size: 15px;
  font-weight: 600;

  transition: all 0.2s ease;
}

.role-trigger:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.role-trigger svg {
  width: 18px;
  height: 18px;
}

/* =========================
   DROPDOWN
========================= */

.role-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;

  width: 270px;

  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 20px;

  padding: 12px;

  box-shadow:
    0 10px 25px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.04);

  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-dropdown {
  display: none;
}

.role-switcher.open .role-dropdown {
  display: flex;
}

/* =========================
   ROLE OPTION
========================= */

.role-option {
  width: 100%;
  padding: 14px;

  display: flex;
  align-items: center;
  gap: 14px;

  border: none;
  border-radius: 14px;

  background: transparent;
  cursor: pointer;

  text-align: left;

  transition: background 0.2s ease;
}

.role-option:hover {
  background: #f3f4f6;
}

.role-option.active {
  background: #eff6ff;
}

/* =========================
   ICONS
========================= */

.role-icon {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  flex-shrink: 0;
}

.role-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.role-icon.blue {
  background: #2563eb;
}

.role-icon.green {
  background: #10b981;
}

.role-icon.purple {
  background: #8b5cf6;
}

/* =========================
   CONTENT
========================= */

.role-content {
  flex: 1;

  display: flex;
  flex-direction: column;
}

.role-content strong {
  font-size: 16px;
  color: #111827;
}

.role-content small {
  margin-top: 2px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}


/* =========================
   USER MENU
========================= */

.user-menu-wrapper {
  position: relative;
}

.user-menu {
  height: 48px;
  padding: 0 14px;

  display: flex;
  align-items: center;
  gap: 10px;

  border: none;
  border-radius: 14px;

  background: transparent;
  cursor: pointer;

  transition: background 0.2s ease;
}

.user-menu:hover {
  background: #f3f4f6;
}

.user-menu svg {
  width: 18px;
  height: 18px;
}

/* =========================
   AVATAR
========================= */

.avatar {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: #dbeafe;
  color: #1d4ed8;

  font-weight: 700;
  font-size: 14px;
}

/* =========================
   USER DROPDOWN
========================= */

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;

  width: 240px;

  background: white;

  border: 1px solid #e5e7eb;
  border-radius: 18px;

  padding: 10px;

  box-shadow:
    0 10px 25px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.04);

  display: none;
  flex-direction: column;
  gap: 4px;

  z-index: 1000;
}

.user-menu-wrapper.open .user-dropdown {
  display: flex;
}

/* =========================
   ITEMS
========================= */

.user-dropdown-item {
  height: 48px;
  padding: 0 14px;

  display: flex;
  align-items: center;
  gap: 12px;

  border-radius: 12px;

  text-decoration: none;

  color: #111827;
  font-size: 14px;
  font-weight: 500;

  transition: background 0.2s ease;
}

.user-dropdown-item:hover {
  background: #f3f4f6;
}

.user-dropdown-item svg {
  width: 18px;
  height: 18px;
}

/* =========================
   DIVIDER
========================= */

.dropdown-divider {
  height: 1px;
  margin: 6px 0;

  background: #e5e7eb;
}

/* =========================
   LOGOUT
========================= */

.user-dropdown-item.logout {
  color: #dc2626;
}

.user-dropdown-item.logout:hover {
  background: #fef2f2;
}


h1 {
  display:flex;
  align-items:center;
  gap:14px;

  margin:0 0 24px;

  font-size:1.8rem;
  font-weight:700;
  line-height:1.2;

  color:#111827;
  letter-spacing:-0.02em;
}

h1 svg{
  width:32px;
  height:32px;

  stroke-width:2.25;

  color:#2563eb;

  flex-shrink:0;
}
