/* ==========================================================================
   URLOPY MOBILE — Power Apps Modern Controls (mobile)
   Font: Segoe UI Variable, 14px body
   Layout: mobile viewport (max 420px), wycentrowane
   Paleta: zielony akcent (zachowany z oryginału)
   ========================================================================== */

:root {
  /* Akcent zielony jak na screenie PIN */
  --green:           #3f8f3a;
  --green-dark:      #2d6d29;
  --green-soft:      #dcf2d8;
  --green-bg:        #f2faf0;

  /* Fluent neutral palette */
  --ink:             #242424;     /* neutral-foreground-1 (Power Apps) */
  --text:            #424242;     /* neutral-foreground-2 */
  --muted:           #616161;     /* neutral-foreground-3 */
  --muted-2:         #8a8886;     /* placeholder */
  --line:            #d1d1d1;     /* Power Apps standard border */
  --line-soft:       #edebe9;     /* Fluent neutral-stroke-subtle */
  --bg:              #ffffff;
  --bg-page:         #faf9f8;     /* ~Fluent neutral-background-3 */
  --bg-input:        #ffffff;

  /* Statusy */
  --status-dodany-bg:        #f3f2f1;   --status-dodany-text:        #616161;
  --status-wyslany-bg:       #fff4ce;   --status-wyslany-text:       #795200;
  --status-zatwierdzony-bg:  #dff6dd;   --status-zatwierdzony-text:  #107c10;
  --status-odrzucony-bg:     #fde7e9;   --status-odrzucony-text:     #a4262c;
  --status-anulowany-bg:     #edebe9;   --status-anulowany-text:     #8a8886;

  /* Modern Controls */
  --radius-input:    4px;
  --radius-card:     8px;

  --font-sans: 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
}

/* ── APP: wycentrowany "mobile viewport" max 420px na desktopie ──── */
.app {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

/* ── TOPBAR ────────────────────────────────────────────────────── */
.topbar {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  background: var(--bg);
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.topbar-brand-main {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.topbar-user {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── SCREEN CONTENT ───────────────────────────────────────────── */
.screen {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.screen-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.screen-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── BOTTOM NAV (ikona + podpis) ──────────────────────────────── */
.bottom-nav {
  height: 64px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  flex: 0 0 auto;
  background: var(--bg);
}

.bottom-btn {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  min-width: 56px;
  border-radius: var(--radius-input);
  transition: background 0.1s;
}

.bottom-btn:hover { background: var(--green-bg); }

.bottom-btn-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-btn-label {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  margin-top: 1px;
}

.bottom-btn-primary {
  color: var(--green);
}
.bottom-btn-secondary {
  color: var(--muted);
}
.bottom-btn-secondary:hover { color: var(--ink); }

/* CTA "+" w bottom-nav — okrągły zielony button */
.bottom-btn-cta {
  background: var(--green);
  color: #fff;
  border-radius: 100px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 6px rgba(63, 143, 58, 0.3);
  transition: all 0.15s;
  border: 0;
  margin: 0 4px;
}
.bottom-btn-cta:hover { background: var(--green-dark); }
.bottom-btn-cta:active { transform: scale(0.96); }
.bottom-btn-cta svg {
  width: 22px; height: 22px;
  stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round;
}

/* ── CARD ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card-clickable { cursor: pointer; }
.card-clickable:hover {
  border-color: var(--green);
  box-shadow: 0 1px 3px rgba(63, 143, 58, 0.08);
}

/* ── MENU — 3 duże kafle ──────────────────────────────────────── */
.menu-tiles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-tile {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.1s;
  text-align: center;
  position: relative;
}
.menu-tile:hover {
  border-color: var(--green);
  box-shadow: 0 1px 4px rgba(63, 143, 58, 0.1);
}
.menu-tile-icon {
  width: 48px; height: 48px;
  color: var(--green);
}
.menu-tile-icon svg {
  width: 100%; height: 100%;
  stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.menu-tile-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.menu-tile-count {
  position: absolute;
  top: 14px;
  right: 16px;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 100px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── DANE (sekcje tekstowe — dane pracownika) ─────────────────── */
.data-section { margin-bottom: 16px; }

.data-section-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}

.data-section-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

.data-section-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── WNIOSKI: karta na liście ─────────────────────────────────── */
.wniosek-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.1s;
}
.wniosek-card:hover {
  border-color: var(--green);
  box-shadow: 0 1px 3px rgba(63, 143, 58, 0.08);
}

.wniosek-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.wniosek-card-typ {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  flex: 1;
}

.wniosek-card-dates {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
}

.wniosek-card-dni {
  font-size: 12px;
  color: var(--muted);
}

/* ── STATUS BADGE (Power Apps pill style) ─────────────────────── */
.status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.status-Dodany        { background: var(--status-dodany-bg);        color: var(--status-dodany-text); }
.status-Wysłany       { background: var(--status-wyslany-bg);       color: var(--status-wyslany-text); }
.status-Zatwierdzony  { background: var(--status-zatwierdzony-bg);  color: var(--status-zatwierdzony-text); }
.status-Odrzucony     { background: var(--status-odrzucony-bg);     color: var(--status-odrzucony-text); }
.status-Anulowany     { background: var(--status-anulowany-bg);     color: var(--status-anulowany-text); }

/* ── FORM (Modern Controls) ───────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-input);
  outline: none;
  transition: border-color 0.1s;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: var(--muted); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--green);
  border-width: 2px;
  padding: 0 11px;
}

.form-textarea {
  resize: vertical;
  min-height: 76px;
  height: auto;
  padding: 10px 12px;
  font-family: inherit;
  line-height: 1.4;
}
.form-textarea:focus { padding: 9px 11px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-helper {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ── BUTTONS (Modern Controls) ────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-danger {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-input);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.1s;
  font-family: inherit;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-primary:disabled {
  background: var(--line); border-color: var(--line); color: var(--muted-2);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--green-bg); border-color: var(--green); color: var(--green-dark); }

.btn-danger {
  background: var(--bg);
  color: var(--status-odrzucony-text);
  border-color: var(--status-odrzucony-bg);
}
.btn-danger:hover { background: var(--status-odrzucony-bg); }

/* ── TOAST ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 360px;
  width: calc(100% - 32px);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-input);
  font-size: 13px;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  text-align: center;
}
.toast.is-visible {
  display: block;
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
  from { transform: translate(-50%, 8px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
