/* =====================================
   Global
===================================== */

body {
    background-color: #0f1115;
    color: #f5f5f5;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}


/* =====================================
   Navigation
===================================== */

nav {
    background-color: #171b22;
    border-bottom: 2px solid #1fc8ff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.site-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
}
.site-logo:hover {

    transform: scale(1.05);
}

nav a {
    color: #f5f5f5;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

nav a:hover {
    color: #1fc8ff;
}


.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    background-color: #171b22;
    color: #f5f5f5;
    border: 1px solid #232833;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: bold;
    cursor: pointer;
}

.admin-dropdown-button {
    border-color: #1fc8ff;
    color: #1fc8ff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #171b22;
    min-width: 190px;
    border: 1px solid #232833;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
    z-index: 999;
    overflow: hidden;
}

.dropdown-content a {
    color: #f5f5f5;
    padding: 12px 14px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #1fc8ff;
    color: #000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.feedback-nav-button {
    background-color: #39ff14 !important;
    color: #000 !important;
    font-weight: bold;
}

/* =====================================
   Main Content
===================================== */

main {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 20px;
    box-sizing: border-box;
}

body:has(.admin-page) main {
    max-width: 98%;
}


/* =====================================
   Flash Messages
===================================== */

.flash {
    background-color: #171b22;
    border-left: 4px solid #1fc8ff;
    padding: 12px;
    margin: 15px;
    border-radius: 8px;
}


/* =====================================
   Forms
===================================== */

form {
    margin-bottom: 20px;
}

input,
select,
button {
    background-color: #171b22;
    color: #f5f5f5;
    border: 1px solid #232833;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
}

button {
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background-color: #1fc8ff;
    color: #000;
}

textarea {
    width: 100%;
    min-height: 90px;
    background-color: #171b22;
    color: #f5f5f5;
    border: 1px solid #232833;
    border-radius: 8px;
    padding: 10px;
    resize: vertical;
}


/* =====================================
   Video Cards
===================================== */

.video-card {
    max-width: 850px;
    margin: 30px auto;
    background-color: #171b22;
    border: 1px solid #232833;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}


/* =====================================
   Video Titles
===================================== */

.video-card h2 {
    padding: 15px;
    margin: 0;
    font-size: 24px;
    text-align: center;
}

.watch-title {
    text-align: center;
    margin-bottom: 25px;
    color: #f5f5f5;
}


/* =====================================
   Timeline Thumbnails
===================================== */

.video-card img {
    max-width: 450px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    transition: 0.2s;
}

.video-card img:hover {
    opacity: 0.92;
}


/* =====================================
   Profile Pictures
===================================== */

.profile-picture,
.video-card img.profile-picture {
    width: 180px;
    height: 180px;
    max-width: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1fc8ff;
    display: block;
    margin: 0 auto;
}


/* =====================================
   Metadata
===================================== */

.video-card p {
    padding-left: 15px;
    color: #9da3af;
}


/* =====================================
   Video Player
===================================== */

video {
    width: auto;
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    background-color: black;
}

.watch-video {
    display: block;
    max-width: 700px;
    width: 100%;
    max-height: 70vh;
    margin: 0 auto;
}


/* =====================================
   Pagination
===================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.pagination a {
    color: #1fc8ff;
    text-decoration: none;
    font-weight: bold;
}


/* =====================================
   Comments
===================================== */

.comment {
    border-bottom: 1px solid #232833;
    padding: 14px 0;
}

.comment-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-body {
    flex: 1;
}

.comment-pfp {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.reply-toggle {
    margin-top: 6px;
    font-size: 12px;
    padding: 3px 8px;
}

.comment-replies {
    margin-left: 54px;
    margin-top: 10px;
    border-left: 2px solid #1fc8ff;
    padding-left: 14px;
}

.reply-comment {
    background: transparent;
    border-radius: 0;
    padding: 10px 0;
    margin-bottom: 5px;
}

.reply-comment .comment-main {
    display: flex;
    gap: 10px;
}


/* =====================================
   Admin Tables
===================================== */

.admin-page {
    width: 100%;
    max-width: 1900px;
    margin: 0 auto;
}

.admin-table-wrapper {
    width: 100%;
    background-color: #171b22;
    border: 1px solid #232833;
    border-radius: 12px;
    padding: 10px;
    box-sizing: border-box;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #232833;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-table th {
    color: #1fc8ff;
    font-weight: bold;
}

.admin-table tr:hover {
    background-color: #1f2530;
}

.admin-user-pfp,
.admin-user-pfp-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1fc8ff;
}

.admin-user-pfp-placeholder {
    background-color: #232833;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #1f2530;
}


/* =====================================
   Subscribe / Notices
===================================== */

.subscribe-banner {
    background-color: #171b22;
    border: 1px solid #1fc8ff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.notice {
    background-color: #171b22;
    border-left: 4px solid #39ff14;
    padding: 12px;
    border-radius: 8px;
    color: #f5f5f5;
}


/* =====================================
   Dashboard
===================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(180px, 1fr)
    );
    gap: 18px;
    margin: 25px 0;
}

.dashboard-card {
    background-color: #171b22;
    border: 1px solid #232833;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.dashboard-card h2 {
    color: #1fc8ff;
    font-size: 34px;
    margin: 0;
}

.dashboard-card p {
    color: #9da3af;
    margin-bottom: 0;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}


/* =====================================
   Responsive
===================================== */

@media (max-width: 768px) {
    main {
        padding: 10px;
    }

    .video-card h2 {
        font-size: 20px;
    }

    nav {
        flex-wrap: wrap;
    }

    .video-card img {
        max-width: 100%;
    }

    video,
    .watch-video {
        max-height: 65vh;
    }
}

.view-count {
    display: inline-block;
    margin-left: 10px;
    padding: 10px;
    border: 1px solid #232833;
    border-radius: 8px;
    color: #9da3af;
}

.admin-content-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #1fc8ff;
}

.admin-table {
    table-layout: fixed;
}

.admin-table td,
.admin-table th {
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-table td:nth-child(1),
.admin-table th:nth-child(1) {
    width: 50px;
}

.admin-table td:nth-child(2),
.admin-table th:nth-child(2) {
    width: 90px;
}

.admin-table td:nth-child(3),
.admin-table th:nth-child(3) {
    width: 280px;
}

.admin-table td:nth-child(4),
.admin-table th:nth-child(4),
.admin-table td:nth-child(5),
.admin-table th:nth-child(5) {
    width: 230px;
}

.admin-table td:nth-child(6),
.admin-table th:nth-child(6),
.admin-table td:nth-child(7),
.admin-table th:nth-child(7) {
    width: 70px;
}

.admin-table td:nth-child(8),
.admin-table th:nth-child(8) {
    width: 170px;
}

.admin-table td:nth-child(9),
.admin-table th:nth-child(9) {
    width: 70px;
}

.danger-button {
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.danger-button:hover {
    background-color: #ff4d4d;
    color: #000;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 35px 0 15px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination-current {
    min-width: 36px;
    text-align: center;
    padding: 9px 12px;
    border: 1px solid #232833;
    border-radius: 8px;
    text-decoration: none;
    color: #f5f5f5;
    background-color: #171b22;
}

.pagination a:hover {
    background-color: #1fc8ff;
    color: #000;
}

.pagination-current {
    background-color: #1fc8ff;
    color: #000;
    font-weight: bold;
}

.page-jump-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0 40px 0;
    flex-wrap: wrap;
}

.page-jump-form input[type="number"] {
    width: 90px;
}

.feedback-nav-button {
    background-color: #39ff14;
    color: #000 !important;
    padding: 8px 14px;
    border-radius: 8px;
}

.feedback-nav-button:hover {
    background-color: #1fc8ff;
    color: #000 !important;
}

.admin-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-search-form input {
    flex: 1;
    min-width: 280px;
}

.upload-progress-bar {
    width: 100%;
    height: 24px;
    background-color: #232833;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1fc8ff;
}

#upload-progress-fill {
    width: 0%;
    height: 100%;
    background-color: #1fc8ff;
    transition: width 0.2s;
}

#upload-percent {
    color: #1fc8ff;
    font-weight: bold;
}

#upload-note {
    color: #9da3af;
    font-size: 14px;
}

.video-card img.comment-pfp,
.comment-pfp {
    width: 45px !important;
    height: 45px !important;
    max-width: 45px !important;
    min-width: 45px !important;
    max-height: 45px !important;
    min-height: 45px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #1fc8ff;
    display: block;
    margin: 0;
    flex-shrink: 0;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(240px, 1fr)
    );
    gap: 20px;
    margin-top: 25px;
}

.product-card {
    background-color: #171b22;
    border: 1px solid #232833;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.35);
}

.product-image,
.product-placeholder {
    width: 100%;
    max-width: 220px;
    height: 220px;
    margin: 0 auto 15px auto;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #1fc8ff;
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9da3af;
    background-color: #232833;
}

.product-price {
    color: #39ff14;
    font-weight: bold;
    font-size: 20px;
}

.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gallery-arrow {
    font-size: 22px;
    padding: 8px 12px;
}

.product-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 15px 0;
    flex-wrap: wrap;
}

.product-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #1fc8ff;
    cursor: pointer;
    opacity: 0.8;
}

.product-thumb:hover {
    opacity: 1;
}

.store-buy-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.store-buy-form input {
    width: 70px;
}

.product-price-breakdown {
    background-color: #0f1115;
    border: 1px solid #232833;
    border-radius: 10px;
    padding: 10px;
    margin: 12px 0;
}

.product-price-breakdown p {
    padding-left: 0 !important;
    margin: 5px 0;
    color: #9da3af;
}

.shipping-note {
    color: #9da3af;
    padding-left: 0 !important;
    text-align: center;
}

.password-reset-notice {
    border-left: 4px solid #ffcc00;
    background-color: #2a2412;
}

.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.subscription-card {
    background: #111827;
    border: 1px solid #222;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.subscription-card h2 {
    margin-bottom: 10px;
}

.price {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.plan-save {
    color: #7CFC00;
    font-weight: bold;
    margin-top: 10px;
}

.plan-description {
    margin-top: 15px;
    min-height: 60px;
    color: #bbb;
}

.subscription-button {
    margin-top: 15px;
}

.comment-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.reply-toggle {
    margin-top: 6px;
    font-size: 12px;
    padding: 4px 8px;
}

.reply-form {
    margin-top: 10px;
}

.comment-replies {
    margin-left: 55px;
    margin-top: 12px;
    border-left: 2px solid #1fc8ff;
    padding-left: 15px;
}

.reply-comment {
    background-color: #111827;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
}

.tip-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.pfp-placeholder {
    background: #232833;
    border: 2px solid #1fc8ff;
}

.username-member {
    color: #dbeafe;
    font-weight: bold;
}

.username-moderator {
    color: #1fc8ff;
    font-weight: bold;
}

.username-admin {
    color: #ff5555;
    font-weight: bold;
}

.tip-user-section {
    margin-top: 20px;
}

.tip-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.tip-pfp {
    width: 42px;
    height: 42px;

    border-radius: 50%;
    object-fit: cover;

    border: 2px solid #2bc1ff;

    flex-shrink: 0;
}

.pfp-placeholder {
    background: #232833;
}

.thumbnail-picker-video {
    display: block;
    width: 100%;
    max-width: 650px;
    max-height: 650px;
    margin: 15px auto;
    background: #000;
    border-radius: 10px;
}

#thumbnail-picker-form {
    text-align: center;
    margin-bottom: 20px;
}

/* =====================================
   Store Layout
   ===================================== */

.store-page,
.store-cart-page {
    width: min(1400px, calc(100% - 32px));
    margin: 32px auto 80px;
}

.store-header,
.store-cart-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.store-header h1,
.store-cart-page-header h1 {
    margin: 0 0 8px;
}

.store-header p,
.store-cart-page-header p {
    margin: 0;
    opacity: 0.8;
}

.store-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}


/* =====================================
   Product Grid
   ===================================== */

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(280px, 1fr)
    );
    gap: 22px;
}

.store-product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #29313b;
    border-radius: 14px;
    background: #171c22;
}

.store-product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.store-product-content h2 {
    margin: 0 0 10px;
}

.store-product-price {
    margin: 0 0 14px;
    color: #67ff45;
    font-size: 1.25rem;
    font-weight: 700;
}

.store-product-description {
    flex: 1;
    line-height: 1.5;
}

.store-product-shipping {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #101419;
    color: #b8c8d8;
}


/* =====================================
   Product Images
   ===================================== */

.store-product-gallery {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 280px;
    background: #0b0e11;
}

.store-product-image {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: #0b0e11;
}

.store-product-placeholder {
    display: grid;
    place-items: center;
    height: 280px;
    background: #0b0e11;
    color: #77818c;
}

.store-gallery-arrow {
    width: 36px;
    height: 52px;
    border: 1px solid #35404c;
    border-radius: 8px;
    background: #171d24;
    color: white;
    cursor: pointer;
}

.store-product-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    background: #11161b;
}

.store-thumbnail-button {
    padding: 0;
    border: 1px solid #35404c;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.store-product-thumbnail {
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 5px;
    object-fit: cover;
}


/* =====================================
   Stock Status
   ===================================== */

.store-stock-status {
    margin: 12px 0 0;
    font-weight: 700;
}

.store-stock-available {
    color: #65e884;
}

.store-stock-low {
    color: #ffd166;
}

.store-stock-out {
    color: #ff6b6b;
}


/* =====================================
   Store Forms and Buttons
   ===================================== */

.store-add-form,
.store-cart-update-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.store-form-row {
    display: grid;
    gap: 7px;
}

.store-form-row label {
    font-weight: 700;
}

.store-form-row input,
.store-form-row select {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #34404c;
    border-radius: 8px;
    background: #101419;
    color: white;
}

.store-primary-button,
.store-secondary-button,
.store-danger-button,
.store-disabled-button,
.store-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.store-primary-button {
    width: 100%;
    border: 1px solid #38aef0;
    background: #1677ad;
    color: white;
}

.store-primary-button:hover {
    background: #1b8bc7;
}

.store-secondary-button {
    border: 1px solid #3b4856;
    background: #202731;
    color: white;
}

.store-danger-button {
    border: 1px solid #9c4242;
    background: #572727;
    color: white;
}

.store-disabled-button {
    width: 100%;
    border: 1px solid #444;
    background: #292929;
    color: #999;
    cursor: not-allowed;
}

.store-cart-button {
    position: relative;
    border: 1px solid #38aef0;
    background: #151c24;
    color: white;
}

.store-cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0 5px;
    border-radius: 999px;
    background: #38aef0;
    color: #071018;
    font-size: 0.85rem;
}


/* =====================================
   Cart Summary
   ===================================== */

.store-cart-summary,
.store-checkout-summary {
    position: sticky;
    top: 24px;
    padding: 20px;
    border: 1px solid #29313b;
    border-radius: 14px;
    background: #171c22;
}

.store-cart-summary h2,
.store-checkout-summary h2 {
    margin-top: 0;
}

.store-mini-cart-items {
    display: grid;
    gap: 12px;
}

.store-mini-cart-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #303944;
}

.store-mini-cart-item div {
    display: grid;
    gap: 4px;
}

.store-mini-cart-item small {
    opacity: 0.75;
}

.store-summary-lines {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.store-summary-lines > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.store-summary-total {
    padding-top: 14px;
    border-top: 1px solid #3a4652;
    font-size: 1.15rem;
    font-weight: 700;
}


/* =====================================
   Full Cart Page
   ===================================== */

.store-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.store-cart-items {
    display: grid;
    gap: 18px;
}

.store-cart-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 22px;
    padding: 20px;
    border: 1px solid #29313b;
    border-radius: 14px;
    background: #171c22;
}

.store-cart-item-image img,
.store-cart-image-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    object-fit: contain;
    background: #0b0e11;
}

.store-cart-image-placeholder {
    display: grid;
    place-items: center;
    color: #77818c;
}

.store-cart-item-details h2 {
    margin-top: 0;
}

.store-cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    text-align: right;
}

.store-cart-item-total strong {
    color: #67ff45;
    font-size: 1.2rem;
}

.store-cart-item-total small {
    opacity: 0.75;
}

.store-clear-cart-form {
    display: flex;
    justify-content: flex-end;
}

.store-checkout-note,
.store-empty-cart-text {
    opacity: 0.75;
    line-height: 1.5;
}

.store-empty-panel {
    padding: 36px;
    border: 1px solid #29313b;
    border-radius: 14px;
    background: #171c22;
    text-align: center;
}

.store-empty-panel .store-primary-button {
    width: auto;
    margin-top: 12px;
}


/* =====================================
   Store Mobile Layout
   ===================================== */

@media (max-width: 900px) {

    .store-layout,
    .store-cart-layout {
        grid-template-columns: 1fr;
    }

    .store-cart-summary,
    .store-checkout-summary {
        position: static;
    }

    .store-cart-item {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .store-cart-item-image img,
    .store-cart-image-placeholder {
        width: 110px;
        height: 110px;
    }

    .store-cart-item-total {
        grid-column: 1 / -1;
        align-items: flex-start;
        text-align: left;
    }

}


@media (max-width: 600px) {

    .store-page,
    .store-cart-page {
        width: min(100% - 20px, 1400px);
        margin-top: 20px;
    }

    .store-header,
    .store-cart-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .store-cart-button,
    .store-secondary-button {
        width: 100%;
    }

    .store-product-grid {
        grid-template-columns: 1fr;
    }

    .store-cart-item {
        grid-template-columns: 1fr;
    }

    .store-cart-item-image img,
    .store-cart-image-placeholder {
        width: 100%;
        height: 220px;
    }

}

/* =====================================
   Admin Store
   ===================================== */

.admin-store-page {
    width: min(1300px, calc(100% - 32px));
    margin: 32px auto 80px;
}

.admin-store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.admin-store-header h1 {
    margin: 0 0 8px;
}

.admin-store-header p {
    margin: 0;
    opacity: 0.75;
}

.admin-store-panel {
    margin-bottom: 26px;
    padding: 24px;
    border: 1px solid #29333d;
    border-radius: 14px;
    background: #171c22;
}

.admin-store-panel h2 {
    margin-top: 0;
}

.admin-store-form {
    display: grid;
    gap: 22px;
}

.admin-store-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-store-field {
    display: grid;
    gap: 7px;
}

.admin-store-field-wide {
    grid-column: 1 / -1;
}

.admin-store-field label {
    font-weight: 700;
}

.admin-store-field input,
.admin-store-field textarea,
.admin-store-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #34414d;
    border-radius: 8px;
    background: #101419;
    color: white;
}

.admin-store-field textarea {
    resize: vertical;
}

.admin-store-field small {
    opacity: 0.7;
}

.admin-store-options {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(230px, 1fr)
    );
    gap: 12px;
}

.admin-store-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #303b46;
    border-radius: 8px;
    background: #11161b;
    cursor: pointer;
}

.admin-store-checkbox input {
    width: 18px;
    height: 18px;
}

.admin-store-help,
.admin-store-alert {
    padding: 14px 16px;
    border-radius: 8px;
    background: #101419;
    line-height: 1.5;
}

.admin-store-help p {
    margin: 4px 0;
}

.admin-store-alert.warning {
    border: 1px solid #8f702e;
    background: #332b18;
    color: #ffe09a;
}

.admin-store-primary-button,
.admin-store-secondary-button,
.admin-store-danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    box-sizing: border-box;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.admin-store-primary-button {
    border: 1px solid #39aee8;
    background: #1579ad;
    color: white;
}

.admin-store-secondary-button {
    border: 1px solid #42505e;
    background: #222a33;
    color: white;
}

.admin-store-danger-button {
    border: 1px solid #a24848;
    background: #632d2d;
    color: white;
}

.admin-product-list {
    display: grid;
    gap: 16px;
}

.admin-product-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid #303b46;
    border-radius: 12px;
    background: #11161b;
}

.admin-product-image img,
.admin-product-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 9px;
    object-fit: contain;
    background: #090c0f;
}

.admin-product-placeholder {
    display: grid;
    place-items: center;
    color: #78838e;
}

.admin-product-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-product-title-row h3 {
    margin: 0;
}

.admin-product-id {
    opacity: 0.55;
    font-size: 0.85rem;
}

.admin-product-price {
    color: #67ef85;
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-product-badge {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-product-badge.success {
    background: #173b27;
    color: #78eda1;
}

.admin-product-badge.warning {
    background: #493b18;
    color: #ffdd78;
}

.admin-product-badge.danger {
    background: #492121;
    color: #ff8d8d;
}

.admin-product-badge.muted {
    background: #2a3037;
    color: #aab2bb;
}

.admin-product-stats {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(130px, 1fr)
    );
    gap: 12px;
    margin-top: 16px;
}

.admin-product-stats > div {
    display: grid;
    gap: 4px;
}

.admin-product-stats span {
    opacity: 0.65;
    font-size: 0.82rem;
}

.admin-product-gallery {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(180px, 1fr)
    );
    gap: 16px;
}

.admin-product-gallery-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #303b46;
    border-radius: 10px;
    background: #101419;
}

.admin-product-gallery-item img {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    object-fit: contain;
    background: #090c0f;
}

.admin-product-main-image-label {
    text-align: center;
    color: #74d7ff;
    font-weight: 700;
}

.admin-add-image-form {
    display: flex;
    align-items: end;
    gap: 16px;
    margin-top: 20px;
}

.admin-add-image-form .admin-store-field {
    flex: 1;
}

.admin-store-danger-zone {
    border-color: #713838;
}

.admin-store-danger-zone h2 {
    color: #ff8c8c;
}

@media (max-width: 800px) {

    .admin-store-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-store-field-wide {
        grid-column: auto;
    }

    .admin-product-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .admin-product-image img,
    .admin-product-placeholder {
        width: 100px;
        height: 100px;
    }

    .admin-product-actions {
        grid-column: 1 / -1;
    }

    .admin-product-actions a {
        width: 100%;
    }

}

@media (max-width: 550px) {

    .admin-store-page {
        width: calc(100% - 20px);
        margin-top: 20px;
    }

    .admin-store-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-store-header .admin-store-secondary-button {
        width: 100%;
    }

    .admin-product-card {
        grid-template-columns: 1fr;
    }

    .admin-product-image img,
    .admin-product-placeholder {
        width: 100%;
        height: 220px;
    }

    .admin-add-image-form {
        align-items: stretch;
        flex-direction: column;
    }

}

/* =====================================
   Store Checkout
   ===================================== */

.store-checkout-page {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 80px;
}

.store-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.store-checkout-header h1 {
    margin: 0 0 7px;
}

.store-checkout-header p {
    margin: 0;
    opacity: 0.72;
}

.store-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 24px;
    align-items: start;
}

.store-checkout-panel {
    padding: 24px;
    border: 1px solid #2d3944;
    border-radius: 15px;
    background: #171c22;
}

.store-checkout-panel h2 {
    margin: 0 0 22px;
}

.store-checkout-form,
.store-checkout-fields {
    display: grid;
    gap: 18px;
}

.store-checkout-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.store-checkout-field {
    display: grid;
    gap: 7px;
}

.store-checkout-field-wide {
    grid-column: 1 / -1;
}

.store-checkout-field label {
    font-weight: 700;
}

.store-checkout-field input,
.store-checkout-field select {
    width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #35434f;
    border-radius: 9px;
    background: #101419;
    color: white;
}

.store-checkout-field small {
    opacity: 0.67;
    line-height: 1.4;
}

.store-checkout-checkbox {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid #303c47;
    border-radius: 9px;
    background: #11161b;
    cursor: pointer;
}

.store-checkout-checkbox input {
    width: 18px;
    height: 18px;
}

.store-checkout-address-warning {
    grid-column: 1 / -1;
    padding: 15px 17px;
    border: 1px solid #80672d;
    border-radius: 10px;
    background: #302916;
    color: #ffe19a;
    line-height: 1.5;
}

.store-checkout-address-warning p {
    margin: 7px 0 0;
}

.store-checkout-paypal-placeholder {
    width: 100%;
    min-height: 50px;
    padding: 11px 18px;
    border: 1px solid #e3ae16;
    border-radius: 9px;
    background: #ffc439;
    color: #142c8e;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.store-checkout-payment-note {
    margin: 0;
    text-align: center;
    opacity: 0.62;
    font-size: 0.88rem;
}

.store-checkout-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    box-sizing: border-box;
    padding: 10px 16px;
    border: 1px solid #42505e;
    border-radius: 8px;
    background: #222a33;
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.store-checkout-summary {
    position: sticky;
    top: 24px;
}

.store-checkout-items {
    display: grid;
    gap: 15px;
}

.store-checkout-item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #2b353f;
}

.store-checkout-item-image {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 9px;
    background: #0c1014;
    font-size: 0.72rem;
    opacity: 0.8;
}

.store-checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-checkout-item-details {
    display: grid;
    gap: 4px;
}

.store-checkout-item-details span {
    opacity: 0.68;
    font-size: 0.86rem;
}

.store-checkout-item-total {
    white-space: nowrap;
}

.store-checkout-totals {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.store-checkout-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.store-checkout-discount strong {
    color: #79e99b;
}

.store-checkout-grand-total {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #3a4651;
    font-size: 1.18rem;
}

.store-checkout-grand-total strong {
    color: #71e890;
}

.store-checkout-secure-note {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    background: #101419;
    text-align: center;
    opacity: 0.72;
    font-size: 0.88rem;
}

@media (max-width: 900px) {

    .store-checkout-layout {
        grid-template-columns: 1fr;
    }

    .store-checkout-summary {
        position: static;
    }

}

@media (max-width: 600px) {

    .store-checkout-page {
        width: calc(100% - 20px);
        margin-top: 20px;
    }

    .store-checkout-header {
        align-items: stretch;
        flex-direction: column;
    }

    .store-checkout-secondary-button {
        width: 100%;
    }

    .store-checkout-fields {
        grid-template-columns: 1fr;
    }

    .store-checkout-field-wide,
    .store-checkout-checkbox,
    .store-checkout-address-warning {
        grid-column: auto;
    }

    .store-checkout-item {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .store-checkout-item-image {
        width: 60px;
        height: 60px;
    }

    .store-checkout-item-total {
        grid-column: 2;
    }

}

/* =====================================
   Customer Orders Page
   ===================================== */

.customer-orders-page {
    position: relative;

    width: calc(100vw - 60px) !important;
    max-width: 1100px !important;
    min-width: 0 !important;

    left: 50%;
    transform: translateX(-50%);

    margin: 0 !important;
    padding: 35px 0 70px;
}


/* =====================================
   Header
   ===================================== */

.customer-orders-page .store-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100% !important;
    max-width: none !important;

    margin: 0 0 20px;
}


/* =====================================
   Table Panel
   ===================================== */

.customer-orders-page .admin-table-wrapper {
    display: block;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    overflow-x: visible;

    border: 1px solid #303946;
    border-radius: 10px;
    background: #171c23;
}


/* =====================================
   Table
   ===================================== */

.customer-orders-page .admin-table {
    width: 100% !important;
    min-width: 0 !important;

    table-layout: auto;
    border-collapse: collapse;
}

.customer-orders-page .admin-table th,
.customer-orders-page .admin-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.customer-orders-page .admin-table th {
    color: #55c7ff;
    background: #1a2028;
    border-bottom: 1px solid #303946;
}

.customer-orders-page .admin-table td {
    border-bottom: 1px solid #29313c;
}

.customer-orders-page .admin-table tbody tr:last-child td {
    border-bottom: none;
}

.customer-orders-page .admin-table tbody tr:hover {
    background: #1d242d;
}


/* Items */
.customer-orders-page .admin-table th:nth-child(4),
.customer-orders-page .admin-table td:nth-child(4) {
    text-align: center;
}


/* Total */
.customer-orders-page .admin-table th:nth-child(5),
.customer-orders-page .admin-table td:nth-child(5) {
    text-align: right;
}


/* Open */
.customer-orders-page .admin-table th:last-child,
.customer-orders-page .admin-table td:last-child {
    text-align: center;
}


/* =====================================
   Mobile
   ===================================== */

@media (max-width: 800px) {

    .customer-orders-page {
        width: calc(100vw - 24px) !important;
        padding-top: 22px;
    }

    .customer-orders-page .store-checkout-header {
        align-items: flex-start;
        gap: 16px;
    }

    .customer-orders-page .admin-table-wrapper {
        overflow-x: auto;
    }

    .customer-orders-page .admin-table {
        min-width: 850px !important;
    }

}

/* =====================================
   PayPal Analytics
   ===================================== */

.paypal-analytics-page {
    width: min(1400px, calc(100% - 40px));
    max-width: none;
    margin: 0 auto;
    padding-bottom: 60px;
}

.paypal-analytics-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.paypal-analytics-header h1 {
    margin-bottom: 5px;
}

.paypal-analytics-filters {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #303946;
    border-radius: 10px;
    background: #171c23;
}

.paypal-analytics-filters form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.paypal-analytics-filters select {
    min-width: 170px;
}

.paypal-stat-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(200px, 1fr)
    );
    gap: 16px;
    margin-bottom: 20px;
}

.paypal-stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 110px;
    padding: 18px;
    border: 1px solid #303946;
    border-radius: 10px;
    background: #171c23;
}

.paypal-stat-card span,
.paypal-stat-card small {
    color: #aeb7c2;
}

.paypal-stat-card strong {
    color: #f3f6f8;
    font-size: 1.55rem;
}

.paypal-chart-grid {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 18px;
    margin-bottom: 20px;
}

.paypal-chart-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #303946;
    border-radius: 10px;
    background: #171c23;
}

.paypal-chart-card h2 {
    margin-top: 0;
}

.paypal-chart-card canvas {
    width: 100% !important;
    height: 320px !important;
}

.paypal-chart-card-wide {
    grid-column: 1 / -1;
}

.paypal-analytics-page .admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.paypal-analytics-page .admin-table {
    min-width: 1100px;
}

@media (max-width: 800px) {

    .paypal-analytics-page {
        width: calc(100% - 24px);
    }

    .paypal-analytics-header {
        flex-direction: column;
    }

    .paypal-chart-grid {
        grid-template-columns: 1fr;
    }

    .paypal-chart-card-wide {
        grid-column: auto;
    }

}
/* =====================================
   Subscription Sale
   ===================================== */

.subscription-sale-banner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 16px 20px;
    text-align: center;
    border: 1px solid #55c7ff;
    border-radius: 10px;
    background: #171c23;
}

.subscription-sale-banner strong {
    font-size: 1.3rem;
}

.subscription-sale-banner span {
    color: #e8edf2;
}

.subscription-sale-banner small {
    color: #aeb7c2;
}

.subscription-sale-badge {
    display: inline-block;
    align-self: center;
    margin: 0 auto 6px;
    padding: 5px 10px;
    font-weight: 700;
    border-radius: 999px;
    background: #55c7ff;
    color: #101418;
}

.subscription-old-price {
    margin-bottom: 2px;
    color: #8f9aa6;
    font-size: 1rem;
    text-decoration: line-through;
}