﻿/*========================================

Coffee Control Admin
Designed By Masood Rajabi

========================================*/

.admin-page {
    background: var(--bg);
    color: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
}

/*==============================*/

.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/*==============================*/

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 35px 25px;
    border-left: 1px solid var(--line);
    background: linear-gradient( 180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: sidebarReveal .9s var(--ease);
}

/*==============================*/

.sidebar-top {
    text-align: center;
}

/*==============================*/

.coffee-logo {
    width: 82px;
    height: 82px;
    margin: auto;
    color: var(--gold);
}

    .coffee-logo svg {
        width: 100%;
    }

/*==============================*/

.steam {
    animation: steamMove 5s infinite;
}

/*==============================*/

.sidebar h2 {
    margin-top: 18px;
    font-size: 1.3rem;
}

.sidebar span {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,.55);
    font-size: .82rem;
}

/*==============================*/

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    /*==============================*/

    .sidebar nav a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 15px 18px;
        border-radius: 16px;
        transition: .45s var(--ease);
        color: rgba(255,255,255,.7);
        border: 1px solid transparent;
        position: relative;
        overflow: hidden;
    }

        /*==============================*/

        .sidebar nav a svg {
            width: 22px;
            height: 22px;
        }

        /*==============================*/

        .sidebar nav a::before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient( 90deg, transparent, rgba(197,138,70,.15), transparent);
            transform: translateX(100%);
            transition: .6s;
        }

        /*==============================*/

        .sidebar nav a:hover {
            color: var(--gold);
            border-color: rgba(197,138,70,.25);
            transform: translateX(-8px);
            box-shadow: 0 0 30px rgba(197,138,70,.08);
        }

            /*==============================*/

            .sidebar nav a:hover::before {
                transform: translateX(-100%);
            }

        /*==============================*/

        .sidebar nav a.active {
            color: var(--gold);
            background: rgba(197,138,70,.08);
        }

/*==============================*/

.admin-content {
    padding: 45px;
}

/*==============================*/

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    animation: fadeDown .8s var(--ease);
}

/*==============================*/

.admin-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .admin-user strong {
        display: block;
        font-size: 1rem;
    }

    .admin-user span {
        color: rgba(255,255,255,.5);
        font-size: .82rem;
    }

/*==============================*/

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 22px;
    margin-bottom: 35px;
}

/*==============================*/

.stat-card {
    position: relative;
    overflow: hidden;
    transition: .45s var(--ease);
}

    /*==============================*/

    .stat-card::before {
        content: "";
        position: absolute;
        width: 160px;
        height: 160px;
        border-radius: 50%;
        background: radial-gradient( rgba(197,138,70,.25), transparent);
        top: -70px;
        left: -70px;
        transition: .6s;
    }

    /*==============================*/

    .stat-card:hover {
        transform: translateY(-10px);
        border-color: rgba(197,138,70,.35);
        box-shadow: 0 18px 45px rgba(0,0,0,.45), 0 0 40px rgba(197,138,70,.12);
    }

        /*==============================*/

        .stat-card:hover::before {
            transform: scale(1.35);
        }

/*==============================*/

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 8px;
}

/*==============================*/

.stat-title {
    color: rgba(255,255,255,.65);
}

/*==============================*/

.search-box {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    margin-bottom: 35px;
}

/*==============================*/

.search-icon {
    width: 22px;
    color: var(--gold);
}

    .search-icon svg {
        width: 100%;
    }

/*==============================*/

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
}

/*==============================*/

.search-line {
    position: absolute;
    bottom: 18px;
    right: 30px;
    left: 30px;
    height: 2px;
    background: linear-gradient( 90deg, transparent, var(--gold), transparent);
    transform: scaleX(0);
    transition: .45s var(--ease);
}

/*==============================*/

.search-box:focus-within .search-line {
    transform: scaleX(1);
}

/*==============================*/

@keyframes sidebarReveal {

    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/*==============================*/

@keyframes fadeDown {

    from {
        opacity: 0;
        transform: translateY(-30px);
        filter: blur(12px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/*==============================*/

@keyframes steamMove {

    0%,100% {
        opacity: .2;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/*==================================================
TABLE
==================================================*/

.table-wrapper {
    padding: 0;
    overflow: hidden;
    animation: tableReveal .9s .35s both var(--ease);
}

.message-table {
    width: 100%;
    border-collapse: collapse;
}

    .message-table thead {
        background: rgba(255,255,255,.02);
    }

    .message-table th {
        padding: 22px 18px;
        color: var(--gold);
        font-weight: 600;
        text-align: right;
        border-bottom: 1px solid var(--line);
    }

    .message-table td {
        padding: 22px 18px;
        border-bottom: 1px solid rgba(255,255,255,.05);
        transition: .35s var(--ease);
    }

.message-row {
    position: relative;
    transition: .4s var(--ease);
}

    .message-row::before {
        content: "";
        position: absolute;
        right: 0;
        top: 10px;
        bottom: 10px;
        width: 3px;
        border-radius: 20px;
        background: var(--gold);
        transform: scaleY(0);
        transition: .35s;
    }

    .message-row:hover {
        background: rgba(255,255,255,.03);
        transform: translateX(-8px);
        box-shadow: 0 10px 35px rgba(0,0,0,.28);
    }

        .message-row:hover::before {
            transform: scaleY(1);
        }

.description {
    max-width: 500px;
    line-height: 2;
    color: rgba(255,255,255,.7);
}

/*==================================================
SORT
==================================================*/

.sortable {
    cursor: pointer;
    user-select: none;
}

.sort-icon {
    display: inline-flex;
    margin-right: 8px;
    width: 16px;
    color: rgba(255,255,255,.4);
    transition: .35s;
}

.sortable:hover .sort-icon {
    color: var(--gold);
}

/*==================================================
DELETE BUTTON
==================================================*/

.delete-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .35s;
}

    .delete-btn svg {
        width: 22px;
        color: var(--gold);
        transition: .4s;
    }

    .delete-btn:hover {
        background: rgba(255,255,255,.03);
    }

        .delete-btn:hover svg {
            color: #ff5757;
            transform: rotate(-10deg) scale(1.15);
        }

/*==================================================
MODAL
==================================================*/

.delete-modal {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: .4s;
    z-index: 999;
}

    .delete-modal.show {
        opacity: 1;
        visibility: visible;
    }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
}

.modal-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%) scale(.85);
    width: min(420px,90vw);
    padding: 35px;
    text-align: center;
    transition: .4s var(--ease);
}

.delete-modal.show .modal-box {
    transform: translate(-50%,-50%) scale(1);
}

.modal-coffee {
    width: 70px;
    margin: 0 auto 25px;
    color: var(--gold);
}

    .modal-coffee svg {
        width: 100%;
    }

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

    .modal-buttons button {
        flex: 1;
    }

.modal-cancel {
    border: 1px solid var(--line);
    background: none;
    color: white;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: .35s;
}

    .modal-cancel:hover {
        border-color: var(--gold);
        color: var(--gold);
    }
.sidebar {
    transition: .45s;
}

    .sidebar.closed {
        width: 80px;
        padding: 25px 15px;
    }

        .sidebar.closed h2,
        .sidebar.closed span,
        .sidebar.closed a {
            font-size: 0;
        }

        .sidebar.closed svg {
            margin: auto;
        }

.admin-layout {
    transition: .45s;
}

    .admin-layout.sidebar-close {
        grid-template-columns: 80px 1fr;
    }
.mobile-messages {
    display: none;
}
@media(max-width:900px) {

    .table-wrapper {
        display: none;
    }

    .mobile-messages {
        display: grid;
        gap: 18px;
    }
    .mobile-none{
        display: none ;
    }
    .delete-btn{
        display: none;
    }
    .search-box{
        display:none ;
    }

}
@media(max-width:1100px) {

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        right: 0;
        width: 270px;
        z-index: 999;
        transform: translateX(0);
    }

        .sidebar.closed {
            transform: translateX(100%);
        }

    .admin-content {
        padding: 25px;
    }
}
.sidebar {
    transition: width .45s, transform .45s, padding .45s;
}

    .sidebar nav a {
        transition: background .3s, transform .3s, padding .3s;
    }
    .sidebar.closed h2,
    .sidebar.closed .sidebar-top > span {
        opacity: 0;
        visibility: hidden;
        height: 0;
        margin: 0;
    }

    .sidebar.closed nav a {
        justify-content: center;
        padding: 16px 0;
    }

        .sidebar.closed nav a svg {
            width: 24px;
            height: 24px;
            margin: 0;
            margin-right: 10px;
        }

    .sidebar.closed nav a {
        font-size: 0;
    }

    .sidebar.closed .coffee-logo {
        width: auto;
    }

        .sidebar.closed nav a span {
            opacity: 0;
            width: 0;
            overflow: hidden;
            transition: .3s;
        }
.sidebar-toggle {
    height: 40px;
    width: 40px;
}

.admin-content {
    padding: 45px;
    width: 100vw;
}


.mobile-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

    .mobile-top h4 {
        margin: 0;
        font-size: 16px;
        font-weight: 700;
    }

.mobile-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.8;
}

    .mobile-item .title {
        min-width: 90px;
        font-weight: 700;
        color: var(--primary-color);
    }

    .mobile-item p {
        margin: 0;
        word-break: break-word;
    }