
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1769e0;
    --primary-dark: #0f56bd;
    --sidebar: #07152d;
    --text: #172033;
    --muted: #718096;
    --light: #f5f7fb;
    --border: #e5e9f0;
    --white: #ffffff;
    --success: #16845b;
    --success-bg: #e8f7f0;
    --warning: #a66a00;
    --warning-bg: #fff5df;
    --danger: #c0392b;
    --danger-bg: #fdecea;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}


/* ========================================
   PAGE
======================================== */

.dashboard-page {
    min-height: 100vh;
    display: flex;
}


/* ========================================
   SIDEBAR
======================================== */

.sidebar {
    width: 255px;
    min-height: 100vh;

    background: linear-gradient(
        180deg,
        #07152d 0%,
        #0b2552 55%,
        #1554a7 100%
    );

    color: #ffffff;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 28px 14px 22px;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    z-index: 100;
}

.sidebar-top {
    width: 100%;
}


/* BRAND */

.sidebar-brand {
    display: block;

    padding: 0 12px 25px;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: #48d4dc;
}


/* USER */

.sidebar-user {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px 12px;

    margin-bottom: 30px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #2ac4ce;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 800;
}

.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-user-info strong {
    overflow: hidden;

    color: #ffffff;

    font-size: 13px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    margin-top: 2px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 11px;
}


/* NAVIGATION */

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    padding: 0 13px;

    margin-bottom: 9px;

    color: rgba(255, 255, 255, 0.45);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border-radius: 8px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: #ffffff;

    background: linear-gradient(
        90deg,
        rgba(52, 202, 215, 0.75),
        rgba(23, 105, 224, 0.75)
    );

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.12);
}

.nav-icon {
    width: 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
}


/* LOGOUT */

.sidebar-logout {
    width: 100%;
    min-height: 45px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: rgba(255, 255, 255, 0.72);

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;

    text-align: left;

    transition: 0.2s;
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}


/* ========================================
   MAIN AREA
======================================== */

.dashboard-main {
    width: calc(100% - 255px);

    min-height: 100vh;

    margin-left: 255px;
}


/* ========================================
   TOP BAR
======================================== */

.dashboard-topbar {
    min-height: 88px;

    padding: 22px 45px;

    background: #ffffff;

    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.page-label {
    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.dashboard-topbar h1 {
    margin-top: 3px;

    font-size: 25px;
    line-height: 1.2;
}

.topbar-user {
    display: flex;
    align-items: center;

    gap: 10px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--primary);
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 800;
}

.topbar-user div:last-child {
    display: flex;
    flex-direction: column;
}

.topbar-user strong {
    font-size: 13px;
}

.topbar-user span {
    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}


/* ========================================
   CONTENT
======================================== */

.dashboard-content {
    max-width: 1180px;

    margin: 0 auto;

    padding: 38px 40px 60px;
}


/* ========================================
   PAGE INTRO
======================================== */

.page-intro {
    margin-bottom: 25px;
}

.page-intro h2 {
    margin-top: 5px;
    margin-bottom: 7px;

    font-size: 27px;
}

.page-intro p:last-child {
    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}


/* ========================================
   FILTER CONTROLS
======================================== */

.transaction-controls {
    display: grid;

    grid-template-columns: 180px 180px 1fr;

    gap: 15px;

    margin-bottom: 20px;

    padding: 20px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 12px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.035);
}

.filter-group {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.filter-group label {
    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}

.filter-group select,
.filter-group input {
    width: 100%;
    height: 42px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #ffffff;

    color: var(--text);

    outline: none;

    font-size: 12px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, 0.08);
}

.filter-group input::placeholder {
    color: #a0aec0;
}


/* ========================================
   TRANSACTION CARD
======================================== */

.transaction-card {
    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 14px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.035);

    overflow: hidden;
}

.transaction-card-header {
    min-height: 82px;

    padding: 20px 25px;

    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.transaction-card-header h2 {
    margin-top: 4px;

    font-size: 20px;
}

.transaction-count {
    padding: 7px 11px;

    border-radius: 20px;

    background: #edf4ff;

    color: var(--primary);

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}


/* ========================================
   TABLE
======================================== */

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}

.transaction-table {
    width: 100%;

    min-width: 760px;

    border-collapse: collapse;
}

.transaction-table th {
    padding: 15px 20px;

    background: #fafbfc;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.7px;

    text-align: left;

    text-transform: uppercase;

    white-space: nowrap;
}

.transaction-table td {
    padding: 18px 20px;

    border-bottom: 1px solid #edf0f4;

    color: var(--text);

    font-size: 12px;

    vertical-align: middle;
}

.transaction-table tbody tr {
    transition: background 0.2s ease;
}

.transaction-table tbody tr:hover {
    background: #fafcff;
}

.transaction-table tbody tr:last-child td {
    border-bottom: 0;
}


/* TRANSACTION NAME */

.transaction-name {
    display: flex;
    align-items: center;

    gap: 11px;
}

.transaction-icon {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #edf4ff;

    color: var(--primary);

    font-size: 14px;
    font-weight: 800;
}

.transaction-title {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.transaction-title strong {
    font-size: 12px;
}

.transaction-title span {
    color: var(--muted);

    font-size: 10px;
}


/* TYPE */

.transaction-type {
    font-size: 11px;
    font-weight: 700;

    text-transform: capitalize;
}


/* AMOUNT */

.transaction-amount {
    font-weight: 800;

    white-space: nowrap;
}


/* STATUS */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 75px;

    padding: 6px 9px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 800;

    text-transform: capitalize;
}

.status-confirmed,
.status-completed,
.status-success {
    background: var(--success-bg);
    color: var(--success);
}

.status-pending,
.status-processing {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-failed,
.status-rejected,
.status-cancelled {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-detected {
    background: #edf4ff;
    color: var(--primary);
}


/* DATE */

.transaction-date {
    color: var(--muted);

    font-size: 11px;

    white-space: nowrap;
}


/* ========================================
   STATES
======================================== */

.transaction-state {
    min-height: 280px;

    padding: 50px 25px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.transaction-state.hidden {
    display: none;
}

.transaction-state p {
    max-width: 400px;

    margin-top: 8px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}

.transaction-state h3 {
    margin-top: 15px;

    font-size: 17px;
}

.empty-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #edf4ff;

    color: var(--primary);

    font-size: 20px;
    font-weight: 800;
}

.state-button {
    min-height: 40px;

    margin-top: 20px;

    padding: 0 17px;

    border: 0;
    border-radius: 8px;

    background: var(--primary);

    color: #ffffff;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.state-button:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);
}


/* ========================================
   LOADING SPINNER
======================================== */

.loading-spinner {
    width: 32px;
    height: 32px;

    margin-bottom: 12px;

    border: 3px solid #e5e9f0;
    border-top-color: var(--primary);

    border-radius: 50%;

    animation: transactionSpin 0.8s linear infinite;
}

@keyframes transactionSpin {
    to {
        transform: rotate(360deg);
    }
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1050px) {

    .sidebar {
        width: 225px;
    }

    .dashboard-main {
        width: calc(100% - 225px);

        margin-left: 225px;
    }

    .dashboard-topbar {
        padding: 22px 30px;
    }

    .dashboard-content {
        padding: 30px;
    }

    .transaction-controls {
        grid-template-columns: 1fr 1fr;
    }

    .search-group {
        grid-column: 1 / -1;
    }
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 800px) {

    .dashboard-page {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;

        position: relative;

        padding: 18px;

        display: block;
    }

    .sidebar-brand {
        padding: 0 5px 18px;
    }

    .sidebar-user {
        margin-bottom: 18px;
    }

    .sidebar-section {
        margin-bottom: 15px;
    }

    .sidebar-label {
        padding-left: 5px;
    }

    .sidebar-nav {
        display: grid;

        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-logout {
        margin-top: 10px;
    }

    .dashboard-main {
        width: 100%;

        margin-left: 0;
    }

    .dashboard-topbar {
        padding: 20px;
    }

    .dashboard-content {
        padding: 25px 18px 45px;
    }

    .transaction-controls {
        grid-template-columns: 1fr;
    }

    .search-group {
        grid-column: auto;
    }

    .transaction-card-header {
        align-items: flex-start;

        flex-direction: column;
    }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 500px) {

    .dashboard-topbar {
        align-items: flex-start;

        flex-direction: column;
    }

    .topbar-user {
        width: 100%;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .page-intro h2 {
        font-size: 23px;
    }

    .transaction-card-header {
        padding: 18px;
    }

    .transaction-controls {
        padding: 17px;
    }

    .transaction-state {
        padding: 40px 20px;
    }

}