﻿/* =========================================================
   IAM DASHBOARD – SINGLE CSS FILE
   Login • Admin • Client
   Prefix-based, scalable, production ready
========================================================= */

/* =========================
   CORE VARIABLES (GLOBAL)
========================= */
:root {
    --color-primary: #2563eb;
    --color-secondary: #0f172a;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --color-warning: #f59e0b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-soft: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 6px 20px rgba(0,0,0,.08);
}

/* =========================
   CORE RESET & BASE
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
}
.e-sidebar {
    margin-top: 100px !important;
}
/* DASHBOARD*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--brand-700));
    backdrop-filter: blur(6px);
    color: var(--text-on-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.header-left .app-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-on-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}


/* =========================
   UTILITIES (SHARED)
========================= */
.xxx-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: loginFade .3s ease;
}

.xxx-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #c7d2fe;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

.xxx-loading-text {
    margin-top: .8rem;
    font-size: .8rem;
    font-weight: 500;
    color: #1e293b;
}
.u-flex {
    display: flex;
}

.u-between {
    justify-content: space-between;
}

.u-center {
    align-items: center;
}

.u-column {
    flex-direction: column;
}

.u-gap-1 {
    gap: .5rem;
}

.u-gap-2 {
    gap: 1rem;
}

.u-gap-3 {
    gap: 1.5rem;
}

.u-mt-1 {
    margin-top: .5rem;
}

.u-mt-2 {
    margin-top: 1rem;
}

.u-mt-3 {
    margin-top: 1.5rem;
}

.u-text-muted {
    color: var(--text-muted);
}
/* ===========================
   DASHBOARD INFO CARD
=========================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.info-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .info-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 25px rgba(0,0,0,.1);
    }

    /* Gradient bar di kiri */
    .info-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 6px;
        height: 100%;
        background: var(--card-color, #3b82f6);
    }

/* Content */
.info-content {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 600;
}

.info-value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

/* Icon */
.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    background: var(--card-color, #3b82f6);
}

/* ===========================
   COLOR VARIANT
=========================== */

.card-saldo {
    --card-color: #10b981;
}

.card-wa {
    --card-color: #22c55e;
}

.card-sms {
    --card-color: #3b82f6;
}

.card-email {
    --card-color: #6366f1;
}

.card-ticket {
    --card-color: #f59e0b;
}
/* =========================
   SHARED COMPONENTS
========================= */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.card-title {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-secondary);
}

/* =========================
   BUTTON
========================= */
.btn {
    padding: .6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
}

/* =========================
   BADGE / STATUS
========================= */
.badge {
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: var(--color-success);
}

.badge-warning {
    background: #fef3c7;
    color: var(--color-warning);
}

.badge-danger {
    background: #fee2e2;
    color: var(--color-danger);
}

.badge-info {
    background: #e0e7ff;
    color: var(--color-primary);
}

/* =========================
   TABLE
========================= */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

    .table th {
        background: var(--bg-soft);
        text-transform: uppercase;
        font-size: .7rem;
        letter-spacing: .05em;
        padding: .75rem;
    }

    .table td {
        padding: .75rem;
        border-bottom: 1px solid #e5e7eb;
    }

/* =========================
   FORM
========================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: .25rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: .7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e5e7eb;
}

/* =========================================================
   AUTH / LOGIN (UNCHANGED – DO NOT TOUCH)
========================================================= */
.auth-login {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-login__card {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-login__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* =========================
   LOGIN – DETAIL DESIGN
========================= */
.auth-login__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    padding: 0;
    overflow: hidden;
}

.auth-login__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: .75rem 0 1.5rem;
    font-size: .85rem;
}

.auth-login__remember input {
    margin-right: .35rem;
}

.auth-login__forgot {
    text-decoration: none;
    color: var(--color-primary);
}

/* LEFT SIDE (BRAND) */ .auth-login__left {
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .auth-login__left img {
        width: 160px;
        margin-bottom: 1.5rem;
    }

    .auth-login__left h1 {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: .75rem;
    }

    .auth-login__left p {
        font-size: .95rem;
        opacity: .9;
        line-height: 1.6;
    }
/* RIGHT SIDE (FORM) */ 
.auth-login__right {
    padding: 3rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-login__btn {
    width: 100%;
    padding: .75rem;
    font-size: .95rem;
}

.auth-login__footer {
    margin-top: 2rem;
    font-size: .75rem;
    text-align: center;
    color: var(--text-muted);
}
/* =========================================================
   ADMIN LAYOUT
========================================================= */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--color-secondary);
    color: #fff;
    padding: 1.5rem;
}

.admin-sidebar__logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.admin-sidebar__menu a {
    display: block;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    color: #cbd5f5;
    text-decoration: none;
}

    .admin-sidebar__menu a:hover,
    .admin-sidebar__menu a.active {
        background: rgba(255,255,255,.12);
        color: #fff;
    }

.admin-content {
    padding: 2rem;
}

/* DASHBOARD */
.admin-dashboard__cards,
.client-dashboard__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    gap: 1.5rem;
}

/* =========================================================
   CLIENT DASHBOARD
========================================================= */
.client-layout {
    min-height: 100vh;
    padding: 2rem;
}

.client-dashboard__welcome {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* =========================================================
   PROGRESS BAR
========================================================= */
.progress {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary);
}

/* =========================================================
   TIMELINE
========================================================= */
.timeline {
    border-left: 3px solid #e5e7eb;
    padding-left: 1.5rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

    .timeline-item::before {
        content: "";
        position: absolute;
        left: -11px;
        top: 4px;
        width: 10px;
        height: 10px;
        background: var(--color-primary);
        border-radius: 50%;
    }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 992px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .auth-login__split {
        grid-template-columns: 1fr;
    }
}
