
        /* Portal tabs: Staff/Admin vs Employee sign-in */
        .portal-tabs {
            display: flex;
            gap: 6px;
            padding: 5px;
            margin: 0 0 22px;
            background: #f3e8ff;
            border-radius: 14px;
        }
        .portal-tab {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 11px 10px;
            border: 0;
            border-radius: 10px;
            background: transparent;
            color: #6b21a8;
            font: inherit;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background .2s, color .2s, box-shadow .2s;
        }
        .portal-tab:hover { background: rgba(255,255,255,.6); }
        .portal-tab:focus-visible { outline: 2px solid #a855f7; outline-offset: 2px; }
        .portal-tab.active {
            background: linear-gradient(135deg, #3b1839, #a855f7);
            color: #fff;
            box-shadow: 0 6px 16px rgba(168, 85, 247, .35);
        }
        .portal-tab svg { width: 17px; height: 17px; flex: none; }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            height: 100%;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #3b1839 0%, #5a2358 50%, #3b1839 100%);
            background-attachment: fixed;
            background-repeat: no-repeat;
            background-size: cover;
            min-height: 100vh;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }

        /* Animated Background Shapes */
        .bg-shape {
            position: fixed;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.3;
            animation: float 20s infinite ease-in-out;
            pointer-events: none;
        }

        .shape-1 {
            width: 400px;
            height: 400px;
            background: linear-gradient(135deg, #e879f9, #a855f7);
            top: -100px;
            left: -100px;
            animation-delay: 0s;
        }

        .shape-2 {
            width: 500px;
            height: 500px;
            background: linear-gradient(135deg, #c026d3, #7c3aed);
            bottom: -150px;
            right: -150px;
            animation-delay: 7s;
        }

        .shape-3 {
            width: 300px;
            height: 300px;
            background: linear-gradient(135deg, #f0abfc, #d946ef);
            top: 50%;
            right: 10%;
            animation-delay: 14s;
        }

        @keyframes float {

            0%,
            100% {
                transform: translate(0, 0) rotate(0deg);
            }

            33% {
                transform: translate(50px, -50px) rotate(120deg);
            }

            66% {
                transform: translate(-30px, 30px) rotate(240deg);
            }
        }

        .login-container {
            width: 100%;
            max-width: 400px;
            position: relative;
            z-index: 1;
            margin: auto;
        }

        .login-card {
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 28px 32px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 100px rgba(168, 85, 247, 0.2);
            animation: slideUp 0.6s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Header */
        .login-header {
            text-align: center;
            margin-bottom: 24px;
        }

        .logo-container {
            margin-bottom: 16px;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 85px;
        }

        .logo-image {
            max-width: 100px;
            max-height: 100px;
            width: auto;
            height: auto;
            object-fit: contain;
            animation: fadeIn 0.8s ease-out;
            display: block;
        }

        /* Placeholder logo style */
        .logo-placeholder {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #a855f7, #e879f9);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 2px;
            box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .login-title {
            font-size: 26px;
            font-weight: 700;
            background: linear-gradient(135deg, #3b1839, #a855f7);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 5px;
        }

        .login-subtitle {
            color: #6b7280;
            font-size: 13px;
            font-weight: 400;
        }

        /* Session Status */
        .session-status {
            margin-bottom: 20px;
            padding: 10px 14px;
            background: #dcfce7;
            border-left: 4px solid #22c55e;
            border-radius: 8px;
            color: #166534;
            font-size: 13px;
        }

        /* Form */
        .login-form {
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 6px;
        }

        .form-label svg {
            color: #a855f7;
            flex-shrink: 0;
        }

        .form-input {
            width: 100%;
            padding: 12px 14px;
            font-size: 14px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            background: #f9fafb;
            color: #111827;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .password-input {
            padding-right: 45px;
        }

        .form-input:focus {
            outline: none;
            border-color: #a855f7;
            background: #fff;
            box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
        }

        .form-input::placeholder {
            color: #9ca3af;
        }

        .password-wrapper {
            position: relative;
        }

        .toggle-password {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: #6b7280;
            padding: 4px;
            transition: color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .toggle-password:hover {
            color: #a855f7;
        }

        .input-error {
            color: #ef4444;
            font-size: 13px;
            margin-top: 6px;
            display: block;
        }

        /* Form Options */
        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            user-select: none;
        }

        .remember-me input[type="checkbox"] {
            display: none;
        }

        .checkbox-custom {
            width: 20px;
            height: 20px;
            border: 2px solid #d1d5db;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            background: #fff;
            flex-shrink: 0;
        }

        .remember-me input[type="checkbox"]:checked+.checkbox-custom {
            background: linear-gradient(135deg, #a855f7, #e879f9);
            border-color: #a855f7;
        }

        .remember-me input[type="checkbox"]:checked+.checkbox-custom::after {
            content: "✓";
            color: white;
            font-size: 12px;
            font-weight: bold;
        }

        .checkbox-label {
            font-size: 13px;
            color: #6b7280;
            font-weight: 500;
        }

        .forgot-password {
            font-size: 13px;
            color: #a855f7;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.2s;
            white-space: nowrap;
        }

        .forgot-password:hover {
            color: #7c3aed;
        }

        /* Submit Button */
        .submit-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #a855f7 0%, #e879f9 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(168, 85, 247, 0.5);
        }

        .submit-btn:active {
            transform: translateY(0);
        }

        /* Footer */
        .login-footer {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid #e5e7eb;
        }

        .login-footer p {
            color: #6b7280;
            font-size: 13px;
        }

        .login-footer a {
            color: #a855f7;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.2s;
        }

        .login-footer a:hover {
            color: #7c3aed;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            body {
                padding: 14px;
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 100vh;
            }

            .login-container {
                max-width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .login-card {
                padding: 32px 26px;
                border-radius: 18px;
                width: 100%;
            }

            .logo-container {
                min-height: 90px;
            }

            .logo-image {
                max-width: 110px;
                max-height: 110px;
            }

            .logo-placeholder {
                width: 75px;
                height: 75px;
                font-size: 18px;
            }

            .login-header {
                margin-bottom: 28px;
            }

            .login-title {
                font-size: 26px;
            }

            .login-subtitle {
                font-size: 13px;
            }

            .form-group {
                margin-bottom: 18px;
            }

            .form-input {
                padding: 12px 14px;
                font-size: 16px;
            }

            .password-input {
                padding-right: 45px;
            }

            .form-options {
                flex-direction: column;
                align-items: flex-start;
                gap: 14px;
            }

            .submit-btn {
                padding: 14px;
                font-size: 15px;
            }

            /* Reduce background shape sizes on mobile */
            .shape-1 {
                width: 250px;
                height: 250px;
            }

            .shape-2 {
                width: 300px;
                height: 300px;
            }

            .shape-3 {
                width: 200px;
                height: 200px;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 12px;
                overflow-y: auto;
            }

            .login-card {
                padding: 24px 18px;
                border-radius: 16px;
            }

            .logo-container {
                min-height: 70px;
            }

            .logo-image {
                max-width: 85px;
                max-height: 85px;
            }

            .logo-placeholder {
                width: 65px;
                height: 65px;
                font-size: 16px;
                border-radius: 14px;
            }

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

            .login-title {
                font-size: 22px;
            }

            .login-subtitle {
                font-size: 12px;
            }

            .form-group {
                margin-bottom: 16px;
            }

            .form-label {
                font-size: 12px;
                margin-bottom: 5px;
            }

            .form-label svg {
                width: 15px;
                height: 15px;
            }

            .form-input {
                padding: 11px 12px;
                font-size: 14px;
            }

            .password-input {
                padding-right: 42px;
            }

            .form-options {
                margin-bottom: 20px;
            }

            .checkbox-custom {
                width: 18px;
                height: 18px;
                min-width: 18px;
                min-height: 18px;
                border-radius: 5px;
            }

            .checkbox-label,
            .forgot-password {
                font-size: 12px;
            }

            .submit-btn {
                padding: 13px;
                font-size: 14px;
            }

            .login-footer {
                padding-top: 18px;
            }

            .login-footer p {
                font-size: 12px;
            }

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

        /* Extra small devices - iPhone SE and similar */
        @media (max-width: 375px) {
            body {
                padding: 10px;
            }

            .login-card {
                padding: 20px 16px;
                border-radius: 14px;
            }

            .logo-container {
                min-height: 65px;
            }

            .logo-image {
                max-width: 75px;
                max-height: 75px;
            }

            .logo-placeholder {
                width: 60px;
                height: 60px;
                font-size: 15px;
            }

            .login-header {
                margin-bottom: 18px;
            }

            .login-title {
                font-size: 20px;
            }

            .login-subtitle {
                font-size: 11px;
            }

            .form-group {
                margin-bottom: 14px;
            }

            .form-label {
                font-size: 11px;
                margin-bottom: 4px;
            }

            .form-label svg {
                width: 14px;
                height: 14px;
            }

            .form-input {
                padding: 10px 11px;
                font-size: 14px;
            }

            .password-input {
                padding-right: 40px;
            }

            .checkbox-custom {
                width: 17px;
                height: 17px;
                min-width: 17px;
                min-height: 17px;
            }

            .checkbox-label,
            .forgot-password {
                font-size: 11px;
            }

            .submit-btn {
                padding: 12px;
                font-size: 14px;
            }

            .login-footer {
                padding-top: 16px;
            }

            .login-footer p {
                font-size: 11px;
            }
        }

        /* Landscape orientation on mobile */
        @media (max-height: 600px) and (orientation: landscape) {
            body {
                padding: 10px;
                overflow-y: auto;
            }

            .login-card {
                padding: 20px 24px;
                margin: 10px auto;
            }

            .login-header {
                margin-bottom: 16px;
            }

            .logo-container {
                margin-bottom: 10px;
                min-height: 55px;
            }

            .logo-image {
                max-width: 65px;
                max-height: 65px;
            }

            .logo-placeholder {
                width: 55px;
                height: 55px;
                font-size: 14px;
            }

            .login-title {
                font-size: 20px;
            }

            .login-subtitle {
                font-size: 11px;
            }

            .form-group {
                margin-bottom: 14px;
            }

            .form-options {
                margin-bottom: 16px;
            }

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

            .login-footer {
                padding-top: 16px;
            }
        }

        /* Large screens */
        @media (min-width: 1200px) {
            .login-container {
                max-width: 420px;
            }

            .login-card {
                padding: 36px 40px;
            }
        }

        /* Touch device improvements */
        @media (hover: none) and (pointer: coarse) {

            .form-input,
            .submit-btn,
            .checkbox-custom,
            .toggle-password {
                min-height: 44px;
            }

            .forgot-password,
            .remember-me {
                min-height: 44px;
                display: flex;
                align-items: center;
            }
        }
    