/* ===== DESIGN SYSTEM - semaiPRO ===== */
/* Brand palette based on semaiPRO logo: deep maroon → amber-orange */

:root {
    /* semaiPRO Brand Palette */
    --brand-0: #F5E6D3;        /* lightest warm cream */
    --brand-1: #D4600A;        /* amber-orange (logo warm tone) */
    --brand-2: #B03A0A;        /* mid deep red-orange */
    --brand-3: #7D1C0C;        /* deep maroon (logo primary dark) */
    --brand-4: #3D0A04;        /* darkest maroon */

    /* Alias for backward-compat (replaces gold-*) */
    --gold-0: #F5E6D3;
    --gold-1: #D4600A;
    --gold-2: #B03A0A;
    --gold-3: #7D1C0C;
    --gold-4: #3D0A04;

    /* Neutrals */
    --black: #2B2B2B;
    --black-a50: rgba(43,43,43,0.5);
    --white: #FFFFFF;
    --grey-100: #F9F5F3;
    --grey-200: #E8DDD9;
    --grey-400: #BCBCBC;
    --grey-600: #AAAAAA;
    --grey-666: #666666;
    --text-grey: #2B2C34;

    /* Semantic */
    --red-700: #D50000;
    --red-900: #B71C1C;
    --green-500: #4CAF50;
    --green-700: #388E3C;
    --blue-500: #2196F3;
    --blue-700: #1976D2;
    --yellow-500: #FFEB3B;
    --yellow-700: #FBC02D;
    --accent: #E8820A;
    --bg-report: #F5CDA0;
    --transparent: transparent;
    --icon-overlay: rgba(170,170,170,0.2);
    --opacity: rgba(0,0,0,0.7);

    /* Primary */
    --color-primary: var(--brand-2);
    --color-primary-variant: var(--brand-3);
    --color-on-primary: var(--white);
    --color-secondary: var(--brand-1);

    /* Brand Gradient */
    --brand-gradient: linear-gradient(135deg, #8B1C1C 0%, #B03A0A 45%, #E8820A 100%);
    --brand-gradient-v: linear-gradient(180deg, #8B1C1C 0%, #B03A0A 50%, #D4600A 100%);

    /* Spacing */
    --margin-xxs: 4px;
    --margin-xs: 5px;
    --margin-sm: 8px;
    --margin-semi: 12px;
    --margin-md: 16px;
    --margin-lg: 24px;
    --margin-xl: 36px;
    --margin-xxl: 42px;
    --margin-xxxl: 48px;
    --safearea: 20px;

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 50px;
    --radius-full: 9999px;

    /* Typography sizes */
    --text-xxs: 10px;
    --text-xs: 12px;
    --text-sm: 14px;
    --text-md: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-xxl: 22px;
    --text-3xl: 24px;
    --text-4xl: 28px;
    --text-5xl: 32px;

    /* Toolbar height */
    --toolbar-height: 56px;
    --bottom-nav-height: 56px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    font-size: var(--text-sm);
    color: var(--black);
    background: #f0efe9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Outer wrapper: fills the iframe/viewport, centers the scaled app */
#app-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    width: 430px;
    height: 932px;
    position: relative;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    transform-origin: top center;
    flex-shrink: 0;
}

/* ===== TOOLBAR ===== */
.toolbar {
    display: flex;
    align-items: center;
    height: var(--toolbar-height);
    min-height: var(--toolbar-height);
    padding: 0 4px;
    background: var(--white);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.toolbar-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--black);
    cursor: pointer;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    transition: background 0.2s;
}

.toolbar-btn:active {
    background: rgba(0,0,0,0.08);
}

.toolbar-title {
    flex: 1;
    font-size: var(--text-xl);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ===== PAGE CONTAINER ===== */
.page-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--white);
    -webkit-overflow-scrolling: touch;
}

.page-content {
    padding: var(--safearea);
    padding-bottom: 80px;
}

/* Page transitions */
@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

#next-page {
    display: none;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    display: flex;
    align-items: center;
    height: var(--bottom-nav-height);
    min-height: var(--bottom-nav-height);
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.08);
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    border: none;
    background: none;
    color: var(--grey-600);
    font-size: var(--text-xxs);
    font-weight: 500;
    cursor: pointer;
    gap: 2px;
    transition: color 0.2s;
}

.bottom-nav-item.active {
    color: var(--gold-2);
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.6;
}

.bottom-nav-item.active .bottom-nav-icon {
    opacity: 1;
    filter: none;
}

/* ===== DRAWER ===== */
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black-a50);
    z-index: 200;
    transition: opacity 0.3s;
}

.drawer {
    position: absolute;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 300;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 16px rgba(0,0,0,0.15);
}

.drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    padding: 24px 16px;
    background: var(--brand-gradient);
    gap: 12px;
}

.drawer-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: contain;
    background: var(--white);
    padding: 4px;
}

.drawer-header-text {
    display: flex;
    flex-direction: column;
}

.drawer-app-name {
    color: var(--white);
    font-size: var(--text-md);
    font-weight: 700;
}

.drawer-version {
    color: rgba(255,255,255,0.75);
    font-size: var(--text-xs);
}

.drawer-items {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.drawer-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: none;
    font-size: var(--text-sm);
    color: var(--black);
    cursor: pointer;
    gap: 16px;
    text-align: left;
    transition: background 0.15s;
}

.drawer-item:active {
    background: rgba(0,0,0,0.05);
}

.drawer-item-danger {
    color: var(--red-900);
}

.drawer-item-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.drawer-divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 8px 0;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.card:active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-body {
    padding: var(--margin-md);
}

/* Profile card on dashboard */
.profile-card {
    display: flex;
    align-items: flex-start;
    padding: var(--margin-md);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-lg);
    gap: var(--margin-sm);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--text-xl);
    font-weight: 500;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    font-size: var(--text-5xl);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-greeting {
    font-size: var(--text-md);
    color: var(--grey-600);
}

.profile-name {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gold-3);
    word-break: break-word;
}

.profile-position {
    font-size: var(--text-xs);
    color: var(--black);
    margin-top: 2px;
}

.profile-email {
    font-size: var(--text-xs);
    color: var(--black);
}

/* Feature grid cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--margin-sm);
    margin-top: var(--margin-lg);
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--white);
    transition: background 0.15s, box-shadow 0.15s;
    padding: 8px;
    text-align: center;
}

.feature-card:active {
    background: rgba(0,0,0,0.03);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.feature-card img:not(.icon-raw) {
    width: 42px;
    height: 42px;
    object-fit: contain;
    /* Shift gold icons → semaiPRO deep red-brown brand color */
    filter: sepia(1) hue-rotate(-15deg) saturate(3.5) brightness(0.6);
    transition: filter 0.2s;
}

.feature-card:active img:not(.icon-raw) {
    filter: sepia(1) hue-rotate(-15deg) saturate(3.5) brightness(0.45);
}

/* icon-raw: skip brand filter (for icons with white/non-transparent background) */
.icon-raw {
    filter: none !important;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.feature-card-label {
    font-size: var(--text-xs);
    font-weight: 700;
    margin-top: var(--margin-sm);
    line-height: 1.3;
    color: var(--black);
}

/* ===== FORM FIELDS ===== */
.form-group {
    margin-bottom: var(--margin-md);
}

.form-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--grey-666);
    margin-bottom: 4px;
    font-weight: 500;
}

.form-field {
    position: relative;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--grey-400);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    font-family: 'Roboto', sans-serif;
    color: var(--black);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--gold-2);
    border-width: 2px;
    padding: 13px 15px;
}

.form-input::placeholder {
    color: var(--grey-600);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Material-style outlined input with floating label */
.outlined-field {
    position: relative;
    margin-bottom: var(--margin-md);
}

.outlined-field input,
.outlined-field select,
.outlined-field textarea {
    width: 100%;
    padding: 16px;
    border: 1.5px solid var(--grey-400);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    font-family: 'Roboto', sans-serif;
    color: var(--black);
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
}

.outlined-field input:focus,
.outlined-field select:focus,
.outlined-field textarea:focus {
    border-color: var(--gold-2);
    border-width: 2px;
}

.outlined-field label {
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: var(--text-xxs);
    color: var(--grey-666);
    background: var(--white);
    padding: 0 4px;
    font-weight: 500;
}

.outlined-field input:focus + label,
.outlined-field select:focus + label,
.outlined-field textarea:focus + label {
    color: var(--gold-2);
}

.form-error {
    font-size: var(--text-xxs);
    color: var(--red-700);
    margin-top: 4px;
    display: none;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-transform: none;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-gradient);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(176,58,10,0.3);
}

.btn-primary:active {
    background: var(--brand-3);
    box-shadow: none;
}

.btn-full {
    width: 100%;
}

.btn-text {
    background: none;
    color: var(--gold-2);
    padding: 8px 12px;
}

.btn-text-danger {
    background: none;
    color: var(--red-900);
    padding: 8px 12px;
}

.btn-outlined {
    background: none;
    border: 1.5px solid var(--gold-2);
    color: var(--gold-2);
}

.btn-danger {
    background: var(--red-700);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--text-xs);
}

/* ===== FAB ===== */
.fab {
    position: absolute;
    bottom: 72px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(176,58,10,0.45);
    z-index: 50;
    transition: transform 0.15s, box-shadow 0.15s;
}

.fab:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(176,58,10,0.3);
}

/* ===== LIST ITEMS ===== */
.list-item {
    display: flex;
    align-items: center;
    padding: var(--margin-semi) var(--margin-md);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: background 0.15s;
    gap: var(--margin-semi);
}

.list-item:active {
    background: rgba(0,0,0,0.03);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--black);
}

.list-item-subtitle {
    font-size: var(--text-xs);
    color: var(--grey-666);
    margin-top: 2px;
}

.list-item-meta {
    font-size: var(--text-xxs);
    color: var(--grey-600);
    margin-top: 2px;
}

.list-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xxs);
    font-weight: 700;
}

.badge-green {
    background: rgba(76,175,80,0.15);
    color: var(--green-700);
}

.badge-yellow {
    background: rgba(251,192,45,0.2);
    color: #E65100;
}

.badge-red {
    background: rgba(213,0,0,0.1);
    color: var(--red-700);
}

.badge-blue {
    background: rgba(33,150,243,0.15);
    color: var(--blue-700);
}

.badge-grey {
    background: rgba(0,0,0,0.06);
    color: var(--grey-666);
}

/* Record card in lists */
.record-card {
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--margin-sm);
    cursor: pointer;
    background: var(--white);
    transition: box-shadow 0.15s;
    overflow: hidden;
}

.record-card:active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.record-card-body {
    padding: var(--margin-semi) var(--margin-md);
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.record-card-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--black);
}

.record-card-date {
    font-size: var(--text-xxs);
    color: var(--grey-600);
}

.record-card-row {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--grey-666);
    margin-top: 4px;
}

.record-card-value {
    font-weight: 500;
    color: var(--black);
}

.record-card-status {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xxs);
    font-weight: 700;
    display: inline-flex;
    margin-top: 6px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid rgba(0,0,0,0.06);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tab {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: none;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--grey-600);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    text-align: center;
}

.tab.active {
    color: var(--gold-2);
    border-bottom-color: var(--gold-2);
}

/* ===== DETAIL VIEW ===== */
.detail-section {
    margin-bottom: var(--margin-lg);
}

.detail-section-title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--gold-3);
    margin-bottom: var(--margin-sm);
    padding-bottom: var(--margin-xs);
    border-bottom: 1px solid var(--grey-200);
}

.detail-row {
    display: flex;
    padding: var(--margin-sm) 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.detail-label {
    flex: 1;
    font-size: var(--text-xs);
    color: var(--grey-666);
}

.detail-value {
    flex: 1;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--black);
    text-align: right;
}

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--margin-sm);
    margin-top: var(--margin-sm);
}

.image-thumbnail {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background: var(--grey-100);
    border: 1.5px solid var(--grey-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnail-label {
    font-size: var(--text-xxs);
    color: var(--grey-666);
    text-align: center;
    padding: 4px;
    line-height: 1.3;
}

.image-placeholder-icon {
    font-size: 32px;
    color: var(--grey-400);
    margin-bottom: 4px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-text {
    font-size: var(--text-sm);
    color: var(--grey-600);
}

/* ===== LOADING ===== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black-a50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: var(--gold-2);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== DIALOG ===== */
.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black-a50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.dialog {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    animation: dialogIn 0.25s ease;
}

.dialog-icon {
    display: flex;
    justify-content: center;
    padding: 24px 24px 8px;
}

.dialog-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.dialog-title {
    text-align: center;
    font-size: var(--text-lg);
    font-weight: 700;
    padding: 8px 24px 4px;
}

.dialog-message {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--grey-666);
    padding: 8px 24px 16px;
    line-height: 1.5;
}

.dialog-actions {
    display: flex;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.dialog-actions .btn {
    flex: 1;
    border-radius: 0;
    padding: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dialogIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== CAMERA PAGE ===== */
.camera-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #1a1a1a;
    color: var(--white);
}

.camera-preview {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.camera-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 24px;
    background: #000;
    width: 100%;
}

.camera-shutter {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--grey-400);
    cursor: pointer;
    transition: transform 0.15s;
}

.camera-shutter:active {
    transform: scale(0.9);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--margin-sm);
    padding: var(--margin-sm) var(--safearea);
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.filter-bar input[type="date"] {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--grey-400);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-family: 'Roboto', sans-serif;
    color: var(--black);
}

.filter-bar input[type="date"]:focus {
    border-color: var(--gold-2);
    outline: none;
}

/* ===== NOTIFICATION LIST ===== */
.notification-item {
    display: flex;
    padding: var(--margin-semi) var(--safearea);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: var(--margin-semi);
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:active {
    background: rgba(0,0,0,0.03);
}

.notification-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-2);
    margin-top: 4px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: var(--text-sm);
    font-weight: 500;
}

.notification-time {
    font-size: var(--text-xxs);
    color: var(--grey-600);
    margin-top: 2px;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    padding: 0;
    background: var(--white);
}

.login-hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px 36px;
    background: var(--brand-gradient);
    border-radius: 0 0 32px 32px;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}

.login-hero::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.login-logo {
    width: 240px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

.login-version {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.65);
    margin-top: 10px;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.login-body {
    width: 100%;
    padding: 32px var(--safearea) var(--safearea);
    flex: 1;
}

.login-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--brand-3);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: var(--text-sm);
    color: var(--grey-600);
    margin-bottom: 24px;
}

.login-form {
    width: 100%;
}

.login-forgot-btn {
    align-self: flex-end;
}

.mobile-account-item {
    display: flex;
    align-items: center;
    padding: var(--margin-semi) var(--margin-md);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    margin-top: var(--margin-sm);
    cursor: pointer;
    gap: var(--margin-semi);
    transition: background 0.15s;
}

.mobile-account-item:active {
    background: rgba(0,0,0,0.03);
}

.mobile-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gold-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.mobile-account-info {
    flex: 1;
}

.mobile-account-name {
    font-size: var(--text-sm);
    font-weight: 500;
}

.mobile-account-role {
    font-size: var(--text-xxs);
    color: var(--grey-666);
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--gold-3);
    margin-bottom: var(--margin-sm);
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-bold {
    font-weight: 700;
}

.text-gold {
    color: var(--gold-2);
}

.text-red {
    color: var(--red-700);
}

.text-green {
    color: var(--green-700);
}

.mt-sm { margin-top: var(--margin-sm); }
.mt-md { margin-top: var(--margin-md); }
.mt-lg { margin-top: var(--margin-lg); }
.mb-sm { margin-bottom: var(--margin-sm); }
.mb-md { margin-bottom: var(--margin-md); }

.flex-row {
    display: flex;
    align-items: center;
    gap: var(--margin-sm);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== SCROLLBAR (slim) ===== */
.page::-webkit-scrollbar {
    width: 3px;
}

.page::-webkit-scrollbar-thumb {
    background: var(--grey-400);
    border-radius: 3px;
}

/* ===== CROP PAGE ===== */
.crop-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1a1a1a;
}

.crop-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.crop-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.crop-instruction {
    color: var(--grey-400);
    font-size: var(--text-xs);
    text-align: center;
    padding: 8px;
}

.crop-actions {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: #000;
}

/* ===== STATUS COLOR ===== */
.status-approved { color: var(--green-700); }
.status-pending { color: var(--accent); }
.status-rejected { color: var(--red-700); }
.status-draft { color: var(--grey-666); }
