:root {
    --bg: #f4f8ff;
    --panel: #ffffff;
    --panel-soft: #ecf6ff;
    --text: #0b2239;
    --muted: #4f6479;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #0284c7;
    --accent-dark: #0c4a6e;
    --line: rgba(11, 34, 57, 0.1);
    --shadow: 0 14px 34px rgba(11, 34, 57, 0.1);
    --shadow-soft: 0 8px 20px rgba(11, 34, 57, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    line-height: 1.55;
    background:
        radial-gradient(circle at 8% 6%, rgba(14, 165, 233, 0.22), transparent 0, transparent 30%),
        radial-gradient(circle at 92% 16%, rgba(15, 118, 110, 0.18), transparent 0, transparent 33%),
        linear-gradient(180deg, #f7fbff 0%, #edf5ff 52%, #f7fbff 100%);
}

img {
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 18px rgba(11, 34, 57, 0.06);
}

.nav-wrap,
.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.welcome-text {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.logout-link {
    padding: 10px 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand-badge {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
}

.main-nav {
    display: flex;
    gap: 18px;
}

.mobile-nav-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1 1 auto;
}

.mobile-nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-wrap.menu-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-wrap.menu-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-wrap.menu-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 2px;
}

.main-nav a:hover {
    color: var(--accent-dark);
}

.main-nav a::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    margin-top: 2px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transition: width 0.2s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.cart-button,
.btn,
.filter-chip {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s ease;
}

.cart-button {
    padding: 10px 16px;
    background: rgba(2, 132, 199, 0.13);
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.cart-button span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 99px;
    background: var(--primary);
    color: white;
}

.hero-section {
    padding: 44px 0 26px;
}

.login-section {
    padding: 48px 0 56px;
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
}

.login-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
}

.login-title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
}

.login-copy {
    color: var(--muted);
    line-height: 1.8;
    max-width: 640px;
}

.login-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.login-info-grid div,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.login-info-grid div {
    padding: 16px;
}

.login-info-grid strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.login-info-grid span {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.login-card {
    padding: 24px;
}

.login-card h2 {
    margin: 0 0 8px;
}

.login-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.login-form input {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 14px;
    background: white;
}

.login-hint {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--muted);
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.auth-alt-link {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.auth-alt-link span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.error-message {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

.hero-grid > div {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.88), rgba(237, 246, 255, 0.88));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: calc(var(--radius) + 4px);
    padding: clamp(22px, 4vw, 34px);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-section h1,
.about-section h2,
.section-heading h2 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.15;
}

.hero-section h1 span {
    color: var(--primary-dark);
}

.hero-section p,
.about-section p,
.section-heading p,
.benefit-grid p,
.cart-header p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.btn-primary {
    background: linear-gradient(135deg, #0891b2, var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent-dark);
    border: 1px solid rgba(14, 165, 233, 0.24);
}

.hero-stats,
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.hero-stats div,
.benefit-grid article,
.about-card,
.toolbar-wrap,
.product-card,
.cart-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-stats div {
    padding: 16px;
}

.hero-stats strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.hero-stats span {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-card {
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0ea5e9 0%, #16a34a 100%);
    color: white;
    box-shadow: var(--shadow);
}

.hero-card-simple {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.hero-card-simple h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.hero-card-simple p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-badges span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-size: 0.92rem;
    font-weight: 600;
}

.toolbar-section {
    padding: 12px 0;
}

.guide-section {
    padding: 8px 0 22px;
}

.simple-heading {
    align-items: end;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.guide-card {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(11, 34, 57, 0.13);
}

.guide-step {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    margin-bottom: 10px;
    background: rgba(22, 163, 74, 0.14);
    color: var(--primary-dark);
    font-weight: 800;
}

.guide-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.guide-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.toolbar-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 248, 255, 0.94));
}

.filter-group,
.tools-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    padding: 10px 14px;
    background: #f1f5f9;
    color: var(--text);
    font-weight: 600;
    border: 1px solid transparent;
}

.filter-chip.active,
.filter-chip:hover {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
}

.tools-group input,
.tools-group select {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    padding: 0 14px;
    box-shadow: inset 0 1px 2px rgba(11, 34, 57, 0.05);
}

.tools-group input {
    min-width: 280px;
}

.tools-group input::placeholder {
    color: #64748b;
}

.product-section,
.history-section,
.about-section,
.benefit-section {
    padding: 28px 0 42px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: clamp(1.5rem, 2vw, 2.3rem);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.product-table-wrap {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.table-meta {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.93rem;
}

.table-pagination {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#pageIndicator {
    min-width: 130px;
    text-align: center;
    color: var(--accent-dark);
    font-weight: 700;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.product-table th,
.product-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.product-table th {
    background: #eef6ff;
    color: var(--accent-dark);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.product-table tbody tr:hover {
    background: #f8fbff;
}

.responsive-table-store td .btn {
    width: auto;
}

.product-table-desc {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 340px;
}

.product-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(11, 34, 57, 0.14);
}

.product-art {
    display: grid;
    place-items: center;
    min-height: 182px;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 182px;
    object-fit: cover;
    display: block;
}

.product-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.product-body h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.product-body p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.price-row strong {
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.price-row .add-to-cart {
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: none;
}

.benefit-grid article,
.about-card {
    padding: 20px;
}

.benefit-grid article h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.benefit-grid article {
    min-height: 132px;
}

.history-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.order-history-list {
    display: grid;
    gap: 12px;
}

.order-history-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.order-history-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.order-history-head strong {
    color: var(--primary-dark);
}

.order-history-time {
    color: var(--muted);
    font-size: 0.92rem;
}

.order-history-items {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.order-history-total {
    margin-top: 10px;
    font-weight: 700;
    color: var(--text);
}

.about-card ul {
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.9;
}

.full {
    width: 100%;
}

.cart-panel {
    position: fixed;
    right: 16px;
    top: 88px;
    width: min(380px, calc(100% - 32px));
    max-height: calc(100vh - 104px);
    padding: 16px;
    transform: translateX(120%);
    transition: transform 0.25s ease;
    z-index: 30;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.98));
}

.cart-panel.open {
    transform: translateX(0);
}

.cart-header,
.cart-total-row,
.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.cart-header {
    align-items: start;
}

.close-cart {
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.cart-items {
    display: grid;
    gap: 12px;
    max-height: 48vh;
    overflow: auto;
    margin: 14px 0;
}

.cart-item {
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.cart-item h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.cart-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-controls button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.14);
    color: var(--accent-dark);
    cursor: pointer;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
    z-index: 25;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 55;
}

.image-modal.show {
    display: block;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 34, 57, 0.62);
}

.image-modal-content {
    position: relative;
    width: min(760px, calc(100% - 32px));
    margin: 6vh auto;
    background: white;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 24px 56px rgba(11, 34, 57, 0.28);
    border: 1px solid var(--line);
}

.close-image-modal {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(11, 34, 57, 0.08);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

#imageModalPreview {
    width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 18px;
    border-radius: 999px;
    background: #dcfce7;
    color: #14532d;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 40;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(240, 247, 255, 0.86));
}

.hero-section,
.guide-section,
.toolbar-section,
.product-section,
.history-section,
.benefit-section,
.about-section {
    animation: fade-up 0.5s ease both;
}

.guide-section {
    animation-delay: 0.05s;
}

.toolbar-section {
    animation-delay: 0.08s;
}

.product-section {
    animation-delay: 0.11s;
}

.history-section {
    animation-delay: 0.14s;
}

.benefit-section {
    animation-delay: 0.17s;
}

.about-section {
    animation-delay: 0.2s;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-state {
    padding: 24px;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.admin-hero {
    padding: 36px 0 10px;
}

.page-title {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.15;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 22px;
}

.stat-card,
.admin-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px;
}

.stat-card strong {
    display: block;
    font-size: 1.45rem;
    color: var(--primary-dark);
}

.stat-card span {
    color: var(--muted);
}

.admin-section {
    padding: 12px 0 28px;
}

.compact-top {
    padding-top: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.admin-panel {
    padding: 20px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-heading h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
}

.admin-form {
    display: grid;
    gap: 14px;
}

.toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
}

.toolbar-controls label {
    display: grid;
    gap: 6px;
    flex: 1 1 280px;
    font-weight: 600;
}

.toolbar-controls input {
    min-height: 44px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    padding: 0 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    padding: 0 14px;
}

.admin-form textarea {
    min-height: 110px;
    resize: vertical;
    padding: 12px 14px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.current-upload {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.flash-message {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}

.flash-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.9rem;
}

.table-subtext {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f8fafc;
}

.large-thumb {
    width: 120px;
    height: 120px;
    margin-top: 8px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.inline-form {
    display: inline;
}

.btn-small {
    padding: 9px 12px;
    font-size: 0.9rem;
}

.selection-count-badge {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: currentColor;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.status-active {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.status-admin {
    background: rgba(14, 165, 233, 0.12);
    color: #075985;
}

.status-user {
    background: rgba(148, 163, 184, 0.18);
    color: #334155;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #eff6ff;
    color: #0f172a;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .hero-grid,
    .about-grid,
    .guide-grid,
    .product-grid,
    .benefit-grid,
    .hero-stats,
    .section-heading,
    .toolbar-wrap,
    .nav-wrap,
    .footer-wrap,
    .login-layout,
    .admin-grid,
    .admin-stats,
    .form-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .product-grid,
    .benefit-grid,
    .hero-stats,
    .login-info-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
    }

    .hero-grid > div {
        padding: 22px;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding-top: 28px;
    }

    .container {
        width: min(100% - 20px, 1120px);
    }

    .site-header {
        position: static;
    }

    .nav-wrap {
        align-items: center;
        gap: 12px;
        padding: 12px 0;
    }

    .brand {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .brand-badge {
        width: 42px;
        height: 42px;
    }

    .brand strong,
    .brand small {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .mobile-nav-panel {
        width: 100%;
        order: 3;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition:
            max-height 0.28s ease,
            opacity 0.22s ease,
            transform 0.28s ease,
            padding-top 0.28s ease,
            border-color 0.28s ease;
    }

    .nav-wrap.menu-open .mobile-nav-panel {
        max-height: 420px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .main-nav {
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        gap: 6px;
    }

    .main-nav a {
        width: 100%;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(14, 165, 233, 0.08);
    }

    .main-nav a::after {
        display: none;
    }

    .login-section,
    .admin-section,
    .hero-section,
    .product-section,
    .about-section,
    .history-section,
    .benefit-section,
    .guide-section,
    .toolbar-section {
        padding-left: 0;
        padding-right: 0;
    }

    .admin-panel,
    .login-card,
    .hero-grid > div,
    .toolbar-wrap,
    .product-table-wrap,
    .order-history-card,
    .guide-card,
    .stat-card {
        border-radius: 16px;
    }

    .admin-panel {
        padding: 16px;
    }

    .panel-heading,
    .toolbar-controls,
    .table-actions,
    .form-actions,
    .login-info-grid,
    .admin-stats {
        gap: 10px;
    }

    .panel-heading,
    .toolbar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        width: 100%;
    }

    .table-actions .btn,
    .table-actions .inline-form,
    .panel-heading .btn,
    .toolbar-controls .btn,
    .toolbar-controls a {
        width: 100%;
    }

    .table-actions .inline-form {
        display: block;
    }

    .table-actions .inline-form .btn,
    .panel-heading .inline-form .btn {
        width: 100%;
    }

    .toolbar-controls label {
        flex-basis: auto;
    }

    .login-title,
    .page-title {
        font-size: clamp(1.55rem, 7vw, 2.1rem);
    }

    .login-copy,
    .section-heading p,
    .hero-section p,
    .about-section p {
        line-height: 1.65;
    }

    .product-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .product-table.responsive-table-store,
    .product-table.responsive-table-store thead,
    .product-table.responsive-table-store tbody,
    .product-table.responsive-table-store tr,
    .product-table.responsive-table-store th,
    .product-table.responsive-table-store td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .product-table.responsive-table-store thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .product-table.responsive-table-store tbody {
        display: grid;
        gap: 12px;
    }

    .product-table.responsive-table-store tr {
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fbfdff;
        box-shadow: var(--shadow-soft);
        padding: 8px 0;
    }

    .product-table.responsive-table-store td {
        border-bottom: 1px dashed rgba(11, 34, 57, 0.08);
        padding: 10px 14px;
    }

    .product-table.responsive-table-store td:last-child {
        border-bottom: 0;
    }

    .product-table.responsive-table-store td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .product-table-desc {
        max-width: none;
        margin-top: 4px;
    }

    .admin-table.responsive-table,
    .admin-table.responsive-table thead,
    .admin-table.responsive-table tbody,
    .admin-table.responsive-table tr,
    .admin-table.responsive-table th,
    .admin-table.responsive-table td {
        display: block;
        width: 100%;
    }

    .admin-table.responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .admin-table.responsive-table tbody {
        display: grid;
        gap: 12px;
    }

    .admin-table.responsive-table tr {
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fbfdff;
        box-shadow: var(--shadow-soft);
        padding: 6px 0;
    }

    .admin-table.responsive-table td {
        border-bottom: 1px dashed rgba(11, 34, 57, 0.08);
        padding: 10px 14px;
    }

    .admin-table.responsive-table td:last-child {
        border-bottom: 0;
    }

    .admin-table.responsive-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .admin-thumb {
        width: 88px;
        height: 88px;
    }

    .cart-panel {
        top: auto;
        bottom: 16px;
        max-height: 75vh;
    }

    .tools-group input,
    .tools-group select {
        width: 100%;
    }

    .btn,
    .cart-button {
        width: 100%;
    }

    .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .header-actions .btn,
    .header-actions .cart-button,
    .header-actions .welcome-text {
        width: 100%;
    }

    .header-actions .welcome-text {
        padding: 2px 2px 6px;
    }

    .welcome-text {
        font-size: 0.9rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .price-row .add-to-cart {
        width: auto;
    }

    .image-modal-content {
        width: calc(100% - 20px);
        margin-top: 10vh;
    }

    .table-pagination {
        display: grid;
        grid-template-columns: 1fr;
    }

    .footer-wrap {
        text-align: center;
    }
}
