/* ===== MAIN STYLES ===== */
/* Use Inter font as default */
html {
    background-color: #f3f4f6; /* bg-gray-100 */
}

body {
    font-family: 'Inter', sans-serif;
    max-width: 28rem; /* 448px, like a large phone */
    margin: auto;
    min-height: 100vh;
    background-color: #ffffff; /* bg-white */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
    position: relative;
}

/* Responsive container widths for larger screens */
@media (min-width: 640px) { /* sm */
    body { max-width: 40rem; /* 640px */ }
}
@media (min-width: 768px) { /* md */
    body { max-width: 48rem; /* 768px */ }
}
@media (min-width: 1024px) { /* lg */
    body { max-width: 100%; }
}
@media (min-width: 1280px) { /* xl */
    body { max-width: 100%; }
}

/* Custom scrollbar for aesthetics */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #fb923c; /* orange-400 */
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f97316; /* orange-500 */
}

/* Hide elements by default */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Spinner styles */
.loader {
    border-top-color: #f97316;
    -webkit-animation: spin 1s ease-in-out infinite;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Read-only styles */
.readonly-field {
    background-color: #f9fafb !important; /* bg-gray-50 */
    cursor: default;
}

/* ===== LAYOUT STYLES ===== */
.main-content {
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 6rem; /* pb-24 */
}
@media (min-width: 1024px) { /* lg */
    .main-content { padding: 2rem; }
}

/* ===== HEADER STYLES ===== */
.header {
    background-color: #ea580c; /* orange-600 */
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav {
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 640px) {
    .nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
    .nav-title {
        margin-bottom: 0;
    }
}

.user-display {
    font-size: 0.75rem;
    color: #fed7aa; /* orange-200 */
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ===== FOOTER STYLES ===== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 28rem;
    margin: 0 auto;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    z-index: 50;
}
@media (min-width: 640px) { .footer { max-width: 40rem; } }
@media (min-width: 768px) { .footer { max-width: 48rem; } }
@media (min-width: 1024px) { .footer { max-width: 100%; } }
@media (min-width: 1280px) { .footer { max-width: 100%; } }

.footer-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 4rem;
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #6b7280; /* gray-500 */
    transition: color 0.2s;
}

.nav-button:hover {
    color: #ea580c; /* orange-600 */
}

.nav-button.active {
    color: #ea580c; /* orange-600 */
}

.nav-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.form-help-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0;
}
