/* Vendix SFA – Base Styles (works alongside material-theme.css) */

/* Page background — soft gradient for login pages, neutral surface for admin */
body {
    font-family: 'Roboto', 'Noto Sans Sinhala', 'Noto Sans Tamil', 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ede9fe 100%) fixed;
    min-height: 100vh;
}

/* Sidebar nav link hover (overridden by material-theme on .sidebar) */
.nav-link.hover-light:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    margin: 0 0.75rem;
}

/* TOTP code input wide letter spacing */
.letter-spacing-wide {
    letter-spacing: 0.5em;
}

/* Colour swatch circle (tenant brand colours) */
.colour-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.15);
}

/* ============================================================================
   Tenant Sidebar — Feedback 11 fixes
   ============================================================================ */

/* Fix: Keep icons left-aligned during collapse transition (don't shift to center) */
.tenant-sidebar .menu-item-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Fix: Differentiate sub-nav background from main nav items.
   Children container uses .menu-children class in TenantLayout.razor. */
.tenant-sidebar .menu-children {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 0;
}

/* Fix: When collapsed, highlight parent icon if a child page is active. */
.tenant-sidebar.collapsed .menu-parent-active > .menu-item-link .material-icons,
.tenant-sidebar.collapsed .menu-parent-active > div > .material-icons {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    padding: 6px;
}

/* ============================================================================
   Tables — Compact rows, aligned icons (Feedback 11)
   ============================================================================ */

/* Fix: Reduce table row spacing for better data density.
   Applies to both HTML tables and MatTable (MatBlazor) for consistency
   between Admin and Tenant portal (Feedback 14, Note 3). */
.table.table-hover td,
.mdc-data-table__cell {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

/* Fix: Center-align action icons and their hover effect */
.table .action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}
.table .action-icon-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Fix: Vertically align identical icons across table rows.
   Covers both HTML tables and MatTable for Admin/Tenant consistency. */
.table td .material-icons,
.table td .mdc-icon-button,
.mdc-data-table__cell .material-icons,
.mdc-data-table__cell .mdc-icon-button {
    vertical-align: middle;
}

/* ============================================================================
   Buttons — Single-line text, no wrapping (Feedback 11)
   ============================================================================ */

/* Fix: Prevent button text from wrapping to two lines */
.mdc-button, .mat-button, [class*="MatButton"] {
    white-space: nowrap !important;
}

/* ============================================================================
   Login — Button height matching (Feedback 11)
   ============================================================================ */

/* Fix: Match login button height with input field height */
.login-card .mdc-button {
    min-height: 42px;
}
.login-card .mdc-text-field {
    height: 42px;
}
