/* ============================================================
   AUTH APP — Shared Stylesheet
   ============================================================ */

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

:root {
  --bg-from:   #1a1a40;
  --bg-to:     #0d0d2b;
  --card-bg:   #9ca3af;
  --card-radius: 16px;
  --input-bg:  #777;
  --input-color: #eee;
  --label-color: #111;
  --sub-color:  #222;
  --accent:    #3730a3;
  --accent-hover: #2e279a;
  --icon-bg:   #2d2d55;
  --divider-color: #888;
  --error-color: #dc2626;
  --success-color: #16a34a;
  --white: #ffffff;
  --shadow: 0 0 30px rgba(0,0,0,0.4);
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-from), var(--bg-to));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Card ── */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 40px;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow);
}

/* ── Icon ── */
.icon {
  width: 60px;
  height: 60px;
  background: var(--icon-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--white);
  font-size: 28px;
}

/* ── Headings ── */
h2 {
  text-align: center;
  margin-bottom: 4px;
  color: #111;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

p.sub {
  text-align: center;
  color: var(--sub-color);
  margin-bottom: 24px;
  font-size: 14px;
}

/* ── Form fields ── */
label {
  font-size: 12px;
  font-weight: bold;
  color: var(--label-color);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--input-color);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus {
  border-color: var(--accent);
}

.field-wrap {
  margin-bottom: 14px;
}

.field-hint {
  font-size: 11px;
  color: #444;
  margin-bottom: 2px;
}

.field-error {
  font-size: 11px;
  color: var(--error-color);
  min-height: 16px;
  margin-bottom: 2px;
}

/* ── Buttons ── */
.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.login-btn:hover { background: var(--accent-hover); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Divider ── */
.divider {
  text-align: center;
  font-size: 12px;
  color: #333;
  margin: 16px 0;
  border-top: 1px solid var(--divider-color);
  line-height: 0;
}

.divider span {
  background: var(--card-bg);
  padding: 0 8px;
}

/* ── Google button ── */
.google-btn {
  width: 100%;
  padding: 12px;
  background: var(--white);
  border: 1px solid #ccc;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: box-shadow 0.2s;
}

.google-btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.google-btn img { width: 18px; height: 18px; }

/* ── Footer link ── */
.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
}

.footer a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success-color); }
.toast.error   { background: var(--error-color); }

/* ============================================================
   DASHBOARD — Role Selection Page
   ============================================================ */

.dashboard-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.dashboard-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 48px 40px;
  width: 560px;
  max-width: 95vw;
  box-shadow: var(--shadow);
  text-align: center;
}

.dashboard-card .icon { margin-bottom: 20px; }

.dashboard-card h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.dashboard-card p.sub { margin-bottom: 36px; }

.user-badge {
  display: inline-block;
  background: var(--icon-bg);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.role-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.role-btn {
  flex: 1;
  min-width: 180px;
  padding: 20px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.role-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.role-btn .role-icon { font-size: 32px; }

.role-btn.developer {
  background: var(--accent);
  color: var(--white);
}

.role-btn.client {
  background: #065f46;
  color: var(--white);
}

.role-btn .role-desc {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.85;
}

.logout-link {
  margin-top: 28px;
  font-size: 13px;
  color: #333;
}

.logout-link a {
  color: var(--accent);
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Role iframe panels ── */
.panel-section {
  width: 100%;
  max-width: 1000px;
  margin-top: 32px;
}

.panel-header {
  background: var(--icon-bg);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px 10px 0 0;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  background: #1e1e3a;
  border-radius: 0 0 10px 10px;
  padding: 32px;
  color: #c7d2fe;
  font-size: 14px;
  min-height: 200px;
}

.panel-body ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.panel-body ul li {
  background: #2d2d55;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.panel-body ul li:hover { background: #3730a3; color: #fff; }
.panel-body ul li span { font-size: 24px; }

@media (max-width: 500px) {
  .role-buttons { flex-direction: column; }
  .role-btn { min-width: unset; }
}
