/* ============================================================
   ZENQOR TECHNOLOGIES - custom.css (CLEAN STYLESHEET v2.2)
   ============================================================ */

body { 
    font-family: 'Inter', sans-serif; 
    background: #f8fafc;
    text-rendering: optimizeLegibility;
}

[v-cloak] { 
    display: none !important; 
}

/* Login splash: logo-led 3D welcome effect */
.login-splash {
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 38%, rgba(45, 212, 191, 0.24), transparent 22rem),
        radial-gradient(circle at 12% 88%, rgba(231, 111, 81, 0.17), transparent 24rem),
        linear-gradient(135deg, #111827, #18212f 58%, #0f3f3a);
}

.splash-logo-stage {
    position: relative;
    z-index: 2;
    perspective: 1000px;
}

.splash-logo-card {
    display: flex;
    width: min(19rem, 74vw);
    aspect-ratio: 16 / 9;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 54px rgba(0, 0, 0, 0.36), 0 0 46px rgba(45, 212, 191, 0.22);
    transform-style: preserve-3d;
    animation: splash-logo-float 3.8s ease-in-out infinite;
}

.splash-logo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.54), transparent 35%, transparent 68%, rgba(15, 118, 110, 0.16));
}

.splash-logo-image {
    width: 82%;
    height: 82%;
    object-fit: contain;
    transform: translateZ(28px);
}

.splash-orbit {
    position: absolute;
    left: 50%;
    top: 7.5rem;
    z-index: 1;
    width: 23rem;
    height: 23rem;
    border: 1px solid rgba(94, 234, 212, 0.26);
    border-radius: 50%;
    transform: translateX(-50%) rotateX(68deg);
    animation: splash-orbit-spin 8s linear infinite;
}

.splash-orbit-two {
    width: 17rem;
    height: 17rem;
    border-color: rgba(251, 191, 36, 0.2);
    animation-direction: reverse;
    animation-duration: 6s;
}

.splash-progress {
    width: 11rem;
    height: 0.22rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.splash-progress span {
    display: block;
    width: 46%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #5eead4, #fbbf24);
    animation: splash-progress 1.2s ease-in-out infinite;
}

@keyframes splash-logo-float {
    0%, 100% { transform: rotateX(5deg) rotateY(-7deg) translateY(0); }
    50% { transform: rotateX(-4deg) rotateY(8deg) translateY(-12px); }
}

@keyframes splash-orbit-spin {
    to { transform: translateX(-50%) rotateX(68deg) rotateZ(360deg); }
}

@keyframes splash-progress {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(290%); }
}

@media (prefers-reduced-motion: reduce) {
    .splash-logo-card,
    .splash-orbit,
    .splash-progress span { animation: none; }
}

/* Lencana Tab & Menu Aktif Sidebar */
.sidebar-item-active {
    background-color: #0F766E;
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: none;
    border-left: 4px solid #E76F51;
    pointer-events: auto;
}

/* Client Portal — distinct accent so client sessions read visually apart from internal staff sessions */
.client-portal-theme {
    border-right-color: #1D4ED8;
}
.client-portal-theme .sidebar-item-active {
    background-color: #1D4ED8;
    border-left-color: #93C5FD;
}

/* ============================================================
   PORTAL UI POLISH — consistent, calm and accessible surfaces
   ============================================================ */
@media screen {
    #app {
        min-height: 100vh;
    }

    #app main {
        background-image: radial-gradient(circle at 100% 0, rgba(15, 118, 110, 0.1), transparent 28rem), linear-gradient(180deg, #f8fafc 0, #f1f5f9 100%);
    }

    .dark #app main {
        background-image: radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.08), transparent 28rem), linear-gradient(180deg, #0f172a 0, #0b1220 100%);
    }

    #app input,
    #app select,
    #app textarea {
        transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    }

    #app input:hover,
    #app select:hover,
    #app textarea:hover {
        border-color: #94a3b8;
    }

    #app input:focus-visible,
    #app select:focus-visible,
    #app textarea:focus-visible,
    #app button:focus-visible,
    #app a:focus-visible {
        outline: 3px solid rgba(15, 118, 110, 0.28);
        outline-offset: 2px;
    }

    #app button {
        transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
    }

    #app button:not(:disabled):active {
        transform: translateY(1px);
    }

    #app .rounded-2xl {
        border-radius: 0.7rem;
    }

    #app .rounded-xl {
        border-radius: 0.45rem;
    }

    #app .rounded-lg {
        border-radius: 0.3rem;
    }

    #app .bg-white.rounded-2xl,
    #app .dark\:bg-slate-800.rounded-2xl {
        box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    }

    #app .bg-white.rounded-2xl {
        border-color: #d7e0e8;
    }

    .dark #app .dark\:bg-slate-800.rounded-2xl {
        border-color: #334155;
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
    }

    #app table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    #app table tbody tr {
        transition: background-color 150ms ease;
    }

    #app table thead tr {
        background: #e2e8f0;
        color: #334155;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.68rem;
    }

    .dark #app table thead tr {
        background: #1e293b;
        color: #cbd5e1;
    }

    #app table tbody tr:hover {
        background: #f0fdfa !important;
    }

    .dark #app table tbody tr:hover {
        background: #1e293b !important;
    }

    #app label {
        color: #475569;
        letter-spacing: 0.025em;
    }

    .dark #app label {
        color: #cbd5e1;
    }

    #app .fixed.inset-0 > .bg-white,
    #app .fixed.inset-0 > .dark\:bg-slate-800 {
        box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    }

    .sidebar-item-active {
        background-image: linear-gradient(90deg, #0f766e, #14b8a6);
    }

    .sidebar-item-active i {
        color: #fbbf24;
    }

    @media (max-width: 767px) {
        #app main {
            background-image: none;
        }

        #app header {
            padding-top: 0.7rem;
            padding-bottom: 0.7rem;
        }

        #app .overflow-x-auto {
            -webkit-overflow-scrolling: touch;
        }

        #app table th,
        #app table td {
            white-space: nowrap;
        }

        #app .fixed.inset-0 {
            padding: 0.75rem;
        }
    }
}

/* Modern corporate portal visual language */
@media screen {
    #app aside {
        background: linear-gradient(180deg, #18212f 0%, #111827 100%) !important;
        border-right-color: rgba(20, 184, 166, 0.35) !important;
    }

    #app aside > div:first-child {
        border-bottom-color: rgba(255, 255, 255, 0.14) !important;
        position: relative;
    }

    #app aside > div:first-child::before {
        content: '';
        position: absolute;
        left: 1rem;
        right: 1rem;
        bottom: -1px;
        height: 2px;
        background: linear-gradient(90deg, #0f766e, #2dd4bf);
    }

    #app header {
        border-bottom: 3px solid #0f766e !important;
        box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
    }

    #app .bg-brand-dark {
        background-color: #18212f;
    }

    #app .hover\:bg-brand-blue:hover {
        background-color: #0f766e;
    }

    #app .bg-brand-gold {
        background-color: #e76f51;
    }

    #app .text-brand-gold {
        color: #c2412d;
    }

    #app .border-brand-gold {
        border-color: #e76f51;
    }


    #app input,
    #app select,
    #app textarea {
        border-color: #cbd5e1;
        background-color: #ffffff;
    }

    #app input:focus,
    #app select:focus,
    #app textarea:focus {
        border-color: #0f766e;
        box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    }

    .dark #app input,
    .dark #app select,
    .dark #app textarea {
        background-color: #253247;
    }
}

/* Penyesuaian Bar Skrol (Scrollbar styling) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0D172A;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}

/* ============================================================
   PENETAPAN MOD CETAKAN & EKSPORT PDF (A4 PRINT / HTML2PDF)
   ============================================================ */
@media print {
    body { 
        background-color: white !important; 
        color: black !important;
        margin: 0 !important; 
        padding: 0 !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    .no-print { 
        display: none !important; 
    }
    .print-only { 
        display: block !important; 
    }
    
    .print-container {
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%;
        background: white; 
        padding: 0; 
        margin: 0;
        box-shadow: none !important;
    }

    .print-table th { 
        background-color: #0B1E36 !important; 
        color: white !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    .print-header-border { 
        border-bottom: 2px solid #D4AF37 !important; 
    }
    .print-total-box { 
        background-color: #0B1E36 !important; 
        color: white !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    .print-logo-container {
        background: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

.print-only { 
    display: none; 
}

/* Logo Syarikat pada Dokumen & Cetakan */
.print-logo-container {
    width: 46mm;
    height: 18mm;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    border-radius: 4px;
}

.print-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Approved claim PDF: compact one-page layout */
.claim-print-logo {
    width: 42mm;
    height: 16mm;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
}

@media print {
    .claim-print {
        width: 190mm !important;
        padding: 8mm 10mm !important;
        box-sizing: border-box;
        font-size: 10px !important;
    }
    .claim-print .mb-6 { margin-bottom: 4mm !important; }
    .claim-print .mb-5 { margin-bottom: 3mm !important; }
    .claim-print .pb-5 { padding-bottom: 3mm !important; }
    .claim-print .p-4 { padding: 3mm !important; }
    .claim-print .gap-5 { gap: 3mm !important; }
    .claim-print h1 { font-size: 17px !important; }
    .claim-print h3 { font-size: 10px !important; }
    .claim-print .text-lg { font-size: 14px !important; }
    .claim-print img.max-h-56 {
        max-height: 38mm !important;
        max-width: 100% !important;
        object-fit: contain;
    }
}

/* ============================================================
   GAYA KANVAS PAYSLIP (A4 LANDSCAPE 297mm x 210mm)
   ============================================================ */
.payslip-paper {
    background: white; 
    color: black; 
    width: 297mm; 
    min-height: 205mm; 
    padding: 10mm 14mm; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-size: 11px; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column;
    margin: 0 auto; 
    overflow: hidden; 
    page-break-inside: avoid;
}
.payslip-header {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
    border-bottom: 2px solid #0B1E36; 
    padding-bottom: 8px; 
    margin-bottom: 10px; 
    width: 100%;
}
.company-brand { 
    display: flex; 
    gap: 12px; 
    align-items: flex-start; 
    width: 62%; 
}
.company-brand img { 
    width: 38mm; 
    height: 16mm; 
    object-fit: cover; 
    object-position: center; 
    overflow: hidden; 
    background: #000000; 
    border-radius: 4px; 
}
.company-brand-text h1 { 
    font-size: 18px; 
    margin-bottom: 2px; 
    text-transform: uppercase; 
    color: #0B1E36; 
    font-weight: 800; 
}
.company-brand-text p { 
    font-size: 10px; 
    color: #334155; 
    margin-bottom: 1px; 
    white-space: pre-wrap; 
    line-height: 1.35; 
    font-weight: 500; 
}
.payslip-title { 
    width: 36%; 
    text-align: right; 
    display: flex; 
    flex-direction: column; 
}
.payslip-title h2 { 
    font-size: 22px; 
    margin-bottom: 4px; 
    color: #D4AF37; 
    letter-spacing: 2px; 
    font-weight: 800; 
}
.payslip-title p { 
    font-size: 11px; 
    margin-bottom: 2px; 
    color: #1E293B; 
    font-weight: 600; 
}

/* Jadual Maklumat Pekerja */
.info-table-container { 
    width: 100%; 
    margin-bottom: 12px; 
}
.info-table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
}
.info-table th, .info-table td { 
    padding: 6px 8px; 
    border: 1px solid #CBD5E1; 
    text-align: left; 
    font-size: 11px; 
    vertical-align: middle; 
}
.info-table th { 
    background-color: #F1F5F9 !important; 
    width: 15%; 
    font-weight: 700; 
    color: #0B1E36; 
}
.info-table td { 
    width: 18%; 
    color: #1E293B; 
    font-weight: 600; 
}

/* Seksyen Pecahan Gaji & Potongan */
.salary-breakdown { 
    display: flex; 
    flex-direction: row !important; 
    gap: 16px; 
    margin-bottom: 10px; 
    width: 100%; 
}
.salary-col { 
    flex: 1; 
    width: calc(50% - 8px); 
    display: flex; 
    flex-direction: column; 
}
.calc-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 8px; 
    table-layout: fixed; 
}
.calc-table th, .calc-table td { 
    border: 1px solid #CBD5E1; 
    padding: 6px 8px; 
    color: #1E293B; 
    font-size: 11px; 
    vertical-align: middle; 
}
.calc-table thead th { 
    background: #0B1E36 !important; 
    color: white !important; 
    text-align: left; 
    font-weight: 700; 
}
.calc-table tfoot th, .calc-table tfoot td { 
    background: #E2E8F0 !important; 
    font-weight: 800; 
    color: #0B1E36; 
}
.calc-table td.amount, .calc-table th.amount { 
    text-align: right; 
    font-family: 'Courier New', monospace; 
    font-size: 12px; 
    font-weight: 700; 
    width: 35%; 
}

/* Kotak Gaji Bersih (Net Pay Section) */
.net-pay-section { 
    border: 2px solid #0B1E36; 
    padding: 8px 12px; 
    background: #F8FAFC !important; 
    margin-top: auto; 
    border-radius: 4px; 
}
.net-pay-table { 
    width: 100%; 
    font-size: 12px; 
}
.net-pay-table .final-net td { 
    font-size: 15px; 
    font-weight: 800; 
    color: #0B1E36; 
}
.net-pay-table .amount { 
    text-align: right; 
    font-family: 'Courier New', monospace; 
    color: #1E3A8A; 
    font-weight: 800; 
}

/* Seksyen Sumbangan Statutory (EPF / SOCSO / EIS) */
.contributions-section { 
    width: 100%; 
    margin-bottom: 8px; 
}
.contrib-grid { 
    display: flex; 
    flex-direction: row !important; 
    gap: 16px; 
    width: 100%; 
}
.contrib-col { 
    flex: 1; 
    width: calc(50% - 8px); 
}
.contrib-col h3 { 
    font-size: 11px; 
    margin-bottom: 4px; 
    color: #0B1E36; 
    border-bottom: 2px solid #0B1E36; 
    padding-bottom: 2px; 
    font-weight: 800; 
    text-transform: uppercase; 
}
.contrib-table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
}
.contrib-table th, .contrib-table td { 
    border: 1px solid #CBD5E1; 
    padding: 5px 8px; 
    color: #1E293B; 
    font-size: 10px; 
    vertical-align: middle; 
}
.contrib-table th { 
    background: #F1F5F9 !important; 
    text-align: left; 
    font-weight: 700; 
    color: #0B1E36; 
}
.contrib-table td:first-child { 
    width: 44%; 
    font-weight: 600; 
}
.contrib-table td.amount, .contrib-table th.amount { 
    text-align: right; 
    font-family: 'Courier New', monospace; 
    width: 28%; 
    font-weight: 700; 
}

/* Kaki Halaman Elektronik */
.electronic-footer { 
    margin-top: auto; 
    text-align: center; 
    font-size: 10px; 
    color: #64748B; 
    font-style: italic; 
    border-top: 1px dashed #CBD5E1; 
    padding-top: 6px; 
    width: 100%; 
}

/* Format rasmi borang: input maklumat dipaparkan dalam huruf besar. */
input[type="text"],
input[type="search"],
textarea,
select {
    text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="url"] {
    text-transform: none;
}

/* Project Activities: structured responsive workflow and summary layout. */
.project-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.project-summary-card {
    min-width: 0;
    border-top: 3px solid #0F766E;
}

.project-board-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    width: 100%;
}

/* Board card meta is now a compact 2x2 grid by default; full metadata is available in View Details. */

@media (max-width: 1450px) {
    .project-board-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .project-summary-grid,
    .project-board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .project-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-summary-card:last-child {
        grid-column: 1 / -1;
    }

    .project-board-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
