* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        Arial,
        sans-serif;

    background:
        linear-gradient(to bottom,
            #f8fafc,
            #eef2ff);

    color: #0f172a;

    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    border: none;
    outline: none;
    font-family: inherit;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;

    background:
        rgba(255, 255, 255, .75);

    backdrop-filter:
        blur(18px);

    border:
        1px solid rgba(255, 255, 255, .7);

    border-radius: 32px;

    padding: 36px;

    box-shadow:
        0 20px 60px rgba(99, 102, 241, .12);
}

.login-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.form-input {
    width: 100%;
    height: 58px;

    background: white;

    border:
        1px solid #dbeafe;

    border-radius: 18px;

    padding: 0 18px;

    font-size: 15px;

    transition: .2s;
}

.form-input:focus {
    border-color: #818cf8;

    box-shadow:
        0 0 0 4px rgba(99, 102, 241, .12);
}

.login-btn {
    width: 100%;
    height: 58px;

    border-radius: 18px;

    background:
        linear-gradient(135deg,
            #6366f1,
            #8b5cf6);

    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: .25s;

    box-shadow:
        0 10px 25px rgba(99, 102, 241, .25);
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-message {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;

    background:
        rgba(255, 255, 255, .75);

    backdrop-filter:
        blur(18px);

    border-right:
        1px solid rgba(148, 163, 184, .15);

    padding: 24px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 40px;

    background:
        linear-gradient(135deg,
            #6366f1,
            #8b5cf6);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-link {
    height: 54px;

    display: flex;
    align-items: center;

    padding: 0 18px;

    border-radius: 18px;

    color: #475569;

    font-weight: 600;

    transition: .2s;
}

.sidebar-link:hover {
    background: #eef2ff;
    color: #4338ca;
}

.main-content {
    flex: 1;
    padding: 34px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 34px;
    font-weight: 800;
}

.card-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit,
            minmax(240px, 1fr));

    gap: 22px;
}

.stat-card {
    background: white;

    border-radius: 28px;

    padding: 28px;

    border:
        1px solid #e2e8f0;

    box-shadow:
        0 10px 40px rgba(148, 163, 184, .12);
}

.stat-title {
    color: #64748b;
    margin-bottom: 14px;
    font-weight: 600;
}

.stat-value {
    font-size: 38px;
    font-weight: 800;
    color: #4338ca;
}

.logout-btn {
    background: #ef4444;
    color: white;

    padding: 14px 20px;

    border-radius: 16px;

    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;

    background: white;

    border-radius: 28px;

    overflow: hidden;
}

.table-wrapper table {

    min-width: 1100px;

    box-shadow:
        0 10px 40px rgba(148, 163, 184, .12);
}

table th {
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}

table th,
table td {
    padding: 18px;
    text-align: left;

    border-bottom:
        1px solid #f1f5f9;
}

.product-thumb {
    width: 78px;
    height: 78px;

    object-fit: cover;

    border-radius: 18px;
}

.market-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;

    border-radius: 999px;

    background: #eef2ff;

    color: #4338ca;

    font-size: 13px;
    font-weight: 700;
}

.action-btn {
    padding: 11px 16px;

    border-radius: 14px;

    color: white;

    cursor: pointer;

    font-weight: 700;

    transition: .2s;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.feature-btn {
    background: #6366f1;
}

.edit-btn {
    background: #0ea5e9;
}

.delete-btn {
    background: #ef4444;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.viewer-page {
    width: 100%;
    min-height: 100vh;

    padding: 40px 20px;
}

.viewer-container {
    width: 100%;
    max-width: 820px;
    margin: auto;
}

.viewer-logo {

    font-family:
        'Plus Jakarta Sans',
        sans-serif;

    font-size: 28px;

    font-weight: 800;

    letter-spacing:
        -1px;

    background:
        linear-gradient(135deg,
            #4338ca,
            #7c3aed);

    -webkit-background-clip: text;

    -webkit-text-fill-color:
        transparent;

    margin-bottom: 8px;

    line-height: 1.1;
}

.viewer-subtitle {

    color: #64748b;

    margin-bottom: 34px;

    font-size: 15px;

    font-weight: 500;
}

.search-box {
    margin-bottom: 28px;
}

.search-input {
    width: 100%;
    height: 64px;

    background: white;

    border:
        1px solid #dbeafe;

    border-radius: 22px;

    padding: 0 22px;

    font-size: 16px;

    box-shadow:
        0 10px 30px rgba(148, 163, 184, .10);
}

.search-input:focus {
    border-color: #818cf8;

    box-shadow:
        0 0 0 5px rgba(99, 102, 241, .10);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.viewer-card {
    background:
        rgba(255, 255, 255, .82);

    backdrop-filter:
        blur(18px);

    border:
        1px solid rgba(255, 255, 255, .9);

    border-radius: 30px;

    padding: 16px;

    display: flex;
    gap: 18px;

    transition: .25s;

    box-shadow:
        0 12px 40px rgba(148, 163, 184, .12);
}

.viewer-card:hover {
    transform:
        translateY(-5px);

    box-shadow:
        0 18px 50px rgba(99, 102, 241, .18);
}

.viewer-thumb {
    width: 140px;
    height: 140px;

    object-fit: cover;

    border-radius: 24px;
}

.viewer-info {
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.viewer-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
}

.viewer-price {
    color: #4338ca;

    font-size: 24px;
    font-weight: 900;

    margin: 12px 0;
}

.viewer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-badge {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

    color: #334155;

    padding: 8px 12px;

    border-radius: 999px;

    font-size: 13px;

    font-weight: 700;
}

.store-badge img {

    width: 18px;

    height: 18px;

    object-fit: contain;

    flex-shrink: 0;
}

.viewer-code {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.modal {
    position: fixed;
    inset: 0;

    background:
        rgba(15, 23, 42, .45);

    backdrop-filter: blur(8px);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 999;
}

.modal-content {
    width: 100%;
    max-width: 560px;

    background: white;

    border-radius: 30px;

    padding: 30px;

    box-shadow:
        0 25px 70px rgba(15, 23, 42, .18);
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
}

.skeleton-table {
    width: 100%;
    height: 320px;

    border-radius: 28px;

    background:
        linear-gradient(90deg,
            #f1f5f9 25%,
            #e2e8f0 50%,
            #f1f5f9 75%);

    background-size: 200% 100%;

    animation: skeleton 1.2s infinite;
}

.toast {
    position: fixed;

    top: 30px;
    right: 30px;

    padding: 16px 22px;

    border-radius: 18px;

    color: white;

    font-weight: 700;

    z-index: 99999;

    animation: toast .25s ease;
}

.success {
    background: #22c55e;
}

.error {
    background: #ef4444;
}

.preview-image {
    cursor: pointer;
}

.image-modal {
    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        rgba(15, 23, 42, .72);

    backdrop-filter:
        blur(10px);

    z-index: 99999;

    opacity: 0;

    visibility: hidden;

    transition: .25s;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-overlay {
    position: absolute;
    inset: 0;
}

.image-modal-content {
    position: relative;

    width: auto;

    max-width: 700px;

    width: 100%;

    max-height: 88vh;

    object-fit: contain;

    border-radius: 32px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, .35);

    animation:
        imageZoom .25s ease;
}

.collection-wrapper {

    position: relative;

    margin-bottom: 26px;
}

.collection-hint {

    position: absolute;

    right: 0;
    top: 50%;

    transform:
        translateY(-50%);

    z-index: 5;

    padding:
        10px 14px 10px 26px;

    transition:
        .4s ease;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 700;

    color: #6366f1;

    background:
        linear-gradient(to right,
            rgba(248, 250, 252, 0),
            rgba(248, 250, 252, .96) 35%);

    pointer-events: none;

    animation:
        swipeHint 1.8s infinite;
}

.collection-scroll {
    display: flex;

    gap: 12px;

    overflow: auto;

    margin-bottom: 26px;

    padding-bottom: 6px;

    animation:
        autoSwipe 3s ease-in-out 5;
}

.collection-scroll::-webkit-scrollbar {
    display: none;
}

.collection-chip {
    border: none;

    min-width: max-content;

    padding: 13px 18px;

    border-radius: 999px;

    background: white;

    color: #475569;

    font-weight: 700;

    cursor: pointer;

    transition: .2s;

    box-shadow:
        0 6px 20px rgba(148, 163, 184, .12);
}

.collection-chip:hover {
    transform: translateY(-2px);
}

.active-chip {
    background:
        linear-gradient(135deg,
            #6366f1,
            #8b5cf6);

    color: white;
}

.table-toolbar {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 24px;

    flex-wrap: wrap;
}

.table-search {

    flex: 1;

    min-width: 260px;
}

.table-limit {

    display: flex;

    gap: 12px;

    align-items: center;
}

.table-wrapper {

    width: 100%;

    overflow: auto;

    max-height: 720px;

    border-radius: 28px;

    box-shadow:
        0 10px 40px rgba(148, 163, 184, .12);
}

.table-wrapper::-webkit-scrollbar {

    height: 10px;
    width: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {

    background: #cbd5e1;

    border-radius: 999px;
}

.table-wrapper table {

    min-width: 1100px;
}

@keyframes swipeHint {

    0% {
        transform:
            translateY(-50%) translateX(0);
    }

    50% {
        transform:
            translateY(-50%) translateX(-6px);
    }

    100% {
        transform:
            translateY(-50%) translateX(0);
    }
}

@keyframes autoSwipe {

    0% {
        transform:
            translateX(0);
    }

    25% {
        transform:
            translateX(-18px);
    }

    50% {
        transform:
            translateX(0);
    }

    75% {
        transform:
            translateX(-10px);
    }

    100% {
        transform:
            translateX(0);
    }
}

@keyframes imageZoom {

    from {
        transform:
            scale(.9);

        opacity: 0;
    }

    to {
        transform:
            scale(1);

        opacity: 1;
    }
}

@keyframes toast {
    from {
        transform:
            translateY(-20px);

        opacity: 0;
    }

    to {
        transform:
            translateY(0);

        opacity: 1;
    }
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media(max-width:768px) {

    .dashboard {
        flex-direction: column;
        padding-bottom: 90px;
    }

    .sidebar {

        position: fixed;

        bottom: 0;
        left: 0;

        width: 100%;

        height: 78px;

        padding: 10px 14px;

        z-index: 99999;

        background:
            rgba(255, 255, 255, .92);

        backdrop-filter:
            blur(18px);

        border-top:
            1px solid rgba(148, 163, 184, .18);

        border-right: none;
    }

    .logo {
        display: none;
    }

    .sidebar-menu {

        width: 100%;

        flex-direction: row;

        justify-content: space-between;

        align-items: center;

        gap: 8px;
    }

    .sidebar-link {

        flex: 1;

        height: 58px;

        border-radius: 18px;

        display: flex;

        align-items: center;
        justify-content: center;

        font-size: 0;

        position: relative;

        transition: .2s;
    }

    .sidebar-link::before {

        font-size: 24px;
    }

    .sidebar-link[href="index.php"]::before {
        content: "🏠";
    }

    .sidebar-link[href="products.php"]::before {
        content: "🛍️";
    }

    .sidebar-link[href="featured.php"]::before {
        content: "🔥";
    }

    .sidebar-link[href="collections.php"]::before {
        content: "📂";
    }

    .sidebar-link[href="profile.php"]::before {
        content: "👤";
    }

    .sidebar-link[href="../index.php"]::before {
        content: "👀";
    }

    .sidebar-link[href="../logout.php"]::before {
        content: "🚪";
    }

    .sidebar-link:hover {

        background: #eef2ff;

        transform: translateY(-2px);
    }

    .sidebar-link:hover {

        background: #eef2ff;

        color: #4338ca;
    }

    .main-content {
        padding: 20px;
    }

    .viewer-card {
        flex-direction: row;

        align-items: center;

        padding: 14px;

        gap: 14px;

        border-radius: 24px;
    }

    .viewer-thumb {
        width: 92px;
        min-width: 92px;

        height: 92px;

        border-radius: 18px;
    }

    .viewer-info {
        min-width: 0;
    }

    .viewer-name {
        font-size: 15px;

        line-height: 1.5;

        display: -webkit-box;

        -webkit-line-clamp: 2;

        -webkit-box-orient: vertical;

        overflow: hidden;
    }

    .viewer-price {
        font-size: 18px;

        margin: 8px 0;
    }

    .viewer-bottom {
        gap: 10px;
    }

    .store-badge {
        padding: 7px 12px;

        font-size: 11px;
    }

    .viewer-code {
        font-size: 11px;
    }

    .viewer-logo {
        font-size: 22px;
    }

    .page-title {
        font-size: 28px;
    }

    .image-modal {
        padding: 22px;
    }

    .image-modal-content {
        border-radius: 24px;
    }
}