:root {
    --boubyan-red: #d71920;
    --boubyan-dark: #33373a;
    --boubyan-gray: #5d6266;
    --boubyan-light: #f5f6f8;
    --white: #ffffff;
    --border: #e2e5e9;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--boubyan-dark);
    background: var(--boubyan-light);
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(215, 25, 32, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f4f5f7 45%, #eceff3 100%);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 38px 34px 34px;
}

.logo-box {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.logo-box img {
    max-width: 290px;
    width: 100%;
    height: auto;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

.subtitle {
    margin: 8px 0 12px;
    text-align: center;
    color: var(--boubyan-gray);
    font-size: 14px;
}

.brand-support {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 0 30px;
}

.brand-support-label {
    font-size: 14px;
    color: var(--boubyan-gray);
    text-transform: none;
    letter-spacing: 0.3px;
    font-weight: 700;
}

.partner-logo {
    width: 360px;
    max-width: 360px;
    max-height: 130px;
    height: auto;
    object-fit: contain;
    opacity: 0.98;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.login-form label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.login-form input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--boubyan-dark);
    outline: none;
    background: #ffffff;
    transition: 0.2s ease;
}

.login-form input:focus {
    border-color: var(--boubyan-red);
    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.12);
}

.password-row {
    display: flex;
    gap: 8px;
}

.password-row input {
    flex: 1;
}

.password-toggle {
    width: 72px;
    min-width: 72px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f7f8fa;
    color: var(--boubyan-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.login-button {
    margin-top: 20px;
    height: 50px;
    border: 0;
    border-radius: 14px;
    background: var(--boubyan-red);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.error-box {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(215, 25, 32, 0.08);
    color: #a80f15;
    border: 1px solid rgba(215, 25, 32, 0.24);
    font-size: 14px;
}

/* dashboard */

.dashboard-page {
    min-height: 100vh;
    background: #f5f6f8;
}

.topbar {
    min-height: 86px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 12px 30px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
}

.header-boubyan-logo {
    height: 54px;
    width: auto;
}

.topbar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    border: 1px solid var(--border);
    background: #fafafa;
    border-radius: 999px;
    padding: 8px 18px;
}

.service-provider-text {
    font-size: 12px;
    color: var(--boubyan-gray);
    font-weight: 700;
    white-space: nowrap;
}

.header-valtech-logo {
    height: 42px;
    width: auto;
    display: block;
}

.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.user-badge {
    background: #f0f1f3;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
}

.logout-link {
    color: var(--boubyan-red);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.dashboard-content {
    padding: 30px;
}

.welcome-panel {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 26px 28px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.welcome-panel h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.welcome-panel p {
    margin: 0;
    color: var(--boubyan-gray);
}

.date-chip {
    background: rgba(215, 25, 32, 0.08);
    color: var(--boubyan-red);
    border: 1px solid rgba(215, 25, 32, 0.2);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    white-space: nowrap;
}

.services-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.045);
    transition: 0.18s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: rgba(215, 25, 32, 0.35);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.075);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 74px;
}

.service-logo-wrap {
    width: 78px;
    height: 58px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex: 0 0 auto;
}

.service-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.service-card h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
}

.service-card p {
    margin: 6px 0 0;
    color: var(--boubyan-gray);
    font-size: 13px;
    line-height: 1.35;
}

.service-metrics {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.metric-box {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px;
}

.metric-box span {
    display: block;
    color: var(--boubyan-gray);
    font-size: 13px;
    margin-bottom: 8px;
}

.metric-box strong {
    display: block;
    color: var(--boubyan-red);
    font-size: 30px;
    line-height: 1;
}

.service-card-footer {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--boubyan-gray);
    font-size: 13px;
}

.arrow {
    color: var(--boubyan-red);
    font-size: 20px;
    font-weight: 700;
}

.details-preview {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
}

.details-preview h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.details-preview p {
    margin: 0 0 18px;
    color: var(--boubyan-gray);
}

.details-table-wrap {
    overflow-x: auto;
}

.details-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.details-table-wrap th,
.details-table-wrap td {
    border-bottom: 1px solid var(--border);
    text-align: left;
    padding: 14px 12px;
    font-size: 14px;
}

.details-table-wrap th {
    background: #f8f9fb;
    color: var(--boubyan-dark);
}

.details-table-wrap td {
    color: var(--boubyan-gray);
}

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

    .topbar {
        grid-template-columns: 1fr;
    }

    .topbar-left,
    .topbar-center,
    .topbar-right {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .dashboard-content {
        padding: 18px;
    }

    .welcome-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 30px 22px;
    }

    .logo-box img {
        max-width: 250px;
    }

    .partner-logo {
        width: 280px;
        max-width: 280px;
    }
}

.service-card.is-loading {
    opacity: 0.72;
}

.service-card.is-loading .metric-box strong {
    animation: pulseMetric 0.8s ease-in-out infinite alternate;
}

@keyframes pulseMetric {
    from {
        opacity: 0.45;
    }
    to {
        opacity: 1;
    }
}
.service-card.is-active {
    border-color: rgba(215, 25, 32, 0.75);
    box-shadow: 0 18px 42px rgba(215, 25, 32, 0.11);
}

.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.details-count {
    background: rgba(215, 25, 32, 0.08);
    color: var(--boubyan-red);
    border: 1px solid rgba(215, 25, 32, 0.2);
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 700;
    white-space: nowrap;
}

.amount-cell {
    color: var(--boubyan-red) !important;
    font-weight: 700;
}

@media (max-width: 760px) {
    .details-header {
        flex-direction: column;
        align-items: flex-start;
    }
}