frontend_nyla/src/pages/basedata/BasedataPages.module.css
ValueOn AG 9865a32e99 fix(mobile): stabilize responsive layouts and action wrapping
Improve mobile and tablet usability by fixing viewport and scroll behavior, adding a mobile sidebar flow, and ensuring header action buttons wrap instead of clipping on narrow screens.

Made-with: Cursor
2026-03-01 13:46:21 +01:00

364 lines
6.8 KiB
CSS

/* BasedataPages.module.css - Shared styles for basedata pages */
.page {
padding: 2rem;
max-width: 1400px;
margin: 0 auto;
}
.header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 2rem;
}
.header h1 {
font-size: 1.75rem;
font-weight: 600;
color: var(--color-text-primary, #1a1a2e);
margin: 0 0 0.5rem 0;
}
.subtitle {
color: var(--color-text-secondary, #6b7280);
margin: 0;
}
.headerButtons {
display: flex;
gap: 0.5rem;
}
@media (max-width: 1024px) {
.header {
flex-direction: column;
gap: 0.75rem;
}
.headerButtons {
width: 100%;
flex-wrap: wrap;
}
}
.createButton,
.googleButton,
.microsoftButton {
padding: 0.5rem 1rem;
border-radius: 6px;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
border: none;
transition: all 0.2s;
}
.createButton {
background: var(--color-primary, #4f46e5);
color: white;
}
.createButton:hover:not(:disabled) {
background: var(--color-primary-dark, #4338ca);
}
.googleButton {
background: #ea4335;
color: white;
}
.googleButton:hover:not(:disabled) {
background: #c53929;
}
.microsoftButton {
background: #00a4ef;
color: white;
}
.microsoftButton:hover:not(:disabled) {
background: #0078d4;
}
.content {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Loading, Error, Empty states */
.loading,
.error,
.empty {
text-align: center;
padding: 3rem;
color: var(--color-text-secondary, #6b7280);
background: var(--color-surface, #ffffff);
border: 1px solid var(--color-border, #e5e7eb);
border-radius: 8px;
}
.error {
color: var(--color-error, #dc2626);
}
/* Table styles */
.tableContainer {
overflow-x: auto;
background: var(--color-surface, #ffffff);
border: 1px solid var(--color-border, #e5e7eb);
border-radius: 8px;
}
.table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}
.table th,
.table td {
text-align: left;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.table th {
font-weight: 600;
color: var(--color-text-secondary, #6b7280);
background: var(--color-surface-secondary, #f9fafb);
}
.table tbody tr:hover {
background: var(--color-surface-hover, #f3f4f6);
}
.table tbody tr:last-child td {
border-bottom: none;
}
.contentCell {
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Badge styles */
.badge {
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
}
.badge.active {
background: var(--color-success-bg, #dcfce7);
color: var(--color-success, #16a34a);
}
.badge.inactive {
background: var(--color-warning-bg, #fef3c7);
color: var(--color-warning, #d97706);
}
.provider {
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
background: var(--color-surface-secondary, #f3f4f6);
}
.provider.google {
background: #fce8e6;
color: #ea4335;
}
.provider.msft {
background: #e8f4fd;
color: #00a4ef;
}
/* Button styles */
.actions {
display: flex;
gap: 0.5rem;
}
.deleteButton,
.downloadButton,
.connectButton,
.refreshButton {
padding: 0.375rem 0.75rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
cursor: pointer;
border: 1px solid transparent;
transition: all 0.2s;
}
.deleteButton {
background: var(--color-error-bg, #fee2e2);
color: var(--color-error, #dc2626);
border-color: var(--color-error, #dc2626);
}
.deleteButton:hover:not(:disabled) {
background: var(--color-error, #dc2626);
color: white;
}
.downloadButton {
background: var(--color-info-bg, #dbeafe);
color: var(--color-info, #2563eb);
border-color: var(--color-info, #2563eb);
}
.downloadButton:hover:not(:disabled) {
background: var(--color-info, #2563eb);
color: white;
}
.connectButton {
background: var(--color-success-bg, #dcfce7);
color: var(--color-success, #16a34a);
border-color: var(--color-success, #16a34a);
}
.connectButton:hover:not(:disabled) {
background: var(--color-success, #16a34a);
color: white;
}
.refreshButton {
background: var(--color-warning-bg, #fef3c7);
color: var(--color-warning, #d97706);
border-color: var(--color-warning, #d97706);
}
.refreshButton:hover:not(:disabled) {
background: var(--color-warning, #d97706);
color: white;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Modal styles */
.modalOverlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal {
background: var(--color-surface, #ffffff);
border-radius: 8px;
width: 100%;
max-width: 500px;
max-height: 90vh;
overflow: auto;
}
.modalHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.modalHeader h2 {
margin: 0;
font-size: 1.25rem;
}
.modalHeader button {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--color-text-secondary, #6b7280);
}
.modalBody {
padding: 1.5rem;
}
.formGroup {
margin-bottom: 1rem;
}
.formGroup label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--color-text-primary, #1a1a2e);
}
.formGroup input,
.formGroup textarea {
width: 100%;
padding: 0.5rem 0.75rem;
border: 1px solid var(--color-border, #e5e7eb);
border-radius: 6px;
font-size: 0.875rem;
}
.formGroup textarea {
resize: vertical;
min-height: 100px;
}
.formGroup input:focus,
.formGroup textarea:focus {
outline: none;
border-color: var(--color-primary, #4f46e5);
box-shadow: 0 0 0 3px var(--color-primary-light, rgba(79, 70, 229, 0.1));
}
.modalFooter {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
padding-top: 1rem;
border-top: 1px solid var(--color-border, #e5e7eb);
margin-top: 1rem;
}
.modalFooter button {
padding: 0.5rem 1rem;
border-radius: 6px;
font-size: 0.875rem;
cursor: pointer;
}
.modalFooter button[type="button"] {
background: var(--color-surface-secondary, #f3f4f6);
border: 1px solid var(--color-border, #e5e7eb);
color: var(--color-text-primary, #1a1a2e);
}
.modalFooter button[type="submit"] {
background: var(--color-primary, #4f46e5);
border: none;
color: white;
}
.modalFooter button[type="submit"]:hover:not(:disabled) {
background: var(--color-primary-dark, #4338ca);
}