Files
UAS_SIG/assets/css/responsive-fix.css
T
2026-06-02 03:16:26 +00:00

750 lines
11 KiB
CSS

/* =========================================================
SIPANTAS responsive UI fix
Fokus: tampilan lebih rapi di desktop dan mobile tanpa mengubah fitur utama.
========================================================= */
:root {
--app-radius: 26px;
--app-gap: 14px;
--touch-size: 46px;
}
html {
-webkit-text-size-adjust: 100%;
}
body {
min-width: 320px;
}
button,
a,
input,
select,
textarea {
-webkit-tap-highlight-color: transparent;
}
button,
.btn,
.tool-btn,
.tab,
.mini-btn,
.role-card-option {
touch-action: manipulation;
}
/* ---------- Dashboard shell ---------- */
.app-shell {
width: min(472px, calc(100vw - 32px));
top: 16px;
left: 16px;
bottom: 16px;
max-height: none;
height: auto;
border-radius: 28px;
}
.brand-panel {
grid-template-columns: 48px minmax(0, 1fr) auto auto auto !important;
gap: 10px;
}
.brand-panel > div:not(.brand-logo) {
min-width: 0;
}
.brand-panel h1,
.brand-panel p {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.panel-toggle,
.help-button,
.logout {
flex: 0 0 auto;
min-width: 34px;
}
.user-box {
grid-template-columns: minmax(0, 1fr) auto;
}
.user-main {
min-width: 0;
}
.user-main b,
.user-main span,
.role-chip {
overflow-wrap: anywhere;
}
.quick-guide-card {
align-items: center;
}
.tabs {
flex-wrap: nowrap !important;
overflow-x: auto !important;
overflow-y: hidden;
padding-bottom: 14px;
scroll-snap-type: x proximity;
-webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar {
height: 6px;
}
.tabs::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 999px;
}
.tab {
flex: 0 0 auto !important;
scroll-snap-align: start;
min-height: 42px;
white-space: nowrap;
}
.panel-body {
flex: 1;
min-height: 0;
overflow-y: auto;
overscroll-behavior: contain;
padding-bottom: 22px;
}
.hero-actions {
gap: 8px;
}
.hero-actions .btn,
.guide-dialog-actions .btn {
width: auto;
}
.stats-wide {
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.stat-card {
min-width: 0;
}
.stat-card small {
min-height: 28px;
}
.two-col,
.quick-actions {
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.two-col > div,
.quick-actions > * {
min-width: 0;
}
input,
select,
textarea,
.btn {
font-size: 14px;
}
input,
select,
.btn {
min-height: var(--touch-size);
}
textarea {
min-height: 92px;
}
.list-box {
max-height: none !important;
overflow: visible !important;
padding-right: 0;
}
.list-title-row {
align-items: flex-start;
}
.item-actions {
align-items: center;
}
.mini-btn,
.badge {
line-height: 1.25;
}
.anggota-card {
overflow: hidden;
}
.anggota-card .two-col {
margin-top: 0;
}
/* ---------- Map controls ---------- */
.map-toolbar {
top: 18px;
right: 18px;
left: auto;
max-width: calc(100vw - 526px);
justify-content: flex-end;
}
.tool-btn {
min-height: 38px;
}
.map-helper {
left: min(506px, calc(100vw - 420px));
right: auto;
bottom: 18px;
}
.legend {
max-width: 230px;
}
/* ---------- Auth and register pages ---------- */
.login-page {
align-items: start;
padding: 34px 18px;
}
.login-card {
margin: auto 0;
}
.login-card.register-card,
.login-card.register-card-wide {
width: min(920px, calc(100vw - 36px));
max-width: 920px;
}
.login-card.register-card form {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0 18px;
}
.login-card.register-card form > .role-picker,
.login-card.register-card form > .info-box,
.login-card.register-card form > .role-extra,
.login-card.register-card form > .btn {
grid-column: 1 / -1;
}
.role-picker {
grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.role-card-option {
min-height: 106px;
}
.location-picker-box {
padding: 16px;
}
.location-search-row {
grid-template-columns: minmax(0, 1fr) 112px !important;
}
.register-map {
height: 300px;
}
.selected-location-text {
overflow-wrap: anywhere;
}
/* ---------- Landing page ---------- */
.landing-nav {
gap: 14px;
}
.landing-menu {
min-width: 0;
justify-content: center;
}
.hero-section {
grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}
.hero-copy,
.hero-visual,
.map-card {
min-width: 0;
}
.feature-card,
.access-card,
.flow-card {
min-width: 0;
}
/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
.app-shell {
width: min(452px, calc(100vw - 28px));
}
.map-toolbar {
max-width: calc(100vw - 500px);
}
.map-helper {
display: none;
}
.hero-section {
gap: 36px;
}
}
@media (max-width: 980px) {
body {
overflow: hidden;
}
#map {
height: 100dvh;
}
.app-shell {
left: 12px;
right: 12px;
top: auto !important;
bottom: 12px;
width: auto;
height: min(70dvh, 640px);
max-height: 70dvh;
border-radius: 24px;
}
body.panel-collapsed .app-shell {
transform: translateY(calc(100% + 26px));
}
.panel-open {
left: 12px;
bottom: 12px;
min-height: 42px;
}
.brand-panel {
grid-template-columns: 44px minmax(0, 1fr) auto auto auto !important;
padding: 14px 14px 12px;
}
.brand-logo {
width: 44px;
height: 44px;
border-radius: 15px;
}
.user-box,
.quick-guide-card {
margin-left: 14px;
margin-right: 14px;
}
.tabs {
padding-left: 14px;
padding-right: 14px;
}
.panel-body {
padding: 14px;
}
.map-toolbar {
top: 12px !important;
left: 12px;
right: 12px !important;
bottom: auto !important;
max-width: none;
justify-content: flex-start;
overflow-x: auto;
border-radius: 20px;
padding: 7px;
}
.map-toolbar::-webkit-scrollbar {
display: none;
}
.tool-btn {
flex: 0 0 auto;
white-space: nowrap;
}
.legend {
display: none !important;
}
.map-helper {
display: none !important;
}
.leaflet-control-zoom {
margin-top: 70px !important;
}
.landing-nav {
width: min(100% - 28px, 1120px);
top: 12px;
border-radius: 26px;
flex-wrap: wrap;
}
.landing-brand {
flex: 1 1 auto;
}
.landing-menu {
order: 3;
width: 100%;
overflow-x: auto;
justify-content: flex-start;
flex-wrap: nowrap;
padding-top: 4px;
}
.landing-menu::-webkit-scrollbar {
display: none;
}
.hero-section {
grid-template-columns: 1fr;
gap: 28px;
min-height: auto;
padding-top: 54px;
}
.hero-copy h1 {
max-width: 760px;
}
.hero-visual {
min-height: auto;
}
.map-card {
height: 430px;
}
}
/* ---------- Phone ---------- */
@media (max-width: 640px) {
.app-shell {
left: 8px;
right: 8px;
bottom: 8px;
height: min(72dvh, 620px);
max-height: 72dvh;
border-radius: 22px;
}
.brand-panel {
grid-template-columns: 42px minmax(0, 1fr) auto !important;
gap: 9px;
}
.brand-logo {
width: 42px;
height: 42px;
}
.brand-panel h1 {
font-size: 17px;
}
.brand-panel p {
font-size: 11px;
}
.help-button,
.logout {
display: none !important;
}
.panel-toggle {
display: grid;
place-items: center;
}
.user-box {
grid-template-columns: 1fr;
gap: 8px;
}
.role-chip {
width: fit-content;
}
.quick-guide-card {
flex-direction: column;
align-items: stretch;
}
.quick-guide-card button {
width: 100%;
}
.dashboard-hero,
.tab-intro,
.stat-card,
.progress-wrap,
.list-item,
.report-card,
.info-box,
.anggota-card {
border-radius: 17px;
}
.hero-card h2 {
font-size: 19px;
}
.hero-card p,
.tab-intro span,
.guide-step span {
font-size: 12px;
}
.hero-actions,
.guide-dialog-actions {
flex-direction: column;
}
.hero-actions .btn,
.guide-dialog-actions .btn {
width: 100%;
}
.stats-wide,
.two-col,
.quick-actions,
.report-grid {
grid-template-columns: 1fr !important;
}
.stat-card {
min-height: 78px;
}
.stat-card span {
font-size: 24px;
}
.item-actions {
display: grid;
grid-template-columns: 1fr;
}
.item-actions .mini-btn {
width: 100%;
text-align: center;
}
.badge {
white-space: normal;
text-align: center;
}
.guide-dialog {
width: calc(100vw - 24px);
max-height: calc(100dvh - 28px);
overflow-y: auto;
padding: 18px;
border-radius: 22px;
}
.guide-modal-step {
grid-template-columns: 34px 1fr;
}
.guide-modal-step i {
width: 34px;
height: 34px;
}
.toast {
bottom: 14px;
border-radius: 18px;
width: calc(100vw - 24px);
text-align: center;
}
.login-page {
padding: 20px 12px;
}
.login-card,
.login-card.register-card,
.login-card.register-card-wide {
width: 100%;
max-width: none;
padding: 22px;
border-radius: 22px;
}
.login-card h1 {
font-size: 25px;
}
.login-card.register-card form {
display: block;
}
.role-picker {
grid-template-columns: 1fr !important;
}
.role-card-option {
min-height: auto;
}
.location-search-row {
grid-template-columns: 1fr !important;
}
.register-map {
height: 220px;
}
.landing-nav {
width: calc(100% - 20px);
margin-top: 10px;
padding: 10px;
border-radius: 22px;
}
.landing-brand {
min-width: 0;
}
.landing-brand > span {
width: 36px;
height: 36px;
border-radius: 13px;
}
.landing-actions {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
}
.landing-actions .btn-pill {
width: 100%;
padding: 0 12px;
}
.landing-menu {
display: none;
}
.hero-section,
.landing-section,
.access-section,
.landing-footer {
width: calc(100% - 24px);
}
.hero-section {
padding: 44px 0 36px;
}
.hero-copy h1 {
font-size: clamp(34px, 11vw, 46px);
letter-spacing: -1.6px;
}
.hero-copy p {
font-size: 15px;
line-height: 1.65;
}
.hero-buttons {
display: grid;
grid-template-columns: 1fr;
}
.hero-buttons a {
width: 100%;
}
.map-card {
height: 330px;
border-radius: 26px;
}
}
@media (max-width: 380px) {
.brand-logo {
display: none;
}
.brand-panel {
grid-template-columns: minmax(0, 1fr) auto !important;
}
.tab,
.tool-btn {
font-size: 11px;
}
.panel-body {
padding: 12px;
}
}
/* Better print output for reports */
@media print {
#map,
.map-toolbar,
.legend,
.map-helper,
.panel-toggle,
.panel-open,
.help-button,
.logout,
.tabs,
.quick-guide-card {
display: none !important;
}
body {
overflow: visible !important;
background: white !important;
}
.app-shell {
position: static !important;
width: 100% !important;
height: auto !important;
max-height: none !important;
box-shadow: none !important;
border: 0 !important;
}
.panel-body {
overflow: visible !important;
}
}