@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
  --bg: #eef8fb;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: #ffffff;
  --ink: #17344f;
  --muted: #5f7891;
  --line: #cfe4ef;
  --brand: #124f87;
  --brand-strong: #0d3d68;
  --brand-2: #1cd3c6;
  --brand-soft: #d9f8f5;
  --danger: #bc6d3f;
  --shadow: 0 18px 40px rgba(18, 79, 135, 0.14);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(28, 211, 198, 0.26), transparent 34%),
    linear-gradient(180deg, #f4fcfe 0%, #eaf7fb 100%);
  min-height: 100vh;
}

.shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.brand-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-group img {
  display: block;
  width: auto;
  height: 28px;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-copy strong {
  font-size: 0.78rem;
  color: var(--brand-strong);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-copy span {
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--muted);
}

.panel {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.login-panel {
  min-height: calc(100vh - 40px);
  display: grid;
  align-content: center;
  gap: 22px;
}

.brand h1,
.topbar h2,
.panel h3 {
  margin: 0;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", sans-serif;
}

.topbar h2 {
  font-weight: 900;
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-strong);
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
}

.lede {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid h3,
.form-grid button,
.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
}

input,
select,
textarea {
  background: var(--card-strong);
  padding: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
}

button {
  background: var(--brand);
  color: white;
  padding: 14px 16px;
  border: none;
  font-weight: 700;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", sans-serif;
}

button.ghost {
  background: #e7f5fb;
  color: var(--brand-strong);
  border: 1px solid var(--line);
}

.hidden { display: none !important; }

.topbar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  justify-content: flex-end;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 14px;
  color: var(--brand-strong);
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-divider span {
  font-size: clamp(1.6rem, 5vw, 2.35rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  background: white;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 14px;
}

.card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", sans-serif;
}

.metric {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 6px;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px 10px;
}

.tab.active {
  background: var(--brand);
  color: white;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.history {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.request-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(18, 79, 135, 0.14);
}

.vacations-request-card {
  background: linear-gradient(135deg, #e7fff9 0%, #eef7ff 100%);
  border-color: rgba(28, 211, 198, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.permissions-request-card {
  background: linear-gradient(135deg, #fff4df 0%, #fffaf1 100%);
  border-color: rgba(214, 145, 44, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.compensatory-request-card {
  background: linear-gradient(135deg, #edf4ff 0%, #f7fbff 100%);
  border-color: rgba(74, 122, 214, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.request-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.request-card-head h4 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.request-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.request-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(18, 79, 135, 0.1);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.request-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.permissions-request-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compensatory-request-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.request-feedback {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 500;
}

.request-feedback.success {
  background: #e4fbf1;
  color: #0f6a46;
  border: 1px solid #bce9d4;
}

.request-feedback.error {
  background: #fff1e8;
  color: #9f4d22;
  border: 1px solid #f2c8ae;
}

.item {
  background: white;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 14px;
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.state {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
}

.state-cancelled {
  background: #f3e8ff;
  color: #7b3fb0;
}

.meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta strong { color: var(--ink); }

.item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.action-button {
  width: auto;
  min-width: 0;
  padding: 10px 14px;
}

.status-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 3px solid rgba(18, 79, 135, 0.18);
  border-top-color: var(--brand);
  animation: spin 0.85s linear infinite;
  flex: 0 0 18px;
}

.status-text {
  flex: 1;
}

.status.loading {
  background: #e7f5fb;
  color: var(--brand-strong);
}

.status.success {
  background: #e8faf6;
  color: #0f6a46;
}

.status.error .status-spinner {
  border-color: rgba(159, 97, 53, 0.18);
  border-top-color: #9f6135;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 24px 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(92vw, 460px);
  background: var(--brand-strong);
  color: white;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-brand img {
  display: block;
  width: auto;
  height: 18px;
  object-fit: contain;
  opacity: 0.9;
}

a.file-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

button.file-link {
  width: auto;
  min-width: 0;
  padding: 10px 14px;
}

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

@media (max-width: 760px) {
  .form-grid,
  .tabs,
  .request-form {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 14px 12px 28px;
  }

  .brand-strip {
    padding: 9px 10px;
    margin-bottom: 12px;
  }

  .panel {
    padding: 16px;
    border-radius: 20px;
  }
}
