*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.relative {
  position: relative;
}
.mt-4 {
  margin-top: 1rem;
}
.block {
  display: block;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.w-full {
  width: 100%;
}
.border-collapse {
  border-collapse: collapse;
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}
.border {
  border-width: 1px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-gray-200 {
  --tw-border-opacity: 1;
  border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
}
.border-gray-300 {
  --tw-border-opacity: 1;
  border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.font-semibold {
  font-weight: 600;
}
.italic {
  font-style: italic;
}
.text-gray-500 {
  --tw-text-opacity: 1;
  color: rgb(107 114 128 / var(--tw-text-opacity, 1));
}
.underline {
  text-decoration-line: underline;
}
.line-through {
  text-decoration-line: line-through;
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

:root {
  --color-primary: #AE0407;
  --color-secondary: #04092F;
  --color-success: #7CB342;
  --color-surface: #FFFFFF;
  --color-surface-muted: #F5F5F5;
  --color-text: #111827;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(174, 4, 7, 0.15), transparent 28%),
    radial-gradient(circle at bottom right, rgba(4, 9, 47, 0.12), transparent 32%),
    #F4F7FB;
  color: var(--color-text);
  overflow-x: hidden;
}

/* Respect device safe areas (notches / status bars) on mobile */
.page-login {
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 45%);
  mix-blend-mode: soft-light;
}

/* Focus styles for accessibility */
button:focus,
.input-field:focus,
.small-card:focus {
  outline: 3px solid #2b7cff;
  outline-offset: 2px;
}

.button[aria-busy="true"] {
  opacity: 0.8;
  cursor: progress;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.download-app {
  margin: 18px 0;
}

.download-app .button {
  width: 100%;
  max-width: 320px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
  background: transparent;
}

.app-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.5), transparent 65%);
  pointer-events: none;
}

.sidebar {
  background: rgba(4, 9, 47, 0.96);
  color: var(--color-surface);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #FFFFFF;
  text-align: left;
  padding: 0;
}

.sidebar-brand-text span {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #FFFFFF;
}

.sidebar-brand-text:hover span,
.sidebar-brand-text:hover .sidebar-tagline {
  color: #FFFFFF;
}

.sidebar-tagline {
  font-size: 0.92rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.sidebar-close-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  align-self: flex-end;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sidebar-close-button span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  position: relative;
}

.sidebar-close-button span:nth-child(1) {
  transform: translateY(-5px);
}

.sidebar-close-button span:nth-child(3) {
  transform: translateY(5px);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  -o-object-fit: cover;
     object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}

.sidebar-brand span {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.sidebar-link {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  text-align: left;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link-active {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  transform: translateX(2px);
}

.sidebar-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(174, 4, 7, 0.16);
  color: #FFFFFF;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sidebar-logout-button:hover {
  background: rgba(174, 4, 7, 0.28);
  transform: translateX(1px);
}

.app-shell-admin {
  background: transparent;
}

.app-shell-admin .sidebar {
  background: rgba(4, 9, 47, 0.98);
}

.app-shell-client {
  background: transparent;
}

.app-shell-client .sidebar {
  background: rgba(255, 255, 255, 0.95);
  color: #04092F;
  border-right: 1px solid rgba(4, 9, 47, 0.08);
  box-shadow: 10px 0 40px rgba(4, 9, 47, 0.08);
}

.app-shell-client .sidebar-link {
  color: rgba(4, 9, 47, 0.82);
  border: 1px solid rgba(4, 9, 47, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.app-shell-client .sidebar-link:hover,
.app-shell-client .sidebar-link-active {
  background: rgba(4, 9, 47, 0.06);
  border-color: rgba(4, 9, 47, 0.12);
  color: #04092F;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-header {
  background: rgba(250, 250, 255, 0.96);
  padding: 24px 32px;
  border-bottom: 1px solid rgba(14, 25, 52, 0.08);
  box-shadow: inset 0 -1px 0 rgba(14, 25, 52, 0.05), 0 10px 28px rgba(4, 9, 47, 0.05);
  backdrop-filter: blur(14px);
}

.app-shell-admin .app-header {
  background: linear-gradient(180deg, rgba(4, 9, 47, 0.96), rgba(4, 9, 47, 0.9));
}

.app-shell-client .app-header {
  background: rgba(255, 255, 255, 0.94);
}

.layout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.layout-header-title {
  min-width: 0;
}

.layout-header h2 {
  margin: 0;
  color: var(--color-secondary);
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.05;
}

.layout-header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

.environment-pill {
  display: inline-flex;
  align-items: center;
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.layout-header-no-logo .layout-header-title h2,
.layout-header-no-logo .layout-header-title p,
.layout-header-no-logo .environment-pill,
.layout-header-no-logo .environment-pill-admin,
.layout-header-no-logo .environment-pill-client {
  color: #FFFFFF;
}

.layout-header-no-logo .environment-pill {
  background: rgba(255, 255, 255, 0.16);
}

.layout-header-no-logo .logout-button {
  background: linear-gradient(135deg, #E63131, #AE0407);
}

.layout-header h2 {
  margin: 0;
  color: var(--color-secondary);
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.05;
}

.layout-header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

.environment-pill {
  display: inline-flex;
  align-items: center;
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.environment-pill-admin {
  background: rgba(255, 255, 255, 0.12);
  color: #FFDDDE;
}

.environment-pill-client {
  background: rgba(4, 9, 47, 0.08);
  color: #1F2937;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #AE0407, #E63131);
  color: var(--color-surface);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(174, 4, 7, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 45px rgba(174, 4, 7, 0.18);
}

.app-content {
  animation: fadeInUp 0.55s ease both;
}

.small-card {
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeInUp 0.55s ease both;
}

.small-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 36px 70px rgba(15, 23, 42, 0.12);
}

.small-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.hero-card {
  background: linear-gradient(135deg, rgba(174, 4, 7, 0.12), rgba(255, 255, 255, 0.76));
  border-radius: 30px;
  border: 1px solid rgba(174, 4, 7, 0.12);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.08);
  padding: 32px;
  animation: fadeInUp 0.55s ease both;
}

.hero-card h1 {
  margin-top: 0;
  letter-spacing: -0.04em;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-button,
.sidebar-close-button,
.sidebar-backdrop {
  display: none;
}

.app-content {
  flex: 1;
  padding: 32px;
}

.page-container {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.hero-card {
  position: relative;
  padding: 4px 0 8px;
}

.app-shell-admin .hero-card {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #04092F 0%, #10184A 100%);
  border: 1px solid rgba(174, 4, 7, 0.18);
  box-shadow: 0 18px 36px rgba(4, 9, 47, 0.12);
}

.app-shell-admin .hero-card::before {
  content: "ADMIN";
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #AE0407;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.app-shell-admin .hero-card h1,
.app-shell-admin .hero-card p {
  color: #FFFFFF;
}

.app-shell-admin .hero-card p {
  opacity: 0.84;
}

.app-shell-client .hero-card {
  padding: 24px 26px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid rgba(4, 9, 47, 0.08);
  box-shadow: 0 24px 48px rgba(4, 9, 47, 0.12);
}

.app-shell-client .hero-card::before {
  content: "CLIENTE";
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #04092F;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

  .hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
  }

  .small-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 18px rgba(15, 23, 42, 0.06);
    min-width: 0;
  }

  .app-shell-admin .small-card {
    border-color: rgba(4, 9, 47, 0.08);
    border-left: 4px solid #AE0407;
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(4, 9, 47, 0.08);
  }

  .app-shell-client .small-card {
    border-color: rgba(4, 9, 47, 0.08);
    border-top: 4px solid rgba(4, 9, 47, 0.9);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(4, 9, 47, 0.06);
  }

  .small-card h3 {
    margin: 0 0 12px;
    color: var(--color-secondary);
  }

  .small-card p {
    margin: 0;
    color: var(--color-text-muted);
  }

  .small-card p + .badge {
    margin-top: 16px;
  }

  .button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    text-decoration: none;
  }

  .button-secondary:hover {
    background: rgba(11, 31, 63, 0.06);
  }
.hero-card h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 2.5vw, 3rem);
  color: var(--color-secondary);
  line-height: 1.05;
}

.hero-card p {
  margin: 0;
  max-width: 680px;
  line-height: 1.75;
  color: #334155;
  font-size: 1.02rem;
  gap: 8px;
  margin-bottom: 18px;
}

.input-group label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface-muted);
}

.profile-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  max-width: 560px;
}

.form-success {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(124, 179, 66, 0.12);
  color: #4F7D22;
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
  background: linear-gradient(135deg, #AE0407, #D61C24);
  color: var(--color-surface);
}

.button-secondary {
  background: rgba(4, 9, 47, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button-danger {
  background: #B71C1C;
  color: var(--color-surface);
}

.button:hover {
  box-shadow: 0 8px 18px rgba(4, 9, 47, 0.14);
  transform: translateY(-1px);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-primary:hover,
.button-danger:hover {
  background: #8F0306;
}

.button-secondary:hover {
  background: rgba(4, 9, 47, 0.06);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-default {
  background: #E5E7EB;
  color: #374151;
}

.badge-success {
  background: rgba(124, 179, 66, 0.12);
  color: var(--color-success);
}

.badge-danger {
  background: rgba(211, 47, 47, 0.12);
  color: var(--color-primary);
}

.badge-info {
  background: rgba(11, 31, 63, 0.12);
  color: var(--color-secondary);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #B45309;
}

.page-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #0B1F3F 0%, #122A57 100%);
  padding: 32px;
}

.login-card {
  width: min(760px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  padding: 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  animation: fadeInUp 0.55s ease both;
}

.login-branding {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 100%;
  max-width: 860px;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.login-branding-text {
  margin: 0 auto 18px;
  text-align: center;
  max-width: 520px;
  padding: 0 8px;
}

.login-card h2 {
  margin: 0;
  color: var(--color-secondary);
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  letter-spacing: -0.03em;
}

.login-branding-text h2 {
  margin: 0 0 8px 0;
  text-align: center;
}

.login-branding-text p {
  margin: 0 auto;
  max-width: 520px;
  color: var(--color-text-muted);
  line-height: 1.5;
  text-align: center;
}

.login-card p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  max-width: 380px;
  line-height: 1.6;
}

.login-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.login-card input {
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(14, 25, 42, 0.12);
  border-radius: 16px;
  background: #F8F9FB;
  font-size: 0.98rem;
}

.login-card input:focus {
  outline: none;
  border-color: rgba(174, 4, 7, 0.28);
  box-shadow: 0 0 0 4px rgba(174, 4, 7, 0.08);
}

.form-error {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(174, 4, 7, 0.12);
  color: #AE0407;
  font-size: 0.95rem;
}

.login-card button {
  width: 100%;
  padding: 16px 18px;
  background: linear-gradient(135deg, #AE0407, #E63131);
  color: var(--color-surface);
  font-weight: 700;
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(174, 4, 7, 0.18);
}

.login-card button:hover {
  background: linear-gradient(135deg, #C20B12, #F14646);
}

/* Overrides to ensure proper centering and readable widths on large screens */
.login-card {
  width: min(640px, 92%);
  padding: 28px 36px;
  border-radius: 24px;
  animation: fadeInUp 0.45s ease both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.login-card form {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* Center the subtitle paragraph inside the card and limit line length */
.login-card p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  max-width: 520px;
  line-height: 1.6;
  text-align: center;
}

.login-branding-text p {
  max-width: 520px;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  margin: 0;
  color: var(--color-secondary);
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: var(--color-surface-muted);
  border-radius: 8px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

/* Form fields in modals */
.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.funcionarios-grid {
  grid-template-columns: minmax(0, 1fr);
}

.funcionarios-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #FFFFFF;
}

.funcionarios-table {
  width: 100%;
  min-width: 680px;
  color: var(--color-text);
}

.funcionarios-table th,
.funcionarios-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.funcionarios-table th {
  background: rgba(4, 9, 47, 0.04);
  color: #04092F;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.app-shell-admin .funcionarios-table th {
  background: rgba(4, 9, 47, 0.07);
}

.funcionarios-table th:nth-child(1),
.funcionarios-table td:nth-child(1) {
  width: 26%;
}

.funcionarios-table th:nth-child(2),
.funcionarios-table td:nth-child(2) {
  width: 36%;
}

.funcionarios-table th:nth-child(3),
.funcionarios-table td:nth-child(3) {
  width: 18%;
}

.funcionarios-table th:nth-child(4),
.funcionarios-table td:nth-child(4) {
  width: 20%;
}

.funcionario-cell {
  overflow-wrap: anywhere;
}

.funcionario-table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.funcionario-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.funcionario-table-action-edit {
  background: rgba(4, 9, 47, 0.06);
  border: 1px solid rgba(4, 9, 47, 0.28);
  color: #04092F;
}

.funcionario-table-action-delete {
  background: #AE0407;
  border: 1px solid #AE0407;
  color: #FFFFFF;
}

.funcionario-table-action:hover {
  box-shadow: 0 8px 18px rgba(4, 9, 47, 0.12);
  transform: translateY(-1px);
}

.funcionario-table-action-edit:hover {
  background: #04092F;
  border-color: #04092F;
  color: #FFFFFF;
}

.funcionario-table-action-delete:hover {
  background: #8F0306;
  border-color: #8F0306;
}

.funcionarios-add-action {
  margin-top: 24px;
}

.funcionarios-mobile-list,
.funcionarios-mobile-empty {
  display: none;
}

.data-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #FFFFFF;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: rgba(4, 9, 47, 0.06);
  color: #04092F;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(4, 9, 47, 0.06);
  color: #04092F;
  font-size: 0.88rem;
  font-weight: 800;
}

.link-button-danger {
  background: #AE0407;
  color: #FFFFFF;
}

.link-button:hover {
  box-shadow: 0 8px 18px rgba(4, 9, 47, 0.12);
  transform: translateY(-1px);
}

.status-chip,
.visibility-chip,
.type-chip {
  display: inline-flex;
  align-items: center;
  width: -moz-fit-content;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-chip-active {
  background: rgba(124, 179, 66, 0.14);
  color: #4F7D22;
}

.status-chip-muted {
  background: rgba(174, 4, 7, 0.1);
  color: #AE0407;
}

.visibility-chip {
  background: rgba(4, 9, 47, 0.08);
  color: #04092F;
}

.type-chip {
  background: rgba(174, 4, 7, 0.08);
  color: #AE0407;
}

.fallback-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px dashed rgba(4, 9, 47, 0.24);
  border-radius: 12px;
  color: var(--color-text-muted);
  background: rgba(4, 9, 47, 0.03);
  font-size: 0.9rem;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  margin-top: 24px;
}

.calendar-panel,
.side-panel,
.notice-panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #FFFFFF;
  padding: 20px;
  box-shadow: 0 14px 28px rgba(4, 9, 47, 0.06);
}

.calendar-header-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-header-row h3,
.side-panel h3,
.notice-panel h3 {
  margin: 0;
  color: #04092F;
}

.calendar-header-row span {
  color: var(--color-text-muted);
  font-weight: 700;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #FFFFFF;
  color: #04092F;
  text-align: left;
}

.calendar-day span {
  font-weight: 900;
}

.calendar-day small {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.calendar-day-empty {
  border: 0;
  background: transparent;
}

.calendar-day-available {
  border-color: rgba(124, 179, 66, 0.44);
  background: rgba(124, 179, 66, 0.12);
}

.calendar-day-selected {
  border-color: #AE0407;
  box-shadow: 0 0 0 3px rgba(174, 4, 7, 0.12);
}

.slot-list,
.notice-list,
.report-list,
.client-card-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.schedule-slot-list,
.mobile-slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.slot-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(4, 9, 47, 0.08);
  color: #04092F;
  font-weight: 800;
}

.slot-chip-selected {
  background: #AE0407;
  color: #FFFFFF;
}

.appointment-start-button {
  margin-top: 18px;
}

.mobile-schedule-content {
  display: grid;
  gap: 16px;
}

.mobile-schedule-professional {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 700;
}

.mobile-schedule-modal .modal-footer {
  padding-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(4, 9, 47, 0.04);
}

.detail-item span {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-item strong {
  color: #04092F;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

@media (max-width: 900px) {
  .install-app-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-bottom-nav {
    display: flex;
  }
}

@media (max-width: 767px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    padding: 24px 18px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 18px 0 36px rgba(4, 9, 47, 0.24);
    overflow-y: auto;
  }

  .sidebar-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(4, 9, 47, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
  }

  .sidebar-backdrop-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .mobile-menu-button,
  .sidebar-close-button {
    display: inline-grid;
    place-items: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #04092F;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .mobile-menu-button:hover,
  .sidebar-close-button:hover {
    background: #AE0407;
    box-shadow: 0 8px 18px rgba(4, 9, 47, 0.16);
    transform: translateY(-1px);
  }

  .mobile-menu-button span,
  .sidebar-close-button span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #FFFFFF;
  }

  .sidebar-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #AE0407;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .sidebar-logout-button:hover {
    background: #8F0306;
    box-shadow: 0 8px 18px rgba(174, 4, 7, 0.18);
    transform: translateY(-1px);
  }

  .app-header,
  .app-content {
    padding: 20px 16px;
  }

  .layout-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .layout-header-title {
    padding-left: 0;
  }

  .layout-header .logout-button {
    display: none;
  }

  .mobile-menu-button {
    position: static;
    z-index: 1;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calendar-panel,
  .side-panel,
  .notice-panel {
    padding: 16px;
  }

  .client-schedule-panel {
    display: none;
  }

  .mobile-schedule-modal {
    width: min(92vw, 420px);
  }

  .mobile-slot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 0;
  }

  .mobile-slot-list .slot-chip {
    min-height: 46px;
    width: 100%;
  }

  .calendar-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 58px;
    padding: 8px;
  }

  .calendar-day small {
    display: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 720px;
  }

  .hero-card h1 {
    font-size: 2rem;
  }

  .small-card {
    border-radius: 14px;
    padding: 18px;
  }

  .funcionarios-table-wrap {
    display: none;
  }

  .funcionarios-mobile-list {
    display: grid;
    gap: 16px;
  }

  .funcionarios-mobile-empty {
    display: block;
    margin: 0;
    color: var(--color-text-muted);
    text-align: center;
  }

  .funcionario-mobile-card {
    display: grid;
    gap: 16px;
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(4, 9, 47, 0.14);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 10px 24px rgba(4, 9, 47, 0.08);
  }

  .funcionario-mobile-header {
    display: grid;
    gap: 8px;
  }

  .funcionario-mobile-header h4 {
    margin: 0;
    color: #04092F;
    font-size: 1.1rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .funcionario-mobile-header span {
    justify-self: start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(4, 9, 47, 0.08);
    color: #04092F;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .funcionario-mobile-details {
    display: grid;
    gap: 12px;
    margin: 0;
  }

  .funcionario-mobile-details div {
    display: grid;
    gap: 4px;
  }

  .funcionario-mobile-details dt {
    color: #04092F;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .funcionario-mobile-details dd {
    margin: 0;
    color: var(--color-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .funcionario-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .funcionario-mobile-button {
    min-height: 48px;
    border-radius: 10px;
    font-weight: 800;
  }

  .funcionario-mobile-button-edit {
    background: #04092F;
    color: #FFFFFF;
  }

  .funcionario-mobile-button-delete {
    background: #AE0407;
    color: #FFFFFF;
  }

  .mt-4 .button {
    width: 100%;
  }
}

.app-loading-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(174, 4, 7, 0.08), rgba(4, 9, 47, 0.06));
}

.loading-card {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(4, 9, 47, 0.12);
  text-align: center;
}

.loading-card__pulse {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #AE0407, #04092F);
  animation: pulse 1.2s infinite ease-in-out;
}

.loading-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.login-shell {
  display: grid;
  /* Use equal columns on wide viewports so preview doesn't overpower the login card */
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  width: min(1100px, 100%);
  align-items: stretch;
}

.login-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  /* Match card spacing and proportions */
  padding: 28px 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(174, 4, 7, 0.96), rgba(4, 9, 47, 0.95));
  color: #FFFFFF;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  overflow-wrap: anywhere;

  /* Use same max width as login-card; allow grid to control horizontal alignment */
  width: min(640px, 92%);
}

.login-preview__pill {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-preview h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.login-preview p,
.login-preview li {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
  font-size: 0.96rem;
}

.login-preview ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 0;
}

.pwa-install-banner {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 24px 0;
  padding: 14px 18px;
  border: 1px solid rgba(174, 4, 7, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(4, 9, 47, 0.12);
  backdrop-filter: blur(18px);
}

.pwa-install-banner p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}

.skeleton-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(4, 9, 47, 0.06);
  box-shadow: 0 14px 30px rgba(4, 9, 47, 0.07);
}

.skeleton-card__line {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(4, 9, 47, 0.08), rgba(4, 9, 47, 0.16), rgba(4, 9, 47, 0.08));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

.skeleton-card__line--title {
  height: 18px;
  width: 60%;
}

.skeleton-card__line--short {
  width: 45%;
}

.hero-card__eyebrow {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(174, 4, 7, 0.12);
  color: #AE0407;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  /* On narrow screens, align items to the start (do not center the card) */
  .page-login {
    place-items: start;
  }

  .login-preview {
    padding: 22px;
    width: 100%;
    max-width: 640px;
  }

  .login-card {
    width: 100%;
    max-width: 640px;
  }
}

@media (max-width: 640px) {
  .page-login {
    padding: 12px;
  }

  .login-card {
    padding: 20px 16px;
  }

  .login-preview {
    padding: 18px;
    gap: 10px;
  }

  .login-preview h1 {
    font-size: 1.28rem;
  }

  .login-preview p,
  .login-preview li {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .pwa-install-banner {
    flex-direction: column;
    align-items: flex-start;
    margin: 12px 12px 0;
  }
}

@media (max-width: 480px) {
  .pwa-install-banner {
    position: fixed;
    left: 8px;
    right: 8px;
    top: calc(8px + env(safe-area-inset-top));
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
  }
}

/* Modal de Download */
.modal-overlay {
  position: fixed;
  inset: 0;
  /* Use viewport-safe units so mobile browsers center relative to the visible area */
  height: 100svh; /* fallback modern browsers */
  min-height: 100dvh;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  z-index: 10000;
  padding: 12px;
}

.modal-content {
  background: var(--color-surface, #fff);
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
  animation: slideUp 0.28s ease-out;
  outline: none;
  max-height: 90svh;
  overflow-y: auto;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.modal-content p {
  margin: 12px 0;
  color: #555;
}

.modal-content a {
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-content a:hover {
  background: var(--color-primary-dark);
}

/* Modal contrast, button hover states and agenda actions */
.modal-content label {
  color: #04092F;
  font-weight: 800;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  border: 1.5px solid rgba(4, 9, 47, 0.34);
  border-radius: 10px;
  background: #FFFFFF;
  color: #04092F;
  box-shadow: inset 0 1px 0 rgba(4, 9, 47, 0.03);
}

.modal-content input::-moz-placeholder, .modal-content textarea::-moz-placeholder {
  color: #64748B;
  opacity: 1;
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
  color: #64748B;
  opacity: 1;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: #04092F;
  box-shadow: 0 0 0 3px rgba(4, 9, 47, 0.14);
}

.modal-content .button-secondary,
.modal-footer .button-secondary,
.modal-content .link-button {
  border: 1px solid rgba(4, 9, 47, 0.24);
  background: #F8FAFC;
  color: #04092F;
}

.modal-content .button-secondary:hover,
.modal-footer .button-secondary:hover,
.modal-content .link-button:hover {
  border-color: #04092F;
  background: rgba(4, 9, 47, 0.09);
  color: #04092F;
}

.modal-content .button-primary:hover {
  background: #8F0306;
  color: #FFFFFF;
}

.modal-content .button-danger,
.modal-content .link-button-danger {
  border-color: #AE0407;
  background: #AE0407;
  color: #FFFFFF;
}

.modal-content .button-danger:hover,
.modal-content .link-button-danger:hover {
  border-color: #8F0306;
  background: #8F0306;
  color: #FFFFFF;
}

.button-positive {
  border: 1px solid rgba(4, 9, 47, 0.18);
  background: #04092F;
  color: #FFFFFF;
}

.button-positive:hover {
  background: #09145F;
  color: #FFFFFF;
}

.availability-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.availability-action-row .button {
  min-width: 190px;
}

.calendar-day {
  border-color: rgba(4, 9, 47, 0.24);
}

.calendar-day:hover {
  border-color: rgba(4, 9, 47, 0.44);
}

.calendar-day-empty {
  border-color: transparent;
}

.calendar-day-available {
  border-color: rgba(69, 125, 42, 0.58);
}

.calendar-day-selected {
  border-color: #AE0407;
}

@media (max-width: 520px) {
  .availability-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .availability-action-row .button {
    width: 100%;
    min-width: 0;
  }
}

/* Final responsive modal and mobile navigation hardening */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
  background: rgba(2, 6, 23, 0.64);
  backdrop-filter: blur(4px);
  z-index: 10000;
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-content {
  width: min(640px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.28);
  overflow: hidden;
}

.modal-content.download-modal {
  display: block;
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  overflow-y: auto;
}

.modal-content.admin-agenda-modal {
  width: min(860px, calc(100vw - 32px));
}

.modal-header,
.modal-footer {
  flex: 0 0 auto;
}

.modal-header {
  padding: 16px 20px;
}

.modal-header h2 {
  color: #04092F;
  line-height: 1.2;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  gap: 10px;
}

.modal-footer .button,
.modal-footer .link-button {
  min-width: 128px;
  min-height: 44px;
  border-radius: 10px;
}

.modal-content .form-grid {
  gap: 12px;
}

.modal-content .form-group {
  margin-bottom: 12px;
}

.modal-content .form-grid input,
.modal-content .form-grid select,
.modal-content .form-grid textarea,
.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
  padding: 10px 12px;
}

.mobile-bottom-nav {
  position: sticky;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 0.35rem;
  padding: 0.55rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(4, 9, 47, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  z-index: 90;
  box-shadow: 0 -12px 30px rgba(4, 9, 47, 0.08);
}

.mobile-bottom-nav__item {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.42rem 0.24rem;
  border-radius: 14px;
  color: #475569;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.1;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item--active {
  background: rgba(174, 4, 7, 0.1);
  color: #AE0407;
}

.mobile-bottom-nav__icon {
  font-size: 1.05rem;
  line-height: 1;
}

@media (min-width: 680px) {
  .modal-content:not(.download-modal) .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .modal-content:not(.download-modal) .form-grid > p,
  .modal-content:not(.download-modal) .form-grid > .form-error,
  .modal-content:not(.download-modal) .form-grid > .form-success,
  .modal-content:not(.download-modal) .form-grid > .detail-grid {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    display: flex;
  }

  .app-content {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .modal-overlay {
    place-items: end center;
    padding: 10px;
  }

  .modal-content,
  .modal-content.admin-agenda-modal,
  .modal-content.download-modal {
    width: min(100%, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 14px 16px;
  }

  .modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px;
  }

  .modal-footer .button,
  .modal-footer .link-button {
    width: 100%;
    min-width: 0;
  }

  .mobile-bottom-nav__item {
    font-size: 0.72rem;
  }
}

.hover\:bg-gray-50:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
}

.install-app-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(174, 4, 7, 0.96), rgba(4, 9, 47, 0.95));
  color: #fff;
  box-shadow: 0 24px 55px rgba(4, 9, 47, 0.22);
}

.install-app-banner__content {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

.install-app-banner__pill {
  width: -moz-fit-content;
  width: fit-content;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install-app-banner strong {
  font-size: 1.03rem;
}

.install-app-banner p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.install-app-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.install-app-banner__guide {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
}

.install-app-banner__close {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1rem;
}

.install-app-banner--manual {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(4px);
}

.app-dialog-card {
  width: min(100%, 460px);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
  padding: 1.15rem;
}

.app-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.app-dialog-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.app-dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(174, 4, 7, 0.09);
  color: var(--color-primary);
  font-size: 1.15rem;
}

.app-dialog-message {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.mobile-bottom-nav {
  position: sticky;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 0.25rem;
  padding: 0.55rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(4, 9, 47, 0.08);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 80;
}

.mobile-bottom-nav__item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.2rem;
  border-radius: 999px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.mobile-bottom-nav__item--active {
  background: rgba(174, 4, 7, 0.1);
  color: var(--color-primary);
}

.mobile-bottom-nav__icon {
  font-size: 1rem;
}

@media (max-width: 900px) {
  .install-app-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-bottom-nav {
    display: flex;
  }
}
