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

body {
    font-family: 'Inter', sans-serif;
    background-color: #F8F9FA;
    color: #212529;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

.transition-all-custom {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(128, 0, 0, 0.1), 0 4px 6px -2px rgba(128, 0, 0, 0.05);
}

.fade-in-slide {
    animation: fadeInSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-touch {
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F1F1;
}
::-webkit-scrollbar-thumb {
    background: #C1C1C1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A8A8A8;
}

@media print {
    body > *:not(#expense-report-print-area) {
        display: none !important;
    }

    body * {
        visibility: hidden;
        background: none !important;
    }

    #expense-report-print-area, #expense-report-print-area * {
        visibility: visible;
    }

    #expense-report-print-area {
        display: block !important;
        position: static;
        width: 100%;
        font-family: 'Inter', sans-serif;
        font-size: 10pt;
        line-height: 1.4;
        color: #000000;
        background: #FFFFFF;
        padding: 0;
        box-sizing: border-box;
    }

    #expense-report-print-area img {
        display: inline-block !important;
        visibility: visible !important;
        max-width: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    @page {
        size: auto;
        margin: 0;
    }
}

#expense-report-print-area {
    display: none;
}

@media (max-width: 767px) {
    input[type="date"],
    input[type="time"],
    select {
        min-width: 0;
        max-width: 100%;
    }
    .grid > * {
        min-width: 0;
    }
    img, video, canvas {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .resp-table,
    .resp-table tbody,
    .resp-table tr,
    .resp-table td {
        display: block;
        width: 100%;
    }
    .resp-table thead {
        display: none;
    }
    .resp-table tr {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f1f3f5;
    }
    .resp-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.35rem 0 !important;
        text-align: right;
        word-break: break-word;
    }
    .resp-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #9ca3af;
        text-align: left;
    }
    .resp-table td[data-label=""]::before,
    .resp-table td:not([data-label])::before {
        content: none;
    }
}

table td.font-mono,
table td .font-mono {
    white-space: nowrap;
}

.fixed.inset-0.overflow-y-auto.items-center {
    align-items: flex-start !important;
}
.fixed.inset-0.overflow-y-auto.items-start > div:not(.fixed),
.fixed.inset-0.overflow-y-auto.items-center > div:not(.fixed) {
    margin-top: auto !important;
    margin-bottom: auto !important;
}
@media (max-width: 767px) {
    .fixed.inset-0.overflow-y-auto.justify-center {
        padding: 0.5rem !important;
    }
    .fixed.inset-0.overflow-y-auto > div:not(.fixed) {
        max-width: 100% !important;
    }
}

@media (max-width: 767px) {
    .resp-table td[data-label="Actions"] {
        justify-content: flex-end;
        gap: 0.75rem;
        margin-top: 0.4rem;
        border-top: 1px solid #f3f4f6;
        padding-top: 0.6rem !important;
    }
    .resp-table td[data-label="Actions"]::before {
        content: none;
    }
    .resp-table td[data-label="Actions"] button {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 767px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 767px) {
    input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        min-height: 3rem;
        text-align: left;
        background-color: #ffffff;
    }
    input[type="date"]::-webkit-date-and-time-value {
        text-align: left;
        margin: 0;
    }
    input[type="date"]::-webkit-calendar-picker-indicator {
        margin-left: auto;
    }
}

.focus-card {
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.focus-card.is-focused {
    border-color: #d1d5db;
    box-shadow: 0 10px 24px -6px rgba(17, 24, 39, 0.18);
}

#view-login {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 60% 50% at 15% 10%, rgba(128, 0, 0, 0.07), transparent 70%),
        radial-gradient(ellipse 55% 45% at 90% 90%, rgba(120, 150, 60, 0.10), transparent 70%),
        linear-gradient(180deg, #fbf8f8 0%, #f6f7f9 100%);
}
#view-login::before,
#view-login::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
}
#view-login::before {
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(170, 30, 60, 0.35), rgba(170, 30, 60, 0) 70%);
    animation: loginDriftA 22s ease-in-out infinite alternate;
}
#view-login::after {
    bottom: -140px;
    right: -100px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0) 70%);
    animation: loginDriftB 26s ease-in-out infinite alternate;
}
@keyframes loginDriftA { to { transform: translate(120px, 90px) scale(1.15); } }
@keyframes loginDriftB { to { transform: translate(-110px, -80px) scale(1.2); } }

#view-login > div:first-child {
    position: relative;
    animation: loginCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both, loginGlow 7s ease-in-out 1s infinite;
    backdrop-filter: blur(6px);
}
@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(22px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
@keyframes loginGlow {
    0%, 100% { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 0 0 0 rgba(128, 0, 0, 0); }
    50%      { box-shadow: 0 25px 40px -8px rgba(128, 0, 0, 0.16), 0 0 38px 2px rgba(128, 0, 0, 0.07); }
}

#view-login > div:first-child > img {
    animation: loginLogoIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both, loginFloat 6s ease-in-out 1.2s infinite;
    filter: drop-shadow(0 6px 10px rgba(170, 30, 60, 0.18));
}
@keyframes loginLogoIn {
    from { opacity: 0; transform: translateY(-14px) scale(0.85) rotate(-4deg); }
    to   { opacity: 1; transform: none; }
}
@keyframes loginFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

#view-login h1,
#view-login > div:first-child > p,
#view-login form > div,
#view-login form > button,
#view-login > div:first-child > div:last-child {
    animation: loginRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#view-login h1 { animation-delay: 0.30s; }
#view-login > div:first-child > p { animation-delay: 0.38s; }
#view-login form > div:nth-child(1) { animation-delay: 0.46s; }
#view-login form > div:nth-child(2) { animation-delay: 0.54s; }
#view-login form > div:nth-child(3) { animation-delay: 0.62s; }
#view-login form > button { animation-delay: 0.70s; }
#view-login > div:first-child > div:last-child { animation-delay: 0.80s; }
@keyframes loginRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

#view-login input {
    transition: box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
#view-login input:focus {
    box-shadow: 0 0 0 4px rgba(128, 0, 0, 0.10);
    background-color: #fffdfd;
}
#view-login .relative > span {
    transition: color 0.3s ease, transform 0.3s ease;
}
#view-login .relative:focus-within > span {
    color: #800000;
    transform: scale(1.12);
}

#view-login form > button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}
#view-login form > button[type="submit"]::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    animation: loginSweep 5s ease-in-out 1.6s infinite;
}
@keyframes loginSweep {
    0%, 60% { left: -60%; }
    100%    { left: 130%; }
}
#view-login form > button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -6px rgba(128, 0, 0, 0.45);
}
#view-login form > button[type="submit"]:active { transform: translateY(0); }
#view-login form > button[type="submit"] i { transition: transform 0.25s ease; }
#view-login form > button[type="submit"]:hover i { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
    #view-login::before, #view-login::after,
    #view-login *, #view-login > div:first-child {
        animation: none !important;
        transition: none !important;
    }
}

.login-lotus {
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: -2%;
    width: min(110vw, 760px);
    transform: translateX(-50%);
    opacity: 0.42;
    pointer-events: none;
    overflow: visible;
}
.login-lotus .lp {
    transform-box: view-box;
    transform-origin: 200px 262px;
    animation:
        lotusBloom 2.6s cubic-bezier(0.22, 1, 0.36, 1) var(--d) both,
        lotusBreathe 9s ease-in-out calc(var(--d) + 2.6s) infinite;
}
@keyframes lotusBloom {
    from { transform: rotate(0deg) scale(0.12); opacity: 0; }
    35%  { opacity: 1; }
    to   { transform: rotate(var(--a)) scale(var(--s)); opacity: 1; }
}
@keyframes lotusBreathe {
    0%, 100% { transform: rotate(var(--a)) scale(var(--s)); }
    50%      { transform: rotate(calc(var(--a) * 1.06)) scale(calc(var(--s) * 1.03)); }
}
.login-lotus .lp-glow {
    transform-box: view-box;
    transform-origin: 200px 200px;
    animation: lotusGlowIn 3s ease-out 0.8s both, lotusGlowPulse 7s ease-in-out 3.8s infinite;
}
@keyframes lotusGlowIn    { from { opacity: 0; transform: scale(0.3); } to { opacity: 0.9; transform: scale(1); } }
@keyframes lotusGlowPulse { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.login-lotus .lp-leaves {
    animation: lotusLeavesIn 2s ease-out 0.1s both;
}
@keyframes lotusLeavesIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 0.55; transform: none; } }

.login-petal {
    position: absolute;
    z-index: -1;
    bottom: -30px;
    width: 14px;
    height: 20px;
    border-radius: 100% 0 100% 0;
    background: linear-gradient(135deg, #f7b7c6, #c93463);
    opacity: 0;
    pointer-events: none;
    animation: petalRise 14s ease-in infinite;
}
.login-petal:nth-of-type(1) { left: 12%; animation-delay: 1.5s;  animation-duration: 15s; }
.login-petal:nth-of-type(2) { left: 28%; animation-delay: 5s;    animation-duration: 18s; width: 10px; height: 14px; }
.login-petal:nth-of-type(3) { left: 46%; animation-delay: 9s;    animation-duration: 16s; }
.login-petal:nth-of-type(4) { left: 63%; animation-delay: 3s;    animation-duration: 19s; width: 11px; height: 16px; }
.login-petal:nth-of-type(5) { left: 79%; animation-delay: 7s;    animation-duration: 15s; }
.login-petal:nth-of-type(6) { left: 92%; animation-delay: 11s;   animation-duration: 17s; width: 9px; height: 13px; }
@keyframes petalRise {
    0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.55; }
    50%  { transform: translate(26px, -45vh) rotate(160deg); }
    90%  { opacity: 0.25; }
    100% { transform: translate(-18px, -95vh) rotate(340deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .login-lotus .lp, .login-lotus .lp-glow, .login-lotus .lp-leaves { animation: none !important; transform: rotate(var(--a, 0deg)) scale(var(--s, 1)); }
    .login-petal { display: none; }
}

img.login-lotus {
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    width: min(112vw, 860px);
    max-width: none;
    height: auto;
    opacity: 0.42;
    pointer-events: none;
    user-select: none;
    transform: translate(-50%, -50%);
    animation: logoBloom 3.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both, logoBreathe 10s ease-in-out 3.6s infinite;
}
@keyframes logoBloom {
    0%   { opacity: 0;   transform: translate(-50%, -50%) scale(0.3) rotate(-14deg); filter: blur(16px) saturate(0.5); }
    60%  { opacity: 0.38; filter: blur(3px) saturate(0.9); }
    100% { opacity: 0.42; transform: translate(-50%, -50%) scale(1) rotate(0deg); filter: blur(0) saturate(1); }
}
@keyframes logoBreathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    50%      { transform: translate(-50%, -50%) scale(1.04) rotate(1deg); }
}
.login-lotus-glow {
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    width: min(100vw, 640px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 190, 210, 0.7), rgba(255, 214, 120, 0.25) 45%, rgba(255, 214, 120, 0) 70%);
    filter: blur(30px);
    pointer-events: none;
    animation: logoGlow 3.6s ease-out 0.6s both, logoGlowPulse 7s ease-in-out 4.2s infinite;
}
@keyframes logoGlow      { from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); } to { opacity: 0.85; transform: translate(-50%, -50%) scale(1); } }
@keyframes logoGlowPulse { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }

#view-login > div:first-child {
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
@media (prefers-reduced-motion: reduce) {
    img.login-lotus { animation: none !important; }
    .login-lotus-glow { animation: none !important; }
}
@media (max-width: 600px) {
    img.login-lotus { width: 175vw; }
    .login-lotus-glow { width: 140vw; }
}

@media (hover: none) and (pointer: coarse) {
    #view-login::before, #view-login::after,
    .login-petal,
    #view-login form > button[type="submit"]::after {
        animation: none !important;
    }
    .login-petal { display: none; }
    #view-login::before, #view-login::after { filter: none; }
    img.login-lotus { animation: logoBloom 3.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both !important; }
    .login-lotus-glow { animation: logoGlow 3.6s ease-out 0.6s both !important; }
    #view-login > div:first-child { animation: loginCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both !important; }
    #view-login > div:first-child > img { animation: loginLogoIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both !important; }
    #view-login > div:first-child {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.88);
    }
    #view-login .relative:focus-within > span { transform: none; }
    #view-login input { font-size: 16px; }
}
