:root {
    --bg: #f4eef7;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-soft: rgba(255, 255, 255, 0.7);
    --text: #2d1f3f;
    --muted: #6a5a7c;
    --primary: #c77dff;
    --primary-dark: #8c43d9;
    --accent: #f2c5ff;
    --accent-dark: #f9f0ff;
    --shadow: 0 18px 50px rgba(114, 70, 180, 0.12);
    --radius: 28px;
    font-size: 16px;
}

[data-theme="dark"] {
    --bg: #110b16;
    --surface: rgba(22, 16, 33, 0.9);
    --surface-soft: rgba(22, 16, 33, 0.75);
    --text: #f5e9ff;
    --muted: #c3b7d6;
    --primary: #ff8bed;
    --primary-dark: #cf43ca;
    --accent: #2d1c47;
    --accent-dark: #1f132b;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding-bottom: 6rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(199, 125, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 140, 193, 0.18), transparent 25%),
        var(--bg);
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

p {
    margin: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.site-banner img {
    width: 100%;
    height: auto;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 18px;
    background-image: url('image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow);
}

.brand-logo span {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
}

.brand-logo small {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--muted);
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--text);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.mobile-nav {
    position: fixed;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex;
    gap: 0.35rem;
    padding: 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(199, 125, 255, 0.2);
    box-shadow: 0 18px 40px rgba(17, 11, 22, 0.16);
    z-index: 120;
    backdrop-filter: blur(14px);
}

.back-btn {
    position: fixed;
    left: 1rem;
    bottom: calc(4.8rem + env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(17, 11, 22, 0.12);
    z-index: 121;
}

.mobile-nav-link {
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.install-btn {
    position: fixed;
    right: 1rem;
    bottom: calc(4.8rem + env(safe-area-inset-bottom));
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(114, 70, 180, 0.2);
    z-index: 121;
}

.install-btn.visible {
    display: inline-flex;
}

.icon-btn,
.menu-toggle,
.btn {
    border: none;
    cursor: pointer;
}

.icon-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, background 0.3s ease;
}

.icon-btn:hover {
    transform: translateY(-2px);
    background: var(--surface);
}

.menu-toggle {
    display: none;
    width: 3rem;
    height: 3rem;
    flex-direction: column;
    justify-content: space-around;
    padding: 0.5rem;
    background: var(--surface-soft);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 0.2rem;
    border-radius: 999px;
    background: var(--text);
}

.hero-section {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    padding: 4rem 0 2rem;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 45%),
        url('https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&w=1300&q=80');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 121, 195, 0.25), transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2rem;
}

.hero-copy {
    max-width: 640px;
}

.hero-copy .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-copy h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--text);
}

.hero-copy h1 span {
    color: var(--primary);
}

.hero-text {
    margin: 1.5rem 0;
    max-width: 42rem;
    line-height: 1.8;
    color: var(--muted);
}

.hero-typing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    color: var(--text);
}

.hero-typing span {
    font-weight: 700;
    color: var(--primary-dark);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 1.6rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(114, 70, 180, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.9), rgba(255, 108, 235, 0.9));
    color: #fff;
    box-shadow: 0 8px 24px rgba(199, 125, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(199, 125, 255, 1), rgba(255, 108, 235, 1));
    box-shadow: 0 12px 40px rgba(199, 125, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1.5px solid rgba(199, 125, 255, 0.25);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(114, 70, 180, 0.05);
}

.btn-secondary:hover {
    background: rgba(199, 125, 255, 0.12);
    border-color: rgba(199, 125, 255, 0.4);
    box-shadow: 0 8px 24px rgba(114, 70, 180, 0.1);
    color: var(--primary);
}

.hero-stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(114, 70, 180, 0.1),
        0 2px 8px rgba(114, 70, 180, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(199, 125, 255, 0.1), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.stat-card:hover {
    border-color: rgba(199, 125, 255, 0.4);
    box-shadow: 0 12px 48px rgba(114, 70, 180, 0.15),
        0 4px 12px rgba(114, 70, 180, 0.08);
    transform: translateY(-4px);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 0;
    font-weight: 800;
    letter-spacing: -1px;
}

.stat-card p {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.grid-two {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
}

.about-image {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    margin: 1rem 0;
}

.about-content p {
    color: var(--muted);
    line-height: 1.85;
}

.about-highlights {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.about-highlights div {
    background: var(--surface-soft);
    border-radius: 24px;
    padding: 1.3rem;
    box-shadow: var(--shadow);
}

.facility-grid,
.rooms-grid,
.gallery-grid,
.faq-grid,
.contact-grid {
    display: grid;
    gap: 1.5rem;
}

.facility-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-section {
    padding: 4rem 0;
}

.card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.home-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: 30px;
    background: var(--surface);
    border: 1px solid transparent;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.home-card:hover,
.home-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(199, 125, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.home-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.home-card p {
    color: var(--muted);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(199, 125, 255, 0.12);
    font-size: 1.5rem;
}

.section-copy {
    margin-top: 1rem;
    max-width: 700px;
    color: var(--muted);
    line-height: 1.8;
}

.facility-card,
.room-card,
.testimonial-card,
.contact-form-card,
.faq-item {
    background: var(--surface-soft);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 30px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.facility-card:hover,
.room-card:hover,
.testimonial-card:hover,
.contact-form-card:hover,
.faq-item:hover {
    transform: translateY(-4px);
}

.facility-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.room-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.room-card.featured {
    border-color: rgba(199, 125, 255, 0.55);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--accent-dark));
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.badge.available {
    background: #7b6cff;
}

.badge.limited {
    background: #ff7b99;
}

.badge.new {
    background: #ff6cda;
}

.room-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.room-card h3 span {
    display: block;
    font-size: 1rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.room-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    gap: 0.9rem;
}

.room-card li {
    color: var(--muted);
    padding-left: 1.2rem;
    position: relative;
}

.room-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: start;
}

.gallery-poster {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 420px);
    max-height: calc(100vh - 10rem);
    height: auto;
    border-radius: 32px;
    overflow: hidden;
}

.gallery-poster img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.gallery-item {
    border: none;
    padding: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface-soft);
    transition: transform 0.35s ease;
}

.gallery-item:hover {
    transform: translateY(-6px) scale(1.01);
}

.gallery-video,
.gallery-item {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface-soft);
}

.gallery-video {
    display: grid;
    place-items: center;
    min-height: 260px;
    grid-column: span 1;
}

.gallery-video video {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-slider {
    position: relative;
    min-height: 320px;
}

.testimonial-card {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.testimonial-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.testimonial-meta img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6);
}

.stars {
    color: #f5c147;
    letter-spacing: 0.08em;
}

.form-wrapper {
    background: var(--surface-soft);
    border-radius: 34px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.application-form {
    position: relative;
}

.application-form.loading::before,
.application-form.loading::after {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    border-radius: 34px;
}

.application-form.loading::before {
    content: '';
    background: rgba(17, 11, 22, 0.55);
}

.application-form.loading::after {
    content: 'Submitting your request...';
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.application-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.application-form legend {
    font-size: 1.35rem;
    margin-bottom: 1.3rem;
    display: block;
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.field-group {
    display: grid;
    gap: 0.55rem;
}

.field-group label {
    font-size: 0.95rem;
    color: var(--text);
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(45, 31, 63, 0.12);
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(199, 125, 255, 0.12);
}

.field-group textarea {
    resize: vertical;
}

.upload-group {
    display: grid;
    gap: 1rem;
}

.checkbox-group {
    display: grid;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

.checkbox-group label {
    font-size: 0.95rem;
}

.error-message {
    color: #d44b77;
    font-size: 0.85rem;
    min-height: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.faq-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.faq-item {
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 0;
}

.faq-item.open .faq-answer {
    max-height: 12rem;
    padding-top: 0.75rem;
}

.faq-answer p {
    color: var(--muted);
    line-height: 1.8;
}

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--accent-dark);
    color: #fff;
}

.contact-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 2rem;
}

.contact-details {
    display: grid;
    gap: 1rem;
}

.contact-details h2 {
    margin-top: 0.5rem;
}

.info-block h3 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.contact-socials {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contact-socials a,
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.contact-form-card {
    padding: 2rem;
}

.contact-form .field-group {
    margin-bottom: 1rem;
}

.map-frame {
    margin-top: 2rem;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-frame iframe {
    width: 100%;
    min-height: 300px;
    border: 0;
}

.site-footer {
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-grid h3,
.footer-grid h4 {
    margin-bottom: 1rem;
}

.footer-grid p,
.footer-grid a,
.footer-bottom p {
    color: var(--muted);
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.footer-grid ul a {
    color: var(--muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-top {
    background: var(--surface-soft);
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 60;
}

.whatsapp-float a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 1rem 1.3rem;
    background: linear-gradient(135deg, #25d366, #16a34a);
    color: #fff;
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.22);
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17, 11, 22, 0.72);
    z-index: 200;
    padding: 2rem;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 96vw;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    min-width: 280px;
    max-width: min(420px, calc(100% - 2rem));
    background: rgba(17, 11, 22, 0.92);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 300;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(17, 11, 22, 0.7);
    z-index: 400;
}

.modal.open {
    display: flex;
}

.modal-card {
    width: min(520px, calc(100% - 2rem));
    background: var(--surface-soft);
    border-radius: 32px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.modal-card h2 {
    margin-bottom: 1rem;
}

.admin-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.08), rgba(199, 125, 255, 0.02));
    border-radius: 16px;
    border: 1px solid rgba(199, 125, 255, 0.12);
    box-shadow: 0 4px 16px rgba(114, 70, 180, 0.04);

}

.admin-table-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(114, 70, 180, 0.08),
        0 2px 8px rgba(114, 70, 180, 0.04);
    margin-bottom: 2rem;
    border: 1px solid rgba(199, 125, 255, 0.15);
    transition: all 0.3s ease;
}

.admin-table-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(199, 125, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.admin-table-scroll-top {
    height: 16px;
    margin-bottom: 0.35rem;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(199, 125, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.admin-table-scroll-top .admin-table-scroll-spacer {
    height: 1px;
    min-width: 900px;
}

.admin-table-scroll-top::-webkit-scrollbar {
    height: 10px;
}

.admin-table-scroll-top::-webkit-scrollbar-thumb {
    background: rgba(199, 125, 255, 0.3);
    border-radius: 999px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.admin-vertical-table {
    min-width: 100%;
}

.admin-vertical-table thead tr {
    border-bottom: 2px solid rgba(199, 125, 255, 0.25);
}

.admin-vertical-table th {
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.15), rgba(199, 125, 255, 0.08));
    font-weight: 700;
    text-align: center;
    padding: 1.2rem 0.8rem;
    font-size: 0.95rem;
    color: var(--text);
    border-right: 1px solid rgba(199, 125, 255, 0.15);
    position: relative;
}

.admin-vertical-table th:last-child {
    border-right: none;
}

.admin-vertical-table th:first-child {
    min-width: 200px;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.2), rgba(199, 125, 255, 0.12));
    font-size: 0.9rem;
    text-align: left;
    border-right: 2px solid rgba(199, 125, 255, 0.25);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.admin-vertical-table tbody tr {
    border-bottom: 1px solid rgba(199, 125, 255, 0.1);
    transition: all 0.2s ease;
}

.admin-vertical-table tbody tr:hover {
    background: rgba(199, 125, 255, 0.06);
}

.admin-vertical-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.admin-vertical-table tbody tr:nth-child(even):hover {
    background: rgba(199, 125, 255, 0.08);
}

.admin-vertical-table td {
    padding: 1.1rem 0.8rem;
    text-align: center;
    border-right: 1px solid rgba(199, 125, 255, 0.1);
    vertical-align: middle;
    font-size: 0.95rem;
}

.admin-vertical-table td:last-child {
    border-right: none;
}

.admin-vertical-table td:first-child {
    text-align: left;
    border-right: 2px solid rgba(199, 125, 255, 0.15);
    min-width: 200px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.01);
    color: var(--primary);
}

.admin-photo-preview {
    width: 350px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(199, 125, 255, 0.2);
    box-shadow: 0 4px 12px rgba(114, 70, 180, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.admin-photo-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(114, 70, 180, 0.25);
    border-color: rgba(199, 125, 255, 0.4);
}

.admin-photo-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.admin-photo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.95rem;
    border: 1px dashed rgba(199, 125, 255, 0.25);
}

.admin-photo-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(199, 125, 255, 0.12);
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(199, 125, 255, 0.2);
    transition: all 0.2s ease;
}

.admin-photo-upload:hover {
    background: rgba(199, 125, 255, 0.2);
    transform: translateY(-1px);
}

.admin-photo-upload input {
    display: none;
}

.admin-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.admin-document-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.admin-table-note {
    margin: -0.35rem 0 1rem;
    color: var(--muted);
}

.receipt-search-field {
    margin: 0 0 1rem;
}

.receipt-month-group th {
    padding: 0.7rem 0.9rem;
    text-align: left;
    background: rgba(199, 125, 255, 0.14);
    color: var(--primary);
    font-size: 1rem;
}

.admin-passport-preview {
    width: 250px;
    height: 250px;
    object-fit: cover;
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.admin-status-badge.active {
    background: rgba(40, 167, 69, 0.14);
    color: #1f7a3f;
    border-color: rgba(40, 167, 69, 0.25);
}

.admin-status-badge.checked-out {
    background: rgba(220, 53, 69, 0.14);
    color: #b42318;
    border-color: rgba(220, 53, 69, 0.25);
}

.admin-status-badge.leaving-soon,
.admin-status-badge.pending {
    background: rgba(255, 193, 7, 0.16);
    color: #a86b00;
    border-color: rgba(255, 193, 7, 0.28);
}

.rent-payment-select,
.rent-amount-input,
.security-deposit-received-select,
.security-deposit-amount-input {
    width: 100%;
    min-width: 110px;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(199, 125, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.95rem;
    min-height: 44px;
}

.rent-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.22);
}

.rent-whatsapp-btn:hover,
.rent-whatsapp-btn:focus {
    background: linear-gradient(135deg, #1ebf59, #0f7a63);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 211, 102, 0.28);
}

.rent-whatsapp-btn::before {
    content: '💬';
    font-size: 1rem;
}

.rent-overdue-row,
.rent-overdue-row:hover {
    background: rgba(220, 53, 69, 0.12) !important;
    color: #b42318;
}

.rent-overdue-row td {
    border-color: rgba(220, 53, 69, 0.22);
}


.rent-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.receipt-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.receipt-period-card {
    display: grid;
    gap: 0.45rem;
}

.receipt-period-card label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.receipt-period-card input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(199, 125, 255, 0.25);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.receipt-period-card strong {
    color: var(--primary);
    font-size: 1.15rem;
}

.expense-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.expense-header h3 {
    margin-bottom: 0.5rem;
}

.expense-form {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(199, 125, 255, 0.16);
    border-radius: 16px;
    background: rgba(199, 125, 255, 0.05);
}

.expense-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.expense-form-grid .field-group {
    margin: 0;
}

.expense-form-grid input,
.expense-form-grid select,
.expense-filters input,
.expense-filters select {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(199, 125, 255, 0.22);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
}

.expense-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.expense-summary-grid {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.expense-comparison-card {
    display: grid;
    gap: 0.55rem;
}

.expense-comparison-card>p {
    color: var(--muted);
    font-size: 0.95rem;
}

.expense-comparison-values {
    display: grid;
    gap: 0.3rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.expense-comparison-values strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
}

.expense-balance-positive,
.expense-balance-negative {
    font-size: 0.95rem;
}

.expense-balance-positive {
    color: #1f7a3f;
}

.expense-balance-negative {
    color: #b42318;
}

.expense-filters {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(160px, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.expense-note-cell {
    min-width: 180px;
    max-width: 300px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.expense-table-scroll {
    max-height: min(56vh, 620px);
    overflow-y: auto;
}

.expense-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.expense-actions {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.expense-action-button {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(199, 125, 255, 0.24);
    border-radius: 8px;
    background: rgba(199, 125, 255, 0.1);
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.expense-action-button.danger {
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.2);
    background: rgba(180, 35, 24, 0.08);
}

@media (max-width: 700px) {
    .receipt-summary-grid {
        grid-template-columns: 1fr;
    }

    .expense-header,
    .expense-form-actions {
        flex-direction: column;
    }

    .expense-form-grid,
    .expense-filters,
    .expense-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .rent-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.rent-summary-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8));
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 20px;
    padding: 1.2rem 1.25rem;
    box-shadow: 0 14px 40px rgba(114, 70, 180, 0.08);
}

.rent-summary-card h4 {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
    color: var(--primary);
}

.rent-summary-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 1.1rem 1rem;
    text-align: left;
    vertical-align: top;
    line-height: 1.6;
    border-bottom: 1px solid rgba(199, 125, 255, 0.1);
}

.admin-table th {
    color: var(--text);
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.15), rgba(199, 125, 255, 0.08));
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.admin-table tbody tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: rgba(199, 125, 255, 0.06);
}

.admin-table td:first-child,
.admin-table th:first-child {
    min-width: 200px;
}

.applicant-column,
.contact-column {
    display: grid;
    gap: 0.3rem;
}

.contact-message-cell {
    min-width: 280px;
    max-width: 520px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-search-field {
    min-width: 220px;
}

.admin-search-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.95rem;
}

.admin-search-input::placeholder {
    color: rgba(19, 18, 18, 0.6);
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(199, 125, 255, 0.16);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.applicant-column strong,
.contact-column strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.applicant-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.admin-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.admin-details summary::-webkit-details-marker {
    display: none;
}

.admin-details summary:after {
    content: ' ▾';
}

.details-grid {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

@media (max-width: 880px) {
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        gap: 1rem;
    }

    .admin-stats {
        width: 100%;
        gap: 0.75rem;
    }

    .admin-stats .stat-card {
        flex: 1 1 0;
        min-width: 0;
    }

    .admin-tab-list,
    .admin-tabs {
        width: 100%;
    }

    .admin-tab-button {
        flex: 1 1 0;
        text-align: center;
    }

    .admin-search-field {
        min-width: 0;
        width: 100%;
    }

    .admin-search-input {
        min-height: 44px;
    }

    .admin-table-container {
        padding: 1.25rem;
    }

    .admin-table {
        min-width: 100%;
    }

    .admin-photo-preview {
        width: min(220px, 100%);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .admin-passport-preview {
        width: min(180px, 100%);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .details-grid {
        display: block;
    }

    .rent-header {
        align-items: flex-start;
    }

    .rent-filters {
        grid-template-columns: 1fr;
    }
}

.admin-table {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-collapse: collapse;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.admin-table th,
.admin-table td {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.08);
}

.admin-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}

.applicant-column,
.contact-column {
    display: grid;
    gap: 0.35rem;
}

.passport-preview {
    width: 110px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: 0.75rem;
}

.passport-fallback {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.applicant-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.modal-card p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.admin-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.admin-tab-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(199, 125, 255, 0.1);
}

.admin-tab-button {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(199, 125, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.admin-tab-button:hover {
    background: rgba(199, 125, 255, 0.08);
    border-color: rgba(199, 125, 255, 0.3);
    color: var(--primary);
}

.admin-tab-button.active {
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.25), rgba(199, 125, 255, 0.15));
    color: var(--primary);
    border-color: rgba(199, 125, 255, 0.4);
    box-shadow: 0 4px 16px rgba(199, 125, 255, 0.15);
}

.admin-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    min-width: min-content;
}

.admin-panel.hidden {
    display: none;
}

.admin-login-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(17, 11, 22, 0.82);
    z-index: 500;
    padding: 1.5rem;
}

.admin-login-overlay.hidden {
    display: none;
}

.admin-login-hidden header,
.admin-login-hidden main,
.admin-login-hidden footer,
.admin-login-hidden .whatsapp-float,
.admin-login-hidden #lightbox,
.admin-login-hidden .toast,
.admin-login-hidden .modal,
.admin-login-hidden .page-loader {
    display: none !important;
}

.admin-login-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(17, 11, 22, 0.95);
    z-index: 999;
    padding: 1.5rem;
}

.admin-login-card {
    width: min(480px, 100%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 80px rgba(17, 11, 22, 0.18),
        0 12px 30px rgba(114, 70, 180, 0.12);
    text-align: center;
    border: 1px solid rgba(199, 125, 255, 0.24);
    backdrop-filter: blur(14px);
}

.admin-login-card h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.admin-login-card p {
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.admin-login-card label {
    width: 100%;
    display: block;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: 0.3px;
}

.admin-login-card input {
    width: 100%;
    display: block;
    margin-bottom: 1.75rem;
    padding: 1.1rem 1.3rem;
    border-radius: 12px;
    border: 1px solid rgba(199, 125, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.admin-login-card input:focus {
    outline: none;
    border-color: rgba(199, 125, 255, 0.5);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(199, 125, 255, 0.1);
}

.admin-login-card input::placeholder {
    color: rgba(var(--muted), 0.6);
}

.login-actions {
    display: flex;
    justify-content: center;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 999;
    display: grid;
    place-items: center;
    gap: 1rem;
    text-align: center;
    color: var(--text);
}

.loader-ring {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 5px solid rgba(199, 125, 255, 0.25);
    border-top-color: var(--primary);
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay {
    transition-delay: 0.12s;
}

.delay-1 {
    transition-delay: 0.18s;
}

.delay-2 {
    transition-delay: 0.28s;
}

@media (max-width: 1024px) {

    .grid-two,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 880px) {
    .testimonial-slider {
        min-height: 360px;
    }

    .mobile-nav {
        display: flex;
    }

    .install-btn {
        display: inline-flex;
    }

    .testimonial-card {
        padding: 1.6rem;
    }

    .testimonial-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .testimonial-meta img {
        width: 3.5rem;
        height: 3.5rem;
    }

    .header-inner {
        gap: 0.5rem;
    }

    .nav-menu {
        position: fixed;
        inset: 6rem 1rem auto auto;
        flex-direction: column;
        align-items: flex-start;
        background: rgba(255, 255, 255, 0.94);
        padding: 1.5rem;
        width: min(320px, calc(100% - 2rem));
        border-radius: 28px;
        box-shadow: var(--shadow);
        transform: translateX(110%);
        transition: transform 0.35s ease;
        backdrop-filter: blur(18px);
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-menu a {
        width: 100%;
        padding: 0.8rem 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding-top: 5rem;
    }

    .mobile-nav {
        width: calc(100% - 1.2rem);
        justify-content: space-between;
    }

    .mobile-nav-link {
        flex: 1;
        text-align: center;
        padding: 0.7rem 0.4rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.2rem, 8vw, 3rem);
    }

    .hero-cta {
        flex-direction: column;
    }

    .field-row,
    .form-actions {
        grid-template-columns: 1fr;
    }

    .facility-grid,
    .rooms-grid,
    .gallery-grid,
    .faq-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .admin-controls {
        padding: 1rem;
    }

    .admin-table-container {
        padding: 1rem;
    }

    .admin-table-container h3 {
        font-size: 1.25rem;
    }

    .admin-stats {
        flex-direction: column;
    }

    .admin-stats .stat-card {
        width: 100%;
    }

    .admin-tab-button {
        padding: 0.7rem 0.9rem;
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.8rem 0.7rem;
        font-size: 0.9rem;
    }

    .admin-vertical-table td:first-child,
    .admin-vertical-table th:first-child {
        min-width: 140px;
    }

    .admin-search-input {
        padding: 0.8rem 0.95rem;
        font-size: 0.95rem;
    }

    .page-loader {
        padding: 1rem;
    }

    .section.page-section {
        padding-top: 3rem;
    }

    .section-heading h2 {
        font-size: 1.75rem;
    }

    .section-heading p {
        line-height: 1.5;
    }

    .admin-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        width: calc(100vw - 2rem);
        margin-inline: -0.25rem;
        padding: 0.4rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .admin-tab-button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .expense-header {
        align-items: stretch;
    }

    .expense-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .expense-header-actions .btn {
        min-height: 44px;
        padding-inline: 0.65rem;
        font-size: 0.84rem;
    }

    .expense-form {
        padding: 0.9rem;
    }

    .expense-form-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .expense-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .expense-form-actions .btn {
        width: 100%;
        padding-inline: 0.65rem;
        font-size: 0.88rem;
    }

    .expense-filters {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .expense-table-scroll {
        max-height: 52vh;
    }

    .expense-table {
        min-width: 760px;
    }

    .expense-comparison-card {
        flex-basis: 220px;
    }
}

/* Shared finishing touches for a calmer, consistent feel across every page. */
:root {
    --bg: #fbf7fc;
    --surface: #ffffff;
    --surface-soft: #fffaff;
    --text: #30243a;
    --muted: #766a80;
    --primary: #b565d9;
    --primary-dark: #8b45b3;
    --accent: #f4dafa;
    --accent-dark: #fff4fc;
    --shadow: 0 14px 38px rgba(91, 55, 112, 0.09);
}

[data-theme="dark"] {
    --bg: #17121c;
    --surface: #241c2b;
    --surface-soft: #211927;
    --text: #f7effa;
    --muted: #c6b8ce;
    --primary: #df9af0;
    --primary-dark: #c674df;
    --accent: #382743;
    --accent-dark: #2a2032;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

body {
    line-height: 1.6;
    background:
        radial-gradient(circle at 8% 4%, rgba(224, 177, 239, 0.2), transparent 25rem),
        radial-gradient(circle at 94% 42%, rgba(255, 212, 224, 0.2), transparent 28rem),
        var(--bg);
}

.site-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom-color: rgba(181, 101, 217, 0.12);
}

.header-inner {
    min-height: 5rem;
}

.nav-menu {
    gap: 0.35rem;
    align-items: center;
}

.nav-menu a {
    padding: 0.55rem 0.68rem;
    border-radius: 999px;
    font-size: 0.9rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a.active {
    color: var(--primary-dark);
    background: rgba(181, 101, 217, 0.1);
}

.nav-menu a:focus-visible,
.btn:focus-visible,
.icon-btn:focus-visible,
.menu-toggle:focus-visible,
.mobile-nav-link:focus-visible {
    outline: 3px solid rgba(181, 101, 217, 0.45);
    outline-offset: 3px;
}

.section {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section-heading {
    margin-bottom: 2.25rem;
}

.section-label {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(181, 101, 217, 0.1);
    letter-spacing: 0.12em;
}

.home-card,
.facility-card,
.room-card,
.testimonial-card,
.contact-form-card,
.faq-item,
.form-wrapper,
.admin-table-container,
.rent-summary-card,
.expense-comparison-card {
    border: 1px solid rgba(181, 101, 217, 0.12);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.home-card:hover,
.home-card:focus-visible,
.facility-card:hover,
.room-card:hover,
.testimonial-card:hover,
.contact-form-card:hover,
.faq-item:hover {
    background: var(--surface);
    border-color: rgba(181, 101, 217, 0.35);
}

.room-card.featured {
    background: linear-gradient(160deg, var(--surface), var(--accent-dark));
}

.field-group input,
.field-group select,
.field-group textarea,
.expense-form-grid input,
.expense-form-grid select,
.admin-login-card input {
    color: var(--text);
    background: var(--surface);
    border-color: rgba(118, 106, 128, 0.24);
}

.mobile-nav {
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-color: rgba(181, 101, 217, 0.2);
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.site-footer {
    margin-top: 2rem;
    padding-top: 3.5rem;
    border-top: 1px solid rgba(181, 101, 217, 0.12);
}

[data-theme="dark"] .nav-menu,
[data-theme="dark"] .mobile-nav,
[data-theme="dark"] .facility-icon,
[data-theme="dark"] .home-card:hover,
[data-theme="dark"] .home-card:focus-visible,
[data-theme="dark"] .room-card.featured,
[data-theme="dark"] .rent-summary-card {
    background: var(--surface);
}

@media (max-width: 880px) {
    .nav-menu {
        background: var(--surface);
        border: 1px solid rgba(181, 101, 217, 0.14);
        gap: 0.15rem;
    }

    .nav-menu a {
        border-radius: 14px;
        padding: 0.72rem 0.85rem;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 1.25rem, 1200px);
    }

    .home-card,
    .facility-card,
    .room-card,
    .testimonial-card,
    .contact-form-card,
    .faq-item,
    .form-wrapper {
        padding: 1.35rem;
        border-radius: 20px;
    }

    .mobile-nav-link {
        font-size: 0.82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (min-width: 881px) {

    .mobile-nav,
    .install-btn {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Mobile-friendly horizontal admin summary cards */
@media (max-width: 640px) {
    .rent-summary-grid {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        padding: 0.15rem 0.1rem 0.85rem;
        margin-inline: -0.15rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .rent-summary-grid::-webkit-scrollbar {
        height: 6px;
    }

    .rent-summary-grid::-webkit-scrollbar-thumb {
        background: rgba(199, 125, 255, 0.35);
        border-radius: 999px;
    }

    .rent-summary-card {
        flex: 0 0 158px;
        min-height: 94px;
        padding: 1rem;
        border-radius: 16px;
        scroll-snap-align: start;
    }

    .rent-summary-card h4 {
        font-size: 1.35rem;
        line-height: 1.1;
        margin-bottom: 0.35rem;
        word-break: break-word;
    }

    .rent-summary-card p {
        font-size: 0.86rem;
        line-height: 1.25;
    }

    .admin-controls {
        gap: 1rem;
    }

    .admin-stats {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.75rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    .admin-stats .stat-card {
        flex: 0 0 150px;
        width: auto;
        padding: 1rem;
        text-align: left;
    }

    .admin-stats .stat-card h3 {
        font-size: 1.45rem;
    }

    .admin-stats .stat-card p {
        margin-top: 0.35rem;
        font-size: 0.85rem;
    }
}

/* Keep footer content on the same centered grid as the page body. */
.site-footer {
    margin-top: 0;
    padding-top: 2rem;
}

.footer-bottom {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

@media (min-width: 881px) {
    .back-btn {
        display: none;
    }
}

/* Admin dashboard: compact controls and readable data tables. */
.admin-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 1.25rem;
    align-items: center;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid rgba(181, 101, 217, 0.14);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.admin-controls .admin-tabs {
    grid-column: 1 / -1;
    padding: 0.3rem;
    background: var(--bg);
    border: 0;
    border-radius: 14px;
}

.admin-tab-button {
    border: 0;
    border-radius: 11px;
    padding: 0.7rem 1rem;
}

.admin-tab-button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 7px 18px rgba(139, 69, 179, 0.2);
}

.admin-stats {
    gap: 0.75rem;
    min-width: 0;
}

.admin-stats .stat-card {
    min-width: 130px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(181, 101, 217, 0.12);
    border-radius: 16px;
    background: var(--surface-soft);
    box-shadow: none;
}

.admin-stats .stat-card h3 {
    font-size: 1.45rem;
}

.admin-stats .stat-card p {
    margin-top: 0.2rem;
    font-size: 0.8rem;
}

.admin-control-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.admin-control-actions .btn {
    padding: 0.75rem 1rem;
}

.admin-table-container {
    padding: clamp(1rem, 2.5vw, 1.75rem);
    border: 1px solid rgba(181, 101, 217, 0.14);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.admin-table-heading,
.rent-header,
.expense-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.admin-table-heading h3,
.admin-table-container h3,
.rent-header h3,
.expense-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.25rem;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.admin-table-heading p,
.rent-header p {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-table-heading .admin-search-field {
    width: min(320px, 100%);
}

.admin-search-input,
.expense-filters input,
.expense-filters select,
.receipt-period-card input,
.admin-table input[type="date"],
.admin-table input[type="number"],
.admin-table select {
    min-height: 42px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid rgba(118, 106, 128, 0.22);
    border-radius: 11px;
}

.admin-search-input {
    padding: 0.65rem 0.9rem;
}

.admin-search-input::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.admin-search-input:focus,
.admin-table input:focus,
.admin-table select:focus,
.expense-filters input:focus,
.expense-filters select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(181, 101, 217, 0.15);
}

.admin-table-scroll {
    max-width: 100%;
    overflow: auto;
    border: 1px solid rgba(118, 106, 128, 0.14);
    border-radius: 15px;
    background: var(--surface);
    scrollbar-color: rgba(181, 101, 217, 0.45) var(--surface-soft);
}

.admin-table {
    width: 100%;
    min-width: 880px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.85rem 0.9rem;
    text-align: left;
    vertical-align: middle;
    line-height: 1.45;
    border-bottom: 1px solid rgba(118, 106, 128, 0.12);
}

.admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--muted);
    background: var(--accent-dark);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table tbody tr {
    background: var(--surface);
    transition: background 0.16s ease;
}

.admin-table tbody tr:nth-child(even) {
    background: var(--surface-soft);
}

.admin-table tbody tr:hover {
    background: rgba(181, 101, 217, 0.08);
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table td:first-child,
.admin-table th:first-child {
    min-width: 0;
}

.admin-table .admin-table-empty {
    padding: 2.25rem 1rem;
    color: var(--muted);
    text-align: center;
}

.applications-table {
    min-width: 1140px;
    table-layout: fixed;
}

.applications-table th:nth-child(1) { width: 14%; }
.applications-table th:nth-child(2) { width: 16%; }
.applications-table th:nth-child(3) { width: 12%; }
.applications-table th:nth-child(4) { width: 9%; }
.applications-table th:nth-child(5) { width: 10%; }
.applications-table th:nth-child(6),
.applications-table th:nth-child(7),
.applications-table th:nth-child(8) { width: 10%; }
.applications-table th:nth-child(9) { width: 9%; }
.applications-table td { overflow-wrap: anywhere; }

.applicant-name,
.applicant-contact {
    display: grid;
    gap: 0.25rem;
}

.applicant-name strong {
    font-size: 0.95rem;
}

.applicant-name span,
.applicant-contact a {
    color: var(--muted);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.applicant-contact a:hover {
    color: var(--primary-dark);
}

.applications-table .admin-photo-cell {
    align-items: flex-start;
    gap: 0.45rem;
}

.applications-table .admin-photo-preview {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid rgba(181, 101, 217, 0.2);
    border-radius: 12px;
    box-shadow: none;
}

.applications-table .admin-photo-fallback {
    min-height: 0;
    padding: 0.45rem;
    font-size: 0.72rem;
    border-radius: 9px;
}

.applications-table .admin-photo-upload {
    padding: 0.38rem 0.55rem;
    font-size: 0.72rem;
    white-space: nowrap;
}

.applications-table .admin-details summary {
    margin: 0;
    white-space: nowrap;
}

.applicant-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 0.55rem;
    min-width: 420px;
    padding: 0.9rem;
    border: 1px solid rgba(181, 101, 217, 0.12);
    border-radius: 12px;
    background: var(--surface);
}

.applicant-detail {
    display: grid;
    gap: 0.15rem;
    overflow-wrap: anywhere;
}

.applicant-detail span {
    color: var(--muted);
    font-size: 0.72rem;
}

.applicant-detail strong {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-details[open] summary {
    margin-bottom: 0.7rem;
}

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
}

.admin-table-note {
    color: var(--muted);
}

.rent-summary-card {
    background: var(--surface-soft);
    border-color: rgba(181, 101, 217, 0.12);
    box-shadow: none;
}

.rent-summary-card h4 {
    color: var(--primary-dark);
}

.receipt-month-group th {
    position: static;
    color: var(--primary-dark);
    background: var(--accent-dark);
}

@media (max-width: 880px) {
    .admin-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-controls .admin-tabs {
        grid-column: 1;
    }

    .admin-control-actions {
        justify-content: stretch;
    }

    .admin-control-actions .btn {
        flex: 1;
    }

    .admin-table-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-table-heading .admin-search-field {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .admin-controls,
    .admin-table-container {
        padding: 1rem;
        border-radius: 18px;
    }

    .admin-controls .admin-tabs {
        width: 100%;
        margin: 0;
    }

    .admin-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stats .stat-card {
        min-width: 0;
        padding: 0.7rem;
    }

    .admin-control-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-control-actions .btn {
        padding: 0.7rem;
        font-size: 0.82rem;
    }

    .applications-table {
        min-width: 980px;
    }

    .applicant-details-grid {
        grid-template-columns: 1fr;
        min-width: 260px;
    }
}

[data-theme="dark"] .admin-table thead th {
    background: var(--accent-dark);
}

[data-theme="dark"] .admin-table tbody tr,
[data-theme="dark"] .admin-table tbody tr:nth-child(even) {
    background: var(--surface);
}

[data-theme="dark"] .admin-table tbody tr:hover {
    background: rgba(223, 154, 240, 0.1);
}

.admin-login-card {
    color: var(--text);
    background: var(--surface);
    border-color: rgba(181, 101, 217, 0.18);
}

.admin-login-card p {
    color: var(--muted);
}

.kitchen-panel {
    display: grid;
    gap: 1.65rem;
}

.kitchen-panel.hidden {
    display: none;
}

.kitchen-panel .hidden {
    display: none;
}

.kitchen-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.kitchen-heading p,
.kitchen-section-heading p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.kitchen-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.8rem;
}

.kitchen-summary-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(181, 101, 217, 0.13);
    border-radius: 17px;
    background: var(--surface-soft);
}

.kitchen-summary-icon {
    display: grid;
    flex: 0 0 2.45rem;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border-radius: 13px;
    color: var(--primary-dark);
    background: rgba(181, 101, 217, 0.12);
    font-size: 1.25rem;
    font-weight: 800;
}

.kitchen-summary-card > div {
    display: grid;
    min-width: 0;
}

.kitchen-summary-card strong {
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.kitchen-summary-card > div > span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.kitchen-summary-card small {
    display: block;
    font-size: 0.68rem;
}

.kitchen-summary-warning .kitchen-summary-icon {
    color: #96650a;
    background: rgba(239, 184, 67, 0.18);
}

.kitchen-summary-danger .kitchen-summary-icon {
    color: #b33956;
    background: rgba(214, 75, 110, 0.14);
}

.kitchen-attention,
.kitchen-schedule-section,
.kitchen-inventory-section,
.kitchen-history-section {
    display: grid;
    gap: 1rem;
}

.kitchen-attention {
    padding: 1.15rem;
    border: 1px solid rgba(214, 75, 110, 0.18);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface-soft) 88%, rgba(214, 75, 110, 0.12));
}

.kitchen-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.kitchen-section-heading h4 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
}

.kitchen-attention-count {
    flex: 0 0 auto;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    color: var(--primary-dark);
    background: rgba(181, 101, 217, 0.12);
    font-size: 0.75rem;
    font-weight: 750;
}

.kitchen-attention-list {
    display: grid;
    gap: 0.55rem;
}

.kitchen-attention-item {
    display: grid;
    grid-template-columns: auto minmax(100px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1fr);
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(118, 106, 128, 0.12);
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
}

.kitchen-attention-item strong {
    color: var(--text);
}

.kitchen-empty {
    margin: 0;
    padding: 0.7rem 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.kitchen-schedule-section {
    padding: 1.15rem;
    border: 1px solid rgba(181, 101, 217, 0.13);
    border-radius: 18px;
    background: var(--surface-soft);
}

.kitchen-schedule-runs {
    display: grid;
    gap: 0.55rem;
}

.kitchen-schedule-run {
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(118, 106, 128, 0.13);
    border-radius: 12px;
    background: var(--surface);
}

.kitchen-schedule-run summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    cursor: pointer;
}

.kitchen-schedule-run summary strong {
    color: var(--text);
}

.kitchen-schedule-warning {
    color: #b33956;
    font-weight: 750;
}

.kitchen-schedule-run ul {
    display: grid;
    gap: 0.35rem;
    margin: 0.7rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.kitchen-schedule-success {
    margin: 0.7rem 0 0;
    color: #24784c;
    font-size: 0.82rem;
}

.kitchen-item-form {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(181, 101, 217, 0.12);
    border-radius: 16px;
    background: var(--surface-soft);
}

.kitchen-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.85rem;
}

.kitchen-form-grid .field-group,
.kitchen-modal-fields .field-group {
    display: grid;
    gap: 0.35rem;
}

.kitchen-form-grid label,
.kitchen-modal-fields label {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 650;
}

.kitchen-form-grid input,
.kitchen-form-grid select,
.kitchen-modal-fields input,
.kitchen-modal-fields textarea,
.kitchen-filters select,
.kitchen-history-filters input,
.kitchen-history-filters select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(118, 106, 128, 0.22);
    border-radius: 11px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
    font-size: 0.88rem;
}

.kitchen-modal-fields textarea {
    resize: vertical;
}

.kitchen-form-grid input:focus,
.kitchen-modal-fields input:focus,
.kitchen-modal-fields textarea:focus,
.kitchen-filters select:focus,
.kitchen-history-filters input:focus,
.kitchen-history-filters select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(181, 101, 217, 0.15);
}

.kitchen-form-actions,
.kitchen-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.kitchen-filters,
.kitchen-history-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(145px, 1fr);
    gap: 0.65rem;
}

.kitchen-history-filters {
    grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(140px, 1fr));
}

.kitchen-table {
    min-width: 1030px;
}

.kitchen-history-table {
    min-width: 1050px;
}

.kitchen-row-actions {
    display: flex;
    min-width: 250px;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.kitchen-action-button {
    min-height: 32px;
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(181, 101, 217, 0.24);
    border-radius: 8px;
    color: var(--primary-dark);
    background: var(--surface);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.kitchen-action-button:hover {
    background: rgba(181, 101, 217, 0.1);
}

.kitchen-action-button.danger {
    color: #b33956;
    border-color: rgba(214, 75, 110, 0.25);
}

.kitchen-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.kitchen-status-badge.available {
    color: #24784c;
    background: rgba(67, 174, 112, 0.14);
}

.kitchen-status-badge.low {
    color: #96650a;
    background: rgba(239, 184, 67, 0.18);
}

.kitchen-status-badge.out {
    color: #b33956;
    background: rgba(214, 75, 110, 0.14);
}

.kitchen-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    place-items: center;
    padding: 1rem;
    background: rgba(28, 19, 34, 0.58);
    backdrop-filter: blur(7px);
}

.kitchen-modal.open {
    display: grid;
}

.kitchen-modal-card {
    position: relative;
    width: min(100%, 560px);
    max-height: min(90vh, 760px);
    overflow: auto;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid rgba(181, 101, 217, 0.18);
    border-radius: 22px;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.kitchen-modal-card h2 {
    margin: 0 2rem 0 0;
    color: var(--text);
    font-size: 1.45rem;
}

.kitchen-modal-card > p {
    margin: 0.35rem 0 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.kitchen-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 1.45rem;
    cursor: pointer;
}

.kitchen-modal-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.kitchen-movement-reason {
    grid-column: 1 / -1;
}

.kitchen-modal-actions .btn:disabled,
.kitchen-form-actions .btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 720px) {
    .kitchen-filters,
    .kitchen-history-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kitchen-filters input,
    .kitchen-history-filters input:first-of-type {
        grid-column: 1 / -1;
    }

    .kitchen-attention-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .kitchen-attention-item > span:nth-last-child(-n + 2) {
        grid-column: 2;
    }
}

@media (max-width: 480px) {
    .kitchen-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .kitchen-summary-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
        padding: 0.75rem;
    }

    .kitchen-summary-icon {
        width: 2rem;
        height: 2rem;
        flex-basis: 2rem;
    }

    .kitchen-summary-card strong {
        font-size: 1.2rem;
    }

    .kitchen-form-grid,
    .kitchen-modal-fields,
    .kitchen-filters,
    .kitchen-history-filters {
        grid-template-columns: 1fr;
    }

    .kitchen-movement-reason,
    .kitchen-filters input,
    .kitchen-history-filters input:first-of-type {
        grid-column: auto;
    }

    .kitchen-form-actions,
    .kitchen-modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .kitchen-form-actions .btn,
    .kitchen-modal-actions .btn {
        width: 100%;
        padding-inline: 0.6rem;
        font-size: 0.86rem;
    }
}
