:root {
    --bayan-ink: #17212f;
    --bayan-muted: #6c7686;
    --bayan-line: #dfe5ec;
    --bayan-soft: #f6f8fb;
    --bayan-paper: #ffffff;
    --bayan-brand: #0f766e;
    --bayan-brand-2: #0d9488;
    --bayan-blue: #2563eb;
    --bayan-sky: #0284c7;
    --bayan-green: #16a34a;
    --bayan-amber: #d97706;
    --bayan-red: #dc2626;
    --bayan-violet: #7c3aed;
    --bayan-shadow: 0 10px 26px rgba(23, 33, 47, .08);
    --bayan-radius: 8px;
}

body {
    background: #eef2f6;
    color: var(--bayan-ink);
}

.main-header {
    border-bottom: 1px solid rgba(223, 229, 236, .9);
    box-shadow: 0 8px 22px rgba(23, 33, 47, .06);
}

.portlet.bg {
    background: transparent !important;
    box-shadow: none !important;
}

.portlet__body {
    padding: 0 !important;
}

.bayan-page-head,
.heading {
    background: var(--bayan-paper);
    border: 1px solid var(--bayan-line);
    border-radius: var(--bayan-radius);
    box-shadow: var(--bayan-shadow);
    padding: 18px;
}

.title-section {
    color: var(--bayan-ink);
    font-weight: 900;
}

.entry-title {
    color: var(--bayan-muted);
}

.bayan-grid {
    display: grid;
    gap: 16px;
}

.bayan-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bayan-card {
    background: var(--bayan-paper);
    border: 1px solid var(--bayan-line);
    border-radius: var(--bayan-radius);
    box-shadow: var(--bayan-shadow);
}

.bayan-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--bayan-line);
}

.bayan-card-title {
    font-weight: 900;
    color: var(--bayan-ink);
}

.bayan-card-sub {
    color: var(--bayan-muted);
    font-size: 12px;
    margin-top: 2px;
}

.bayan-card-body {
    padding: 17px;
}

.bayan-metric {
    padding: 17px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
}

.bayan-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--bayan-radius);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.bayan-label {
    color: var(--bayan-muted);
    font-size: 13px;
}

.bayan-value {
    color: var(--bayan-ink);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    margin-top: 2px;
}

.bayan-trend {
    color: var(--bayan-green);
    font-size: 12px;
    font-weight: 800;
}

.bayan-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.bayan-summary-item {
    padding: 13px;
    border: 1px solid var(--bayan-line);
    border-radius: var(--bayan-radius);
    background: #f8fafc;
    min-width: 0;
}

.bayan-summary-item span {
    display: block;
    color: var(--bayan-muted);
    font-size: 12px;
    font-weight: 800;
}

.bayan-summary-item b {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.bayan-finance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 16px;
}

.bayan-task-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bayan-task-card {
    border: 1px solid var(--bayan-line);
    background: #fff;
    border-radius: var(--bayan-radius);
    padding: 13px;
}

.bayan-task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 9px;
}

.bayan-money {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--bayan-line);
    font-weight: 900;
    color: var(--bayan-ink);
    white-space: nowrap;
}

.bayan-money.green {
    color: #15803d;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.bayan-money.red {
    color: #b91c1c;
    background: #fff7f7;
    border-color: #fecaca;
}

.bayan-money.amber {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.bayan-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid transparent;
}

.bayan-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.bayan-status.green {
    color: #15803d;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.bayan-status.blue {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.bayan-status.amber {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.bayan-status.red {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.bayan-progress {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    min-width: 110px;
}

.bayan-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--bayan-brand);
}

.bayan-cost-list {
    display: grid;
    gap: 10px;
}

.bayan-cost-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--bayan-line);
    border-radius: var(--bayan-radius);
    background: #fff;
}

.bayan-cost-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--bayan-radius);
    display: grid;
    place-items: center;
    background: #e0f2fe;
    color: var(--bayan-sky);
    font-weight: 900;
}

.bayan-amount {
    font-weight: 900;
    color: var(--bayan-ink);
    white-space: nowrap;
}

.bayan-table {
    border: 1px solid var(--bayan-line);
    border-radius: var(--bayan-radius);
    overflow: hidden;
    box-shadow: var(--bayan-shadow);
}

.bayan-table table {
    margin-bottom: 0;
}

.bayan-table thead th,
.table thead th {
    background: #f8fafc;
    color: var(--bayan-muted);
    border-bottom: 1px solid var(--bayan-line);
    font-weight: 900;
}

.bayan-table tbody td,
.table tbody td {
    border-color: var(--bayan-line);
}

.btn-primary,
.btn-success {
    border-radius: var(--bayan-radius) !important;
}

.btn-primary {
    background: var(--bayan-brand) !important;
    border-color: var(--bayan-brand) !important;
}

.btn-primary:hover {
    background: #115e59 !important;
    border-color: #115e59 !important;
}

.rounded-pill {
    border-radius: var(--bayan-radius) !important;
}

.card {
    border-radius: var(--bayan-radius) !important;
}

.bayan-login-page {
    min-height: 100vh;
    margin: 0;
    background: #667eea;
    color: var(--bayan-ink);
    font-family: 'Tajawal', sans-serif;
}

.bayan-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 255, 255, .18), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(255, 111, 60, .2), transparent 24%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bayan-login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    overflow: hidden;
    animation: bayanLoginFadeIn .45s ease;
}

@keyframes bayanLoginFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

.bayan-login-header {
    position: relative;
    overflow: hidden;
    padding: 35px 30px;
    text-align: center;
    background: linear-gradient(135deg, #1976d2 0%, #1557a8 100%);
}

.bayan-login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .14) 0%, transparent 70%);
}

.bayan-login-header img {
    position: relative;
    z-index: 1;
    height: 80px;
    margin: 0 auto 20px;
    object-fit: contain;
}

.bayan-login-header h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.bayan-login-header p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, .86);
    font-size: 14px;
    line-height: 1.8;
}

.bayan-login-body {
    padding: 35px 30px;
}

.bayan-login-group {
    margin-bottom: 22px;
}

.bayan-login-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.bayan-login-input-wrap {
    position: relative;
}

.bayan-login-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 2;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    transition: color .2s;
}

.bayan-login-input {
    width: 100%;
    height: auto;
    padding: 14px 46px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.bayan-login-input:focus {
    border-color: #1976d2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, .1);
}

.bayan-login-input:focus + .bayan-login-icon,
.bayan-login-input-wrap:hover .bayan-login-icon {
    color: #1976d2;
}

.bayan-login-eye {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 3;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color .2s;
}

.bayan-login-eye:hover {
    color: #1976d2;
}

.bayan-login-error {
    display: block;
    margin-top: 6px;
    padding-right: 4px;
    color: #e74a3b;
    font-size: 12px;
}

.bayan-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.bayan-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #334155;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.bayan-login-remember input {
    width: 18px;
    height: 18px;
    accent-color: #1976d2;
    cursor: pointer;
}

.bayan-login-forgot {
    color: #1976d2;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s;
}

.bayan-login-forgot:hover {
    color: #ff6f3c;
    text-decoration: underline;
}

.bayan-login-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #1976d2 0%, #1557a8 100%);
    box-shadow: 0 4px 15px rgba(25, 118, 210, .3);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.bayan-login-submit:hover {
    background: linear-gradient(135deg, #ff6f3c 0%, #e85a2a 100%);
    box-shadow: 0 6px 20px rgba(255, 111, 60, .4);
    transform: translateY(-2px);
}

.bayan-login-submit:disabled {
    cursor: not-allowed;
    opacity: .75;
    transform: none;
}

.bayan-login-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bayanLoginSpin .8s linear infinite;
}

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

.bayan-login-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: center;
}

.bayan-login-footer p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.bayan-login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
}

.bayan-login-alert-success {
    border: 1px solid #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.bayan-login-alert-error {
    border: 1px solid #fecaca;
    background: #fff7f7;
    color: #b91c1c;
}

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

    .bayan-finance-grid {
        grid-template-columns: 1fr;
    }

    .bayan-task-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bayan-login-wrapper {
        align-items: flex-start;
        padding-top: 28px;
        padding-bottom: 28px;
    }
}

@media (max-width: 760px) {
    .bayan-page-head,
    .heading {
        display: block !important;
    }

    .bayan-kpis,
    .bayan-summary-strip,
    .bayan-task-board {
        grid-template-columns: 1fr;
    }

    .bayan-card-head,
    .bayan-task-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .bayan-cost-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .bayan-cost-row .bayan-amount {
        grid-column: 2;
    }

    .bayan-login-body,
    .bayan-login-header {
        padding-right: 20px;
        padding-left: 20px;
    }

    .bayan-login-header img {
        height: 60px;
    }

    .bayan-login-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
