/* app/static/css/base.css */
/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%; /* use percentage instead of vh for better mobile keyboard handling */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto; /* Allow vertical scrolling when content overflows */
}

main {
    flex: 1;
    min-height: 0; /* allows main to shrink inside flex container */
}

/* ===== UTILITY CLASSES ===== */
.ml-auto { margin-left: auto; }
.ml-10px { margin-left: 10px; }
.hidden { display: none !important; }
.inline-form { display: inline; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile adjustments for main to prevent whole-page scroll */
@media (max-width: 768px) {
    body {
        overflow: hidden; /* prevent body scrolling, only internal containers scroll */
    }
    main {
        overflow: hidden; /* ensure main doesn't scroll, child containers handle it */
    }
}