:root,
html[data-theme="navy"] {
    --primary: #1a56db;
    --primary-glow: #3b82f6;
    --bg-deep: #060b18;
    --bg-base: #0d1526;
    --bg-card: #111d35;
    --bg-hover: #162040;
    --border: rgba(59, 130, 246, 0.18);
    --text-primary: #e8f0ff;
    --text-secondary: #8ba3c7;
    --accent-cyan: #06b6d4;
    --accent-indigo: #6366f1;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 8px;
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.26);
    --shadow-deep: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 100px rgba(26, 86, 219, 0.08);
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.3);
    --one-ui-primary: var(--primary);
    --one-ui-secondary: var(--primary-glow);
    --one-ui-background: var(--bg-base);
    --one-ui-bg: var(--bg-base);
    --one-ui-sidebar-bg: var(--bg-card);
    --one-ui-radius: var(--radius);
    --ty-blue: var(--primary);
    --ty-blue-hover: var(--primary-glow);
    --ty-text-dark: var(--text-primary);
    --ty-text-muted: var(--text-secondary);
    --ty-bg-gray: var(--bg-hover);
    --ty-border-color: var(--border);
}

html[data-theme="midnight"] {
    --primary: #7c3aed;
    --primary-glow: #a78bfa;
    --bg-deep: #070715;
    --bg-base: #101226;
    --bg-card: #171734;
    --bg-hover: #23204a;
    --border: rgba(167, 139, 250, 0.2);
    --accent-cyan: #22d3ee;
    --accent-indigo: #818cf8;
}

html[data-theme="forest"] {
    --primary: #16a34a;
    --primary-glow: #34d399;
    --bg-deep: #04120c;
    --bg-base: #0a1d17;
    --bg-card: #10291f;
    --bg-hover: #173829;
    --border: rgba(52, 211, 153, 0.2);
    --accent-cyan: #2dd4bf;
    --accent-indigo: #60a5fa;
}

html[data-theme="crimson"] {
    --primary: #dc2626;
    --primary-glow: #fb7185;
    --bg-deep: #170608;
    --bg-base: #260d14;
    --bg-card: #35111c;
    --bg-hover: #471827;
    --border: rgba(251, 113, 133, 0.2);
    --accent-cyan: #38bdf8;
    --accent-indigo: #a78bfa;
}

html[data-theme="slate"] {
    --primary: #475569;
    --primary-glow: #94a3b8;
    --bg-deep: #05080d;
    --bg-base: #0f172a;
    --bg-card: #152033;
    --bg-hover: #1f2a3d;
    --border: rgba(148, 163, 184, 0.24);
    --accent-cyan: #06b6d4;
    --accent-indigo: #64748b;
}

html[data-theme="amber"] {
    --primary: #d97706;
    --primary-glow: #fbbf24;
    --bg-deep: #160d04;
    --bg-base: #261807;
    --bg-card: #33220d;
    --bg-hover: #493116;
    --border: rgba(251, 191, 36, 0.22);
    --accent-cyan: #22d3ee;
    --accent-indigo: #a78bfa;
}

html[data-mode="light"],
html[data-appearance="light"],
body.light-mode {
    --bg-deep: #e7edff;
    --bg-base: #f0f4ff;
    --bg-card: #ffffff;
    --bg-hover: #e8eefc;
    --text-primary: #0f172a;
    --text-secondary: #52627a;
    --primary: #1d4ed8;
    --primary-glow: #2563eb;
    --border: rgba(29, 78, 216, 0.16);
    --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-deep: 0 25px 80px rgba(15, 23, 42, 0.16), 0 0 90px rgba(29, 78, 216, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-deep);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.08), transparent 34%),
        linear-gradient(225deg, rgba(6, 182, 212, 0.08), transparent 38%),
        var(--bg-base);
    color: var(--text-primary);
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(59, 130, 246, 0.35);
    color: #ffffff;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

a {
    color: var(--primary-glow);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-cyan);
}

img {
    max-width: 100%;
}

.text-dark,
.text-body,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary) !important;
}

.text-muted,
.text-secondary {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary-glow) !important;
}

.text-success {
    color: var(--success) !important;
}

.bg-light,
.bg-white {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

.border,
.border-light,
.border-bottom,
.border-top {
    border-color: var(--border) !important;
}

.container,
.container-fluid {
    position: relative;
}

.main-container {
    flex: 1 0 auto;
}

.site-content {
    width: min(100%, 1280px);
}

.card,
.dropdown-menu,
.modal-content,
.alert,
.list-group-item,
.ty-product-card,
.ty-detail-card,
.ty-profile-card,
.cart-container,
.summary-card,
.table-shell,
.admin-filter-card,
.metric-card,
.main-content-card {
    border-radius: var(--radius) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)), var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary);
    box-shadow: var(--shadow-soft) !important;
}

.card:hover,
.ty-product-card:hover,
.metric-card:hover,
.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), 0 0 40px rgba(59, 130, 246, 0.08) !important;
}

.btn,
button,
.ty-btn-primary,
.ty-btn-secondary,
.ty-btn-action,
.ty-action-btn,
.ty-category-pill,
.mobile-nav-item,
.nav-link {
    transition: transform 150ms ease-out, box-shadow 150ms ease-out, border-color 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
}

.btn:hover,
.ty-btn-primary:hover,
.ty-btn-action:hover,
.ty-action-btn:hover {
    transform: scale(1.03);
}

.btn-primary,
.btn-success,
.btn-one-ui-primary,
.ty-btn-primary,
.ty-btn-login,
.ty-btn-save,
.ty-btn-cart-add,
.btn-register,
.sepete-ekle,
.kaydet {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow)) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 10px 28px rgba(26, 86, 219, 0.28) !important;
}

.btn-primary::after,
.btn-success::after,
.btn-one-ui-primary::after,
.ty-btn-primary::after,
.ty-btn-login::after,
.ty-btn-save::after,
.ty-btn-cart-add::after,
.btn-register::after {
    content: "";
    position: absolute;
    inset: -40% auto -40% -70%;
    width: 45%;
    transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 450ms ease;
}

.btn-primary:hover::after,
.btn-success:hover::after,
.btn-one-ui-primary:hover::after,
.ty-btn-primary:hover::after,
.ty-btn-login:hover::after,
.ty-btn-save:hover::after,
.ty-btn-cart-add:hover::after,
.btn-register:hover::after {
    left: 130%;
}

.btn-outline-primary {
    color: var(--primary-glow) !important;
    border-color: var(--primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    color: #ffffff !important;
    background: var(--primary) !important;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.25) !important;
}

.btn-outline-danger {
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.42) !important;
}

.btn-outline-danger:hover {
    color: #ffffff !important;
    background: var(--danger) !important;
}

.btn-light,
.ty-btn-secondary,
.ty-btn-back {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

.btn-light:hover,
.ty-btn-secondary:hover,
.ty-btn-back:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.form-control,
.form-select,
textarea,
.ty-form-control,
.form-control-oneui,
.form-select-oneui {
    background-color: rgba(6, 11, 24, 0.42) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 0.95rem !important;
}

.form-control::placeholder,
textarea::placeholder {
    color: rgba(139, 163, 199, 0.68) !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
.ty-form-control:focus,
.form-control-oneui:focus,
.form-select-oneui:focus {
    background-color: rgba(17, 29, 53, 0.92) !important;
    border-color: var(--primary-glow) !important;
    box-shadow: var(--focus-ring) !important;
    color: var(--text-primary) !important;
}

.form-label,
.form-check-label {
    color: var(--text-secondary) !important;
}

.form-check-input {
    background-color: rgba(6, 11, 24, 0.7);
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.field-validation-error,
.text-danger,
.validation-summary-errors {
    color: #fca5a5 !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.36) !important;
    color: #fecaca !important;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.12) !important;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.34) !important;
    color: #bbf7d0 !important;
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.12) !important;
}

.site-body {
    display: flex;
    flex-direction: column;
}

.ty-header,
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(6, 11, 24, 0.78);
    border-bottom: 1px solid var(--border);
    transition: background-color 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease;
}

.ty-header.is-scrolled,
.admin-topbar.is-scrolled {
    background: rgba(6, 11, 24, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.ty-header {
    padding: 14px 0;
}

.ty-brand,
.navbar-brand {
    color: var(--text-primary) !important;
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
}

.ty-brand span,
.navbar-brand span.brand-accent {
    color: var(--primary-glow);
}

.ty-search-box {
    position: relative;
    width: min(100%, 640px);
}

.ty-search-input {
    width: 100%;
    min-height: 46px;
    padding-right: 48px !important;
}

.ty-search-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    border: 0;
    border-radius: var(--radius);
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ty-action-btn {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ty-action-btn:hover,
.ty-action-btn.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-glow);
}

.dropdown-menu {
    --bs-dropdown-bg: var(--bg-card);
    --bs-dropdown-color: var(--text-primary);
    --bs-dropdown-link-color: var(--text-primary);
    --bs-dropdown-link-hover-bg: var(--bg-hover);
    --bs-dropdown-link-hover-color: var(--primary-glow);
    padding: 8px !important;
}

.ty-dropdown-item,
.dropdown-item {
    border-radius: var(--radius);
    color: var(--text-primary) !important;
}

.ty-dropdown-item:hover,
.dropdown-item:hover {
    background: var(--bg-hover) !important;
    color: var(--primary-glow) !important;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    display: none;
    justify-content: space-around;
    gap: 4px;
    padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
    background: rgba(6, 11, 24, 0.92);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.mobile-nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-radius: var(--radius);
    min-width: 58px;
    padding: 5px 6px;
}

.mobile-nav-item i {
    font-size: 19px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-glow);
}

.site-footer,
.admin-footer {
    margin-top: auto;
    background: rgba(6, 11, 24, 0.9);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 24px 0;
}

.site-footer a,
.admin-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.site-footer a:hover,
.admin-footer a:hover {
    color: var(--primary-glow);
}

.ty-filter-container {
    margin: -0.25rem 0 1.5rem;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.ty-scroll-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 5px 2px;
}

.ty-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.ty-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    padding: 9px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--border);
}

.ty-category-pill:hover,
.ty-category-pill.active {
    color: var(--text-primary) !important;
    border-color: rgba(59, 130, 246, 0.48);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.12);
}

.ty-product-card {
    overflow: hidden;
    min-height: 100%;
}

.ty-img-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 190px;
    background: var(--bg-hover);
    overflow: hidden;
}

.ty-img-wrapper img,
.cart-item-img,
.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease, filter 300ms ease;
}

.ty-product-card:hover .ty-img-wrapper img,
.ty-gallery-wrapper:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.ty-card-body {
    padding: 14px;
}

.ty-product-title {
    min-height: 42px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.45;
}

.ty-price-box,
.ty-detail-price {
    color: var(--primary-glow);
    font-weight: 850;
}

.ty-btn-grid {
    display: flex;
    gap: 8px;
}

.ty-btn-primary,
.ty-btn-secondary,
.ty-btn-action {
    border-radius: var(--radius);
    min-height: 38px;
    border: 1px solid var(--border);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 700;
}

.ty-detail-card {
    padding: clamp(1rem, 3vw, 2.5rem);
}

.ty-gallery-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-hover);
    border: 1px solid var(--border);
}

.ty-gallery-wrapper .carousel-item img {
    height: min(58vw, 500px);
    min-height: 300px;
    object-fit: cover;
}

.ty-badge-category,
.badge {
    border-radius: 999px !important;
    padding: 0.42rem 0.72rem !important;
    font-weight: 750;
}

.ty-badge-category,
.badge.bg-light {
    background: rgba(59, 130, 246, 0.12) !important;
    color: var(--primary-glow) !important;
    border: 1px solid var(--border) !important;
}

.badge.bg-success,
.status-active {
    background: rgba(34, 197, 94, 0.14) !important;
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.38) !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.14);
}

.badge.bg-secondary,
.status-passive {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.26) !important;
}

.bg-warning,
.status-waiting {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fde68a !important;
    border: 1px solid rgba(245, 158, 11, 0.38) !important;
}

.bg-danger,
.status-rejected {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #fecaca !important;
    border: 1px solid rgba(239, 68, 68, 0.38) !important;
}

.login-shell {
    position: relative;
    width: 100vw;
    min-height: calc(100vh - 210px);
    margin-left: calc(50% - 50vw);
    margin-top: -1.5rem;
    padding: clamp(2rem, 5vw, 4rem) 1rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(6, 11, 24, 0.98), rgba(13, 21, 38, 0.94)),
        var(--bg-base);
}

.login-shell::before,
.login-shell::after {
    content: "";
    position: absolute;
    width: 290px;
    height: 290px;
    opacity: 0.04;
    border: 2px solid var(--primary-glow);
    pointer-events: none;
}

.login-shell::before {
    left: 7vw;
    top: 12vh;
    clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
    animation: slow-rotate 28s linear infinite;
}

.login-shell::after {
    right: 8vw;
    bottom: 7vh;
    border-radius: 50%;
    animation: float-y 12s ease-in-out infinite;
}

.geo-shape {
    position: absolute;
    opacity: 0.04;
    border: 2px solid var(--accent-cyan);
    pointer-events: none;
}

.geo-shape.shape-one {
    width: 150px;
    height: 150px;
    left: 14vw;
    bottom: 14vh;
    animation: slow-rotate 24s linear infinite reverse;
}

.geo-shape.shape-two {
    width: 92px;
    height: 92px;
    right: 18vw;
    top: 18vh;
    border-radius: 50%;
    animation: float-y 10s ease-in-out infinite;
}

.login-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
}

.login-emoji {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin: 0 auto -20px;
    border-radius: 50%;
    font-size: 58px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    transform: rotate(var(--emoji-rotate, 0deg)) translateY(var(--emoji-y, 0));
    transform-origin: center 65%;
    transition: transform 120ms ease, filter 220ms ease;
    animation: emoji-bounce 2.8s ease-in-out infinite;
}

.login-emoji.is-hiding {
    animation: none;
    transform: rotate(-90deg) translateY(-4px) scale(0.96);
    filter: saturate(1.25);
}

.login-card {
    padding: clamp(1.25rem, 4vw, 2rem);
    border-radius: var(--radius);
    background: rgba(17, 29, 53, 0.85) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-deep) !important;
    backdrop-filter: blur(20px);
}

.form-floating-custom {
    position: relative;
}

.form-floating-custom input {
    min-height: 54px;
    padding-top: 1.25rem !important;
}

.form-floating-custom label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: transform 160ms ease, color 160ms ease, font-size 160ms ease, top 160ms ease;
}

.form-floating-custom input:focus + label,
.form-floating-custom input:not(:placeholder-shown) + label {
    top: 8px;
    transform: translateY(0);
    color: var(--primary-glow);
    font-size: 11px;
    font-weight: 750;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-glow);
    background: rgba(59, 130, 246, 0.12);
}

.profile-shell,
.auth-shell {
    width: min(100%, 880px);
    margin: 0 auto;
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(6, minmax(42px, 1fr));
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.theme-swatch {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--swatch);
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.theme-swatch[data-theme-option="navy"] { --swatch: linear-gradient(135deg, #060b18, #1a56db 58%, #06b6d4); }
.theme-swatch[data-theme-option="midnight"] { --swatch: linear-gradient(135deg, #070715, #7c3aed 58%, #22d3ee); }
.theme-swatch[data-theme-option="forest"] { --swatch: linear-gradient(135deg, #04120c, #16a34a 58%, #2dd4bf); }
.theme-swatch[data-theme-option="crimson"] { --swatch: linear-gradient(135deg, #170608, #dc2626 58%, #fb7185); }
.theme-swatch[data-theme-option="slate"] { --swatch: linear-gradient(135deg, #05080d, #475569 58%, #94a3b8); }
.theme-swatch[data-theme-option="amber"] { --swatch: linear-gradient(135deg, #160d04, #d97706 58%, #fbbf24); }

.theme-swatch::after {
    content: "";
    position: absolute;
    inset: 50%;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.42);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.theme-swatch.is-rippling::after {
    animation: ripple 520ms ease-out;
}

.theme-swatch.is-active {
    outline: 3px solid rgba(255, 255, 255, 0.28);
    border-color: var(--primary-glow);
}

.admin-body {
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.07), transparent 34%),
        linear-gradient(225deg, rgba(6, 182, 212, 0.07), transparent 38%),
        var(--bg-base);
}

.admin-topbar {
    padding: 12px 0;
}

.admin-layout-grid {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
}

.sidebar {
    position: sticky;
    top: 86px;
    min-height: calc(100vh - 128px);
    padding: 14px;
    border-radius: var(--radius) !important;
    background: rgba(17, 29, 53, 0.72) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-soft) !important;
}

.sidebar .nav-link {
    position: relative;
    margin-bottom: 6px;
    padding: 11px 12px !important;
    border-radius: var(--radius);
    color: var(--text-secondary) !important;
    font-weight: 700;
    overflow: hidden;
}

.sidebar .nav-link::after,
.ty-action-btn::after,
.mobile-nav-item::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 5px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--primary-glow);
    transition: transform 180ms ease;
}

.sidebar .nav-link:hover::after,
.sidebar .nav-link.active::after,
.ty-action-btn:hover::after,
.ty-action-btn.active::after {
    transform: scaleX(1);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(59, 130, 246, 0.14) !important;
    color: var(--text-primary) !important;
}

.main-content-card {
    min-height: calc(100vh - 132px);
    padding: clamp(1rem, 2.4vw, 1.5rem);
}

.page-heading {
    animation: fade-slide-up 520ms ease both 150ms;
}

.metric-card {
    height: 100%;
    padding: 1.35rem;
}

.metric-card .metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.16);
    color: var(--primary-glow);
}

.metric-card .metric-value {
    color: var(--text-primary);
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    font-weight: 900;
    line-height: 1;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
}

.metric-trend.up {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.metric-trend.down {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.admin-filter-card {
    padding: 1rem;
}

.table-panel {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(6, 11, 24, 0.24);
}

.table-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.table-search {
    width: min(100%, 260px);
}

.admin-table,
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-hover-bg: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
    margin-bottom: 0;
}

.admin-table thead,
.table thead {
    background: rgba(6, 11, 24, 0.56) !important;
}

.admin-table thead th,
.table thead th {
    color: var(--text-secondary) !important;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border) !important;
    white-space: nowrap;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
}

.admin-table thead a,
.table thead a {
    color: var(--text-secondary) !important;
}

.admin-table tbody tr,
.table tbody tr {
    position: relative;
    border-color: var(--border) !important;
}

.admin-table tbody tr:nth-child(even),
.table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018);
}

.admin-table tbody tr::before,
.table tbody tr::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary-glow);
    transform: scaleY(0);
    transition: transform 150ms ease;
}

.admin-table tbody tr:hover::before,
.table tbody tr:hover::before {
    transform: scaleY(1);
}

.admin-table td,
.table td {
    color: var(--text-primary);
    border-color: var(--border) !important;
    vertical-align: middle;
}

.status-chip,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px !important;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid var(--border);
}

.status-chip.waiting,
.status-badge.bg-warning {
    animation: pulse-soft 1.8s ease-in-out infinite;
}

.admin-actions,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-reveal {
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    padding: 0 10px !important;
    overflow: hidden;
    gap: 7px;
    white-space: nowrap;
    justify-content: flex-start !important;
    border-radius: var(--radius) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

.action-reveal .action-label {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.action-reveal:hover {
    max-width: 132px;
}

.action-reveal:hover .action-label {
    opacity: 1;
    transform: translateX(0);
}

.action-reveal.action-delete:hover {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    color: #fecaca !important;
    animation: shake-x 340ms ease;
}

.pagination {
    gap: 6px;
}

.page-link {
    min-width: 38px;
    border-radius: 999px !important;
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    text-align: center;
}

.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    animation: flip-in 360ms ease both;
}

.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
}

.wp-checkout-btn {
    background: linear-gradient(135deg, #25d366, #128c7e) !important;
    color: #ffffff !important;
}

.app-toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
}

.app-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(17, 29, 53, 0.94);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    animation: toast-in 260ms ease both;
}

.app-toast.is-hiding {
    animation: toast-out 220ms ease both;
}

.app-toast.success { border-color: rgba(34, 197, 94, 0.45); }
.app-toast.error { border-color: rgba(239, 68, 68, 0.45); }
.app-toast.info { border-color: rgba(59, 130, 246, 0.45); }

.toast-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-glow);
}

.app-toast.success .toast-dot { background: var(--success); }
.app-toast.error .toast-dot { background: var(--danger); }

.toast-close {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(3, 7, 18, 0.64);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.confirm-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.confirm-modal {
    width: min(420px, 100%);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-deep);
    transform: scale(0.94);
    transition: transform 180ms ease;
}

.confirm-overlay.is-open .confirm-modal {
    transform: scale(1);
}

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(148, 163, 184, 0.14);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    animation: shimmer 1.5s infinite;
}

@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .site-body {
        padding-bottom: 68px;
    }

    .admin-layout-grid {
        display: block;
        padding: 12px;
    }

    .admin-sidebar-col {
        position: fixed;
        inset: 0 auto 0 -320px;
        width: min(86vw, 300px);
        z-index: 1080;
        transition: left 220ms ease;
    }

    .admin-sidebar-col.show {
        left: 0;
    }

    .sidebar {
        top: 0;
        min-height: 100vh;
        border-radius: 0 !important;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1070;
        display: none;
        background: rgba(0, 0, 0, 0.56);
        backdrop-filter: blur(5px);
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .main-content-card {
        min-height: auto;
        margin-top: 12px;
    }

    .table-toolbar {
        align-items: stretch;
    }

    .table-toolbar-actions,
    .table-search {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .ty-header {
        padding: 10px 0;
    }

    .ty-brand {
        font-size: 1.2rem;
    }

    .ty-img-wrapper {
        min-height: 160px;
    }

    .theme-selector {
        grid-template-columns: repeat(3, minmax(48px, 1fr));
    }

    .app-toast-container {
        right: 10px;
        bottom: 76px;
        width: calc(100vw - 20px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
