/*
|--------------------------------------------------------------------------
| JOELSTORE - ADMIN CSS
|--------------------------------------------------------------------------
*/

.admin-page {
    padding: 28px 0 60px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}


/* ==========================================================================
   SIDEBAR
========================================================================== */

.admin-sidebar {
    position: sticky;
    top: 130px;

    padding: 12px;

    background: #202124;
    border: 1px solid #303134;
    border-radius: 14px;
}

.admin-sidebar-title {
    padding: 10px;

    color: #77797d;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .7px;
}

.admin-sidebar a {
    display: flex;
    align-items: center;

    gap: 9px;

    min-height: 39px;

    padding: 0 10px;

    border-radius: 8px;

    color: #aaa;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background .15s ease,
        color .15s ease;
}

.admin-sidebar a:hover {
    background: #292a2c;
    color: #fff;
}

.admin-sidebar a.active {
    background: rgba(255,116,21,.12);
    color: #ff7415;
}

.admin-sidebar .sidebar-divider {
    height: 1px;

    margin: 9px 5px;

    background: #303134;
}


/* ==========================================================================
   ADMIN HEADER
========================================================================== */

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.admin-title h1 {
    margin: 0 0 5px;

    color: #fff;

    font-size: 23px;
    font-weight: 850;
}

.admin-title p {
    margin: 0;

    color: #85878b;

    font-size: 11px;
}

.admin-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}


/* ==========================================================================
   ADMIN STATS
========================================================================== */

.admin-stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 18px;
}

.admin-stat {
    position: relative;

    padding: 17px;

    background: #202124;

    border: 1px solid #303134;
    border-radius: 13px;

    overflow: hidden;
}

.admin-stat::after {
    content: "";

    position: absolute;

    width: 80px;
    height: 80px;

    right: -35px;
    bottom: -35px;

    border-radius: 50%;

    background: rgba(255,116,21,.07);
}

.admin-stat-icon {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 10px;

    border-radius: 8px;

    background: #2b2c2f;

    color: #ff7415;

    font-size: 15px;
}

.admin-stat small {
    display: block;

    color: #818389;

    font-size: 9px;
}

.admin-stat strong {
    display: block;

    margin-top: 5px;

    color: #fff;

    font-size: 20px;
    font-weight: 900;
}

.admin-stat em {
    display: block;

    margin-top: 4px;

    color: #5fe58b;

    font-size: 9px;

    font-style: normal;
}


/* ==========================================================================
   ADMIN CARD
========================================================================== */

.admin-card {
    margin-bottom: 18px;

    background: #202124;

    border: 1px solid #303134;
    border-radius: 14px;

    overflow: hidden;
}

.admin-card-header {
    min-height: 57px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 0 16px;

    border-bottom: 1px solid #303134;
}

.admin-card-header h2 {
    margin: 0;

    color: #fff;

    font-size: 14px;
    font-weight: 850;
}

.admin-card-header small {
    color: #77797d;

    font-size: 9px;
}

.admin-card-body {
    padding: 16px;
}


/* ==========================================================================
   ADMIN TOOLBAR
========================================================================== */

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 14px;
}

.admin-toolbar-left,
.admin-toolbar-right {
    display: flex;
    align-items: center;

    gap: 7px;
}

.admin-search {
    width: 230px;

    height: 35px;

    padding: 0 11px;

    box-sizing: border-box;

    background: #292a2c;

    border: 1px solid #38393c;
    border-radius: 8px;

    outline: none;

    color: #fff;

    font-size: 11px;
}

.admin-search:focus {
    border-color: #ff7415;
}

.admin-filter {
    height: 35px;

    padding: 0 10px;

    background: #292a2c;

    border: 1px solid #38393c;
    border-radius: 8px;

    color: #ccc;

    font-size: 10px;

    outline: none;
}

.admin-btn {
    min-height: 35px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 0 12px;

    border: 1px solid #38393c;
    border-radius: 8px;

    background: #292a2c;

    color: #ccc;

    font-size: 10px;
    font-weight: 800;

    text-decoration: none;

    cursor: pointer;
}

.admin-btn:hover {
    border-color: #ff7415;
    color: #ff7415;
}

.admin-btn.primary {
    background: #ff7415;
    border-color: #ff7415;
    color: #fff;
}

.admin-btn.primary:hover {
    background: #ff842e;
    color: #fff;
}

.admin-btn.danger {
    background: rgba(220,65,65,.1);
    border-color: rgba(220,65,65,.25);
    color: #ff7373;
}


/* ==========================================================================
   ADMIN TABLE
========================================================================== */

.admin-table-wrapper {
    width: 100%;

    overflow-x: auto;

    border: 1px solid #303134;
    border-radius: 10px;
}

.admin-table {
    width: 100%;
    min-width: 850px;

    border-collapse: collapse;
}

.admin-table th {
    padding: 11px 12px;

    background: #292a2c;

    color: #85878b;

    font-size: 9px;
    font-weight: 800;

    text-align: left;
    text-transform: uppercase;

    white-space: nowrap;

    border-bottom: 1px solid #38393c;
}

.admin-table td {
    padding: 12px;

    color: #ccc;

    font-size: 10px;

    border-bottom: 1px solid #2d2e30;

    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #27282a;
}


/* ==========================================================================
   USER
========================================================================== */

.admin-user {
    display: flex;
    align-items: center;

    gap: 9px;

    min-width: 150px;
}

.admin-user-avatar {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 50%;

    background: #343539;

    color: #ff7415;

    font-size: 12px;
    font-weight: 800;
}

.admin-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-user strong {
    display: block;

    color: #eee;

    font-size: 11px;
}

.admin-user small {
    display: block;

    margin-top: 2px;

    color: #77797d;

    font-size: 9px;
}


/* ==========================================================================
   ADMIN PRODUCT
========================================================================== */

.admin-product {
    display: flex;
    align-items: center;

    gap: 9px;

    min-width: 190px;
}

.admin-product-image {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: #303134;

    border-radius: 7px;

    overflow: hidden;
}

.admin-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product strong {
    display: block;

    color: #eee;

    font-size: 11px;
}

.admin-product small {
    display: block;

    margin-top: 2px;

    color: #77797d;

    font-size: 9px;
}


/* ==========================================================================
   ADMIN STATUS
========================================================================== */

.admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 55px;

    padding: 5px 7px;

    border-radius: 5px;

    background: #303134;

    color: #aaa;

    font-size: 8px;
    font-weight: 800;

    text-transform: uppercase;
}

.admin-status.active,
.admin-status.success,
.admin-status.paid {
    background: rgba(55,190,100,.12);
    color: #5fe58b;
}

.admin-status.pending,
.admin-status.processing {
    background: rgba(255,190,65,.12);
    color: #ffc15a;
}

.admin-status.inactive,
.admin-status.failed,
.admin-status.rejected {
    background: rgba(255,75,75,.12);
    color: #ff7070;
}


/* ==========================================================================
   ADMIN ACTIONS
========================================================================== */

.admin-table-actions {
    display: flex;
    align-items: center;

    gap: 5px;
}

.admin-table-action {
    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #38393c;
    border-radius: 6px;

    background: #292a2c;

    color: #aaa;

    text-decoration: none;

    font-size: 11px;

    cursor: pointer;
}

.admin-table-action:hover {
    border-color: #ff7415;
    color: #ff7415;
}

.admin-table-action.danger:hover {
    border-color: #e14f4f;
    color: #ff7070;
}


/* ==========================================================================
   ADMIN FORM
========================================================================== */

.admin-form {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;
}

.admin-form-group {
    min-width: 0;
}

.admin-form-group.full {
    grid-column: 1 / -1;
}

.admin-form-group label {
    display: block;

    margin-bottom: 7px;

    color: #ddd;

    font-size: 10px;
    font-weight: 800;
}

.admin-form-control,
.admin-form-select,
.admin-form-textarea {
    width: 100%;

    box-sizing: border-box;

    padding: 10px 11px;

    background: #292a2c;

    border: 1px solid #38393c;
    border-radius: 8px;

    outline: none;

    color: #fff;

    font-size: 11px;
}

.admin-form-control:focus,
.admin-form-select:focus,
.admin-form-textarea:focus {
    border-color: #ff7415;
    box-shadow: 0 0 0 3px rgba(255,116,21,.07);
}

.admin-form-textarea {
    min-height: 130px;
    resize: vertical;
}


/* ==========================================================================
   CHECKBOX / SWITCH
========================================================================== */

.admin-checkbox {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #aaa;

    font-size: 10px;
}

.admin-checkbox input {
    accent-color: #ff7415;
}


/* ==========================================================================
   PROVIDER CARD
========================================================================== */

.provider-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}

.provider-card {
    padding: 14px;

    background: #292a2c;

    border: 1px solid #38393c;
    border-radius: 10px;
}

.provider-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
}

.provider-card strong {
    color: #fff;

    font-size: 12px;
}

.provider-card small {
    color: #85878b;

    font-size: 9px;
}

.provider-indicator {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #5fe58b;

    box-shadow:
        0 0 0 4px rgba(95,229,139,.08);
}

.provider-indicator.offline {
    background: #ff7070;

    box-shadow:
        0 0 0 4px rgba(255,112,112,.08);
}


/* ==========================================================================
   CHART
========================================================================== */

.admin-chart {
    width: 100%;
    min-height: 280px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #252629;

    border: 1px solid #303134;
    border-radius: 10px;

    color: #77797d;

    font-size: 11px;
}


/* ==========================================================================
   RESPONSIVE
========================================================================== */

@media (max-width: 1000px) {

    .admin-layout {
        grid-template-columns: 185px minmax(0, 1fr);
    }

    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .provider-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .admin-page {
        padding-top: 18px;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;

        display: grid;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 5px;

        padding: 8px;
    }

    .admin-sidebar-title,
    .admin-sidebar .sidebar-divider {
        display: none;
    }

    .admin-sidebar a {
        justify-content: center;

        min-height: 37px;

        padding: 0 5px;

        font-size: 9px;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-title h1 {
        font-size: 20px;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-toolbar-left,
    .admin-toolbar-right {
        width: 100%;
    }

    .admin-search {
        width: 100%;
    }

    .admin-filter {
        flex: 1;
    }

    .admin-form {
        grid-template-columns: 1fr;
    }

    .admin-form-group.full {
        grid-column: auto;
    }

    .provider-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {

    .admin-stats {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .admin-stat {
        padding: 12px;
    }

    .admin-stat strong {
        font-size: 16px;
    }

    .admin-stat-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 7px;
    }

    .admin-card-header {
        min-height: 50px;
        padding: 0 12px;
    }

    .admin-card-body {
        padding: 12px;
    }

}