/* Login Page Styles - Split Layout */
.login-split-container {
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.login-left-panel {
    flex: 2;
    position: relative;
    background-image: url('/Images/login-background.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-branding {
    text-align: center;
    z-index: 1;
    padding: 40px;
}

.login-brand-title {
    font-size: 72px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.login-brand-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.14em;
    line-height: 1.6;
    text-transform: uppercase;
}

.login-right-panel {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.login-form-title {
    font-size: 28px;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 40px;
    margin-top: 0;
}

.login-form-fields {
    flex: 1;
}

.login-input-field {
    margin-bottom: 24px;
}

.password-field-container {
    position: relative;
    margin-bottom: 24px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 20px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    padding: 4px 8px;
    user-select: none;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.password-toggle:hover {
    color: #1976d2;
}

.password-toggle:hover {
    color: #1976d2;
}

.login-submit-button {
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 24px;
}

.login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.login-link {
    color: #1976d2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.login-link:hover {
    text-decoration: underline;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 12px;
}

.login-ai-console {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 8px;
}

.login-footer-left {
    font-size: 14px;
    font-weight: 600;
    color: #2E7D32;
    display: flex;
    align-items: center;
}

.qa-logo {
    max-height: 40px;
    width: auto;
}

.login-footer-right {
    font-size: 12px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-split-container {
        flex-direction: column;
    }
    
    .login-left-panel {
        flex: 1;
        min-height: 40vh;
    }
    
    .login-brand-title {
        font-size: 48px;
    }
    
    .login-brand-subtitle {
        font-size: 14px;
    }
    
    .login-right-panel {
        flex: 1;
        padding: 24px;
    }
}

/* Old login styles - keeping for backward compatibility */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23667eea;stop-opacity:1" /><stop offset="100%" style="stop-color:%23764ba2;stop-opacity:1" /></linearGradient></defs><rect width="100%" height="100%" fill="url(%23bg)"/></svg>');
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><rect width="100%" height="100%" fill="%23f8f9fa" opacity="0.1"/><circle cx="200" cy="200" r="100" fill="%23ffffff" opacity="0.05"/><circle cx="800" cy="300" r="150" fill="%23ffffff" opacity="0.03"/><circle cx="400" cy="700" r="120" fill="%23ffffff" opacity="0.04"/></svg>');
    pointer-events: none;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #2E7D32;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form {
    margin-bottom: 32px;
}

.login-field {
    margin-bottom: 20px;
}

.login-field .mud-input-control {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.login-field .mud-input-control .mud-input-root {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.login-field .mud-input-control .mud-input-root .mud-input-root-outlined {
    border-radius: 8px;
}

.login-button {
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    transition: all 0.3s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.login-button:disabled {
    transform: none;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.login-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.company-info {
    flex: 1;
    min-width: 120px;
}

.company-logo {
    font-size: 12px;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 2px;
}

.company-subtitle {
    font-size: 10px;
    color: #666;
    font-weight: 400;
}

.footer-links {
    flex: 1;
    text-align: right;
    min-width: 200px;
}

.copyright {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
}

/* Responsive Design for Login */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 24px;
        border-radius: 12px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        text-align: center;
    }
}

/* =====================================================
   ISMS DRAWER LAYOUT STYLES
   ===================================================== */

/* AppBar Styles */
.content-appbar {
    background: linear-gradient(180deg, #3d6b7f 0%, #2c5364 100%) !important;
}

.menu-icon-white {
    color: white !important;
}

/* Drawer Styles - Transparent with Background Image */
.drawer-custom {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('images/building.jpg') center/cover no-repeat !important;
    border-right: none !important;
    color: white;
}

.full-height-drawer {
    height: 100vh !important;
}

/* Remove white gap between drawer and content */
.mud-drawer {
    border-right: none !important;
    box-shadow: none !important;
}

.mud-drawer-content {
    background: transparent !important;
}

.drawer-header-section {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
}

.drawer-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

/* Logged In User Card - Transparent with Blur */
.logged-in-user-card,
.user-status-card {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 16px;
    margin-left: 14px;
    margin-right: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.logged-in-user-card:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logged-in-user-card .user-avatar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5364 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600 !important;
    line-height: 1.2;
    margin-bottom: 4px;
    color: white !important;
}

.user-company,
.user-zone {
    font-size: 11px !important;
    line-height: 1.2;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Drawer Content */
.drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    overflow: hidden;
}

.navmenu-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.navmenu-scrollable::-webkit-scrollbar {
    width: 6px;
}

.navmenu-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.navmenu-scrollable::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.nav-menu-custom {
    background: transparent !important;
    flex: 1;
    padding: 8px 12px !important;
    margin: 0 !important;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nav-menu-custom::-webkit-scrollbar {
    width: 6px;
}

.nav-menu-custom::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.nav-menu-custom::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.nav-menu-favorite {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 8px !important;
}

/* My Modules panel (dashboard My Access) */
.module-access-panel-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #d8dee8, transparent);
    margin: 1rem 0 1.1rem;
}

.module-access-panel-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.module-access-panel-header-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.module-access-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2a37;
}

.module-access-panel-hint {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
}

.module-access-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.module-access-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon body"
        "actions actions";
    gap: 0.55rem 0.75rem;
    padding: 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    animation: module-card-in 0.45s ease-out both;
}

.module-access-card:nth-child(2) {
    animation-delay: 0.08s;
}

@keyframes module-card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-access-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    border-color: #c7d2fe;
}

.module-access-card--active {
    border-color: #0066cc;
    background: linear-gradient(145deg, #f0f7ff 0%, #e8f2ff 100%);
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.15);
}

.module-access-card-icon {
    grid-area: icon;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 0.5rem;
    background: rgba(0, 102, 204, 0.1);
    flex-shrink: 0;
}

.module-access-card-body {
    grid-area: body;
    min-width: 0;
}

.module-access-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.module-access-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.module-access-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    line-height: 1.4;
}

.module-access-badge--current {
    background: #0066cc;
    color: #fff;
}

.module-access-badge--default {
    background: #fef3c7;
    color: #92400e;
}

.module-access-card-actions {
    grid-area: actions;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.module-access-panel .module-access-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.4rem 0.85rem;
    border-radius: 0.4rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.module-access-panel .module-access-btn--open {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.25);
}

.module-access-panel .module-access-btn--open:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.35);
}

.module-access-panel .module-access-btn--default {
    background: #fff;
    color: #374151 !important;
    border: 1px solid #d1d5db;
}

.module-access-panel .module-access-btn--default:hover:not(:disabled) {
    background: #f9fafb;
}

.module-access-panel .module-access-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.nav-system-modules {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    animation: nav-module-fade-in 0.5s ease-out;
}

@keyframes nav-module-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-module-switch-caption {
    color: #ffffff !important;
    margin: 0 0 8px 4px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.95;
}

.nav-module-switch-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.drawer-custom .nav-module-switch-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.drawer-custom .nav-module-switch-btn:hover:not(:disabled) {
    transform: translateX(4px);
    background: rgba(0, 0, 0, 0.62);
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.drawer-custom .nav-module-switch-btn--active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.75);
    cursor: default;
    opacity: 0.95;
}

.drawer-custom .nav-module-switch-btn:disabled:not(.nav-module-switch-btn--active) {
    opacity: 0.65;
    cursor: wait;
}

.drawer-custom .nav-module-switch-icon,
.drawer-custom .nav-module-switch-label {
    color: #ffffff !important;
}

.nav-system-module-caption-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 8px 4px;
}

.nav-system-module-caption-wrap--default {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-system-module-caption-icon {
    color: #ffd966 !important;
    fill: #ffd966 !important;
    animation: nav-module-star-pulse 2.4s ease-in-out infinite;
}

@keyframes nav-module-star-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 217, 102, 0));
    }
    50% {
        transform: scale(1.12);
        filter: drop-shadow(0 0 6px rgba(255, 217, 102, 0.65));
    }
}

.nav-system-module-link {
    font-weight: 600 !important;
}

.nav-system-module-favorite {
    background: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.drawer-custom .nav-system-module-favorite .mud-icon-root {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.nav-system-module-caption {
    color: #ffffff !important;
    margin: 0;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.nav-system-module-menu {
    width: 100%;
    margin-bottom: 8px;
}

.drawer-custom .nav-system-module-picker-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.78) 0%, rgba(28, 58, 74, 0.88) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    animation: nav-module-glow 4.5s ease-in-out infinite;
}

.drawer-custom .nav-system-module-picker-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.14) 50%, transparent 75%);
    transform: translateX(-120%);
    animation: nav-module-shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

.drawer-custom .nav-system-module-picker-btn:hover:not(:disabled),
.drawer-custom .nav-system-module-picker-btn:focus-visible:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.88) 0%, rgba(36, 72, 92, 0.95) 100%);
    border-color: #ffffff;
    outline: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 255, 255, 0.12);
}

.drawer-custom .nav-system-module-picker-btn:disabled {
    opacity: 0.8;
    cursor: wait;
}

.drawer-custom .nav-system-module-picker-btn--saving {
    animation: none;
}

@keyframes nav-module-glow {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34), 0 0 10px rgba(255, 255, 255, 0.1);
    }
}

@keyframes nav-module-shimmer {
    0%, 65% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}

.drawer-custom .nav-system-module-picker-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.22s ease, transform 0.22s ease;
}

.drawer-custom .nav-system-module-picker-btn:hover .nav-system-module-picker-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.drawer-custom .nav-system-module-picker-caret {
    transition: transform 0.22s ease;
}

.drawer-custom .nav-system-module-picker-btn:hover .nav-system-module-picker-caret {
    transform: translateY(2px);
}

.nav-system-module-picker-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nav-module-spin 0.75s linear infinite;
    flex-shrink: 0;
}

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

.nav-system-module-menu-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.nav-system-module-menu-check {
    margin-left: auto;
    color: var(--mud-palette-success) !important;
}

.drawer-custom .nav-system-module-picker-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    color: #ffffff;
}

.drawer-custom .nav-system-module-picker-label {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.drawer-custom .nav-system-module-picker-icon,
.drawer-custom .nav-system-module-picker-caret,
.drawer-custom .nav-system-module-picker-btn .mud-icon-root {
    color: #ffffff !important;
    fill: #ffffff !important;
    flex-shrink: 0;
}

.nav-menu-white .mud-nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
    margin: 4px 0 !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.nav-menu-white .mud-nav-link .mud-icon-root {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-menu-white .mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    transform: translateX(4px);
}

.nav-menu-white .mud-nav-link:hover .mud-icon-root {
    color: white !important;
}

.nav-menu-white .mud-nav-link.active,
.nav-menu-white .mud-nav-link.mud-nav-link-active {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-weight: 600 !important;
}

.nav-menu-white .mud-nav-link.active .mud-icon-root,
.nav-menu-white .mud-nav-link.mud-nav-link-active .mud-icon-root {
    color: white !important;
}

.nav-menu-white .mud-nav-group-title {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Drawer Footer (Logout Button) */
.drawer-footer-fixed {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: auto;
}

.logout-btn {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px !important;
}

/* Drawer Animation - Match ISMS */
.mud-drawer {
    transition: all 0.3s ease !important;
}

/* =====================================================
   MOBILE RESPONSIVE STYLES
   ===================================================== */

/* Mobile App Bar */
@media (max-width: 960px) {
    .app-datetime {
        display: none !important;
    }
    
    .app-title {
        font-size: 1rem !important;
    }
    
    .content-appbar {
        padding: 8px 12px !important;
    }
}


/* Mobile Main Content - ensure content is not hidden under fixed AppBar (all pages) */
@media (max-width: 960px) {
    .main-content,
    .mud-main-content,
    .mobile-content-area {
        padding: 0 !important;
        padding-top: 88px !important; /* Clear fixed AppBar on mobile */
        scroll-padding-top: 88px !important; /* For scroll-into-view */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }
    
    .mud-main-content {
        height: 100vh !important;
        min-height: 100vh !important;
    }
    
    .content-wrapper {
        padding: 20px 12px !important;
        padding-top: 16px !important;
        overflow-y: visible !important;
        min-height: auto !important;
    }
}

/* Mobile Login Page */
@media (max-width: 960px) {
    .login-split-container {
        flex-direction: column !important;
    }
    
    .login-left-panel {
        flex: 0 0 200px !important;
        min-height: 200px !important;
    }
    
    .login-brand-title {
        font-size: 36px !important;
        margin-bottom: 10px !important;
    }
    
    .login-brand-subtitle {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    .login-right-panel {
        flex: 1 !important;
    }
    
    .login-form-container {
        padding: 20px 16px !important;
    }
    
    .login-form-title {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }
    
    .login-input-field {
        margin-bottom: 16px !important;
    }
    
    .login-submit-button {
        min-height: 48px !important; /* Touch target size */
        font-size: 16px !important;
    }
    
    .login-footer {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    .login-footer-left {
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .login-footer-right {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
    }
    
    .qa-logo {
        max-height: 35px !important;
        margin: 0 auto !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 600px) {
    .app-title {
        font-size: 0.875rem !important;
    }
    
    .content-wrapper {
        padding: 12px 8px !important;
        padding-top: 16px !important; /* Keep top spacing for header clearance */
    }
    
    .login-form-container {
        padding: 16px 12px !important;
    }
    
    .login-footer {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    .login-footer-left {
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .login-footer-right {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
    }
    
    .qa-logo {
        max-height: 35px !important;
        margin: 0 auto !important;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .mud-nav-link,
    .mud-button,
    .mud-icon-button {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .password-toggle {
        min-height: 44px !important;
        min-width: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Main Content */
.main-content {
    background-color: #f5f5f5;
    min-height: 100vh;
}

.content-wrapper {
    min-height: calc(100vh - 64px);
    padding: 24px;
}

/* Responsive */
@media (max-width: 960px) {
    .content-wrapper {
        padding: 16px;
    }
}

/* Drawer - Smooth transitions (same as CAS_NX_BLAZOR) */
.mud-drawer {
    transition: all 0.3s ease !important;
}

/* User Management - Mobile Responsive */
.user-table {
    overflow-x: auto;
}

@media (max-width: 960px) {
    .user-table .mud-table-cell {
        min-width: 120px;
    }
    
    .user-table .mud-table-head .mud-table-cell {
        font-size: 0.875rem;
    }
    
    .user-table .mud-table-body .mud-table-cell {
        font-size: 0.875rem;
    }
}

/* MudTable mobile card layout - prevent overlapping, show full content (buttons/icons) */
@media (max-width: 960px) {
    .mud-table .mud-table-body .mud-table-cell {
        overflow: visible !important;
        white-space: normal !important;
        padding: 10px 12px !important;
        min-height: 40px !important;
    }
}

/* Mobile-friendly dialog */
@media (max-width: 600px) {
    .mud-dialog-container {
        padding: 8px !important;
    }
    
    .mud-dialog {
        margin: 8px !important;
    }
}

/* User Details Page - Beautiful styling like ISMS */
/* Only apply large avatar size on UserDetails page, not in sidebar */
.user-details-page .user-avatar,
MudContainer .user-avatar {
    width: 120px !important;
    height: 120px !important;
    font-size: 3rem !important;
    font-weight: bold;
    background: linear-gradient(135deg, #3d6b7f 0%, #2c5364 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* User Management Table - Enhanced styling */
.user-table .mud-table-row:hover {
    background-color: rgba(61, 107, 127, 0.05) !important;
}

/* Paper sections with outlined borders */
.mud-paper[outlined="true"] {
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

/* ─── Chat Logs ─── */
.chat-messages-area {
    min-height: 350px;
    max-height: 450px;
    overflow-y: auto;
    padding: 16px;
    background: #f5f6f8;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-row {
    display: flex;
    width: 100%;
}

.chat-row-me {
    justify-content: flex-end;
}

.chat-row-other {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.chat-bubble-me {
    background: #d1e7dd;
    border-bottom-right-radius: 4px;
}

.chat-bubble-other {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.chat-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: #2c5364;
}

.chat-time {
    font-size: 0.65rem;
    color: #888;
    text-align: right;
    white-space: nowrap;
    line-height: 1.3;
}.chat-text {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.45;
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.chat-send-btn {
    min-width: 80px !important;
    height: 40px !important;
}
