/* Islamic Portal management console — brand layer over the DashLite base theme. */

:root {
    --ip-green: #1f7a63;
    --ip-green-dark: #145a48;
    --ip-green-soft: #e8f5ee;
    --ip-gold: #c79a3d;
}

.header-topbar {
    background: linear-gradient(90deg, var(--ip-green) 0%, var(--ip-green-dark) 100%);
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.ip-hijri-bar {
    color: #fff;
    letter-spacing: .01em;
}

.ip-portal-logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ip-green);
}

.ip-portal-logo .icon {
    font-size: 1.6rem;
    color: var(--ip-gold);
}

.nk-menu-heading .overline-title {
    color: var(--ip-green) !important;
    letter-spacing: .12em;
}

.nk-menu-link.active {
    background: var(--ip-green-soft);
    border-radius: .375rem;
    color: var(--ip-green-dark) !important;
}

.nk-menu-link.active .nk-menu-icon .icon {
    color: var(--ip-green) !important;
}

.btn-primary {
    background-color: var(--ip-green);
    border-color: var(--ip-green);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--ip-green-dark) !important;
    border-color: var(--ip-green-dark) !important;
}

.btn-outline-primary {
    color: var(--ip-green);
    border-color: var(--ip-green);
}

.btn-outline-primary:hover {
    background-color: var(--ip-green);
    border-color: var(--ip-green);
}

a {
    color: var(--ip-green);
}

a:hover {
    color: var(--ip-green-dark);
}

.page-title a {
    color: inherit;
    text-decoration: none;
}

/* Dashboard summary tiles */
.ip-stat-card {
    border: 1px solid #e5e9f2;
    border-radius: .75rem;
    padding: 1.25rem;
    height: 100%;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}

.ip-stat-card:hover {
    box-shadow: 0 6px 20px rgba(31, 122, 99, .08);
    transform: translateY(-2px);
}

.ip-stat-card .ip-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: .625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--ip-green-soft);
    color: var(--ip-green);
    margin-bottom: .875rem;
}

.ip-stat-card .ip-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #364a63;
}

.ip-stat-card .ip-stat-label {
    font-size: .8125rem;
    color: #8094ae;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ip-stat-card.is-teal .ip-stat-icon { background: #e6f7f3; color: #0d9488; }
.ip-stat-card.is-blue .ip-stat-icon { background: #eaf1ff; color: #1e40af; }
.ip-stat-card.is-amber .ip-stat-icon { background: #fef3c7; color: #b45309; }
.ip-stat-card.is-purple .ip-stat-icon { background: #f3eaff; color: #7c3aed; }
.ip-stat-card.is-rose .ip-stat-icon { background: #ffeaf0; color: #be185d; }

/* Login screen */
.ip-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, #1f7a63 0%, #0f3d32 55%, #0a2a23 100%);
    padding: 2rem 1rem;
}

.ip-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
    padding: 2.25rem;
}

.ip-auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.ip-auth-brand .icon {
    font-size: 2.5rem;
    color: var(--ip-green);
}

.ip-auth-brand h4 {
    margin: .5rem 0 .25rem;
    font-weight: 700;
}

.ip-auth-brand p {
    color: #8094ae;
    font-size: .875rem;
    margin: 0;
}

/* Tables */
.record-table .nk-tb-col .badge {
    font-weight: 500;
}

.text-limit span {
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.ip-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: .375rem;
    border: 1px solid #e5e9f2;
}

@media (max-width: 767.98px) {
    .header-topbar {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .ip-stat-card .ip-stat-value {
        font-size: 1.375rem;
    }

    .text-limit span {
        max-width: 160px;
    }
}
