@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

:root {
  --primary-color: #123a63;
  --primary-hover: #1b5f9d;
  --secondary-color: #18995f;
  --secondary-hover: #12784b;
  --accent-color: #ff8a3d;
  --accent-hover: #e86e19;

  --bg-color: #f3f7fc;
  --bg-soft: #e9f0f8;
  --surface-color: #ffffff;
  --surface-tint: rgba(255, 255, 255, 0.78);

  --text-main: #122033;
  --text-muted: #607286;
  --text-soft: #8ba0b8;

  --border-color: #d7e2ef;
  --border-strong: #bfd0e2;

  --font-family: 'Manrope', sans-serif;
  --font-display: 'Sora', sans-serif;
  --border-radius: 18px;
  --transition-speed: 0.28s;
  --shadow-sm: 0 8px 20px rgba(15, 35, 58, 0.06);
  --shadow-md: 0 20px 45px rgba(15, 35, 58, 0.12);
  --shadow-lg: 0 30px 80px rgba(11, 27, 47, 0.16);
  --shadow-xl: 0 40px 110px rgba(11, 27, 47, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background:
    radial-gradient(circle at top, rgba(18, 58, 99, 0.08), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg-color) 100%);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed), transform var(--transition-speed), opacity var(--transition-speed);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed), color var(--transition-speed);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.65rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: all var(--transition-speed);
  box-shadow: 0 16px 34px rgba(18, 58, 99, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1d5a93 100%);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(18, 58, 99, 0.18);
}

.btn-success {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #1dbf76 100%);
  color: #fff;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(24, 153, 95, 0.22);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.9rem 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.18), transparent 32%),
        radial-gradient(circle at 90% 0%, rgba(15, 118, 110, 0.16), transparent 28%),
        rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 20px 40px rgba(15, 35, 58, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.45) inset;
    backdrop-filter: blur(18px);
}

.navbar::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.16), rgba(14, 165, 233, 0));
    opacity: 0.6;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0 0.75rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    min-width: 140px;
    position: relative;
}

.nav-logo-main {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    text-transform: lowercase;
    background: linear-gradient(120deg, #0f766e 0%, #1d4ed8 55%, #0ea5e9 100%);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 12px 30px rgba(15, 70, 126, 0.25);
    position: relative;
    padding-right: 0.3rem;
}

.nav-logo-main::after {
    content: '';
    position: absolute;
    right: -0.1rem;
    bottom: -0.28rem;
    width: 42%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.15), rgba(14, 165, 233, 0.75));
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.nav-search {
    flex: 1;
    max-width: 520px;
    display: flex;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 208, 226, 0.7);
    outline: none;
    font-family: inherit;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 251, 0.9));
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
}

.nav-search input:focus {
    border-color: rgba(29, 78, 216, 0.55);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(18, 58, 99, 0.08),
        0 14px 28px rgba(15, 35, 58, 0.12);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--primary-color);
    background: rgba(18, 58, 99, 0.08);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 30px rgba(15, 35, 58, 0.12);
}

.nav-link {
    font-weight: 700;
    color: var(--text-main);
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    transition: color var(--transition-speed), background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
}

.nav-link:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(29, 78, 216, 0.12));
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(18, 58, 99, 0.08);
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 46px;
    height: 46px;
    padding: 0;
}

.cart-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b2c 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(255, 138, 61, 0.36);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(29, 78, 216, 0.16));
    border: 1px solid rgba(29, 78, 216, 0.16);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.18);
}

.nav-ai-link {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(59, 130, 246, 0.18));
    border: 1px solid rgba(59, 130, 246, 0.28);
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.14);
}

.nav-notify-link {
    position: relative;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.16));
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.16);
}

.notify-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.logout-btn {
    color: var(--text-muted);
}

.logout-btn:hover {
    color: var(--primary-color);
}

.nav-cart-link.is-bouncing {
    animation: cartBounce 0.55s ease;
}

@keyframes cartBounce {
    0%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px) scale(1.08);
    }

    60% {
        transform: translateY(1px) scale(0.98);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-search {
        order: 3;
        max-width: 100%;
    }

    .nav-logo {
        min-width: auto;
    }

    .hide-mobile {
        display: inline-flex;
    }

    .nav-admin-link span {
        display: inline-flex;
    }
}


/* Drawer + hamburger */
.nav-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(14, 116, 144, 0.06));
    box-shadow: 0 12px 28px rgba(15, 35, 58, 0.18);
    color: #0f172a;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.nav-menu-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(15, 35, 58, 0.22);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 900;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    padding: 1.4rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 244, 250, 0.96));
    box-shadow: 0 24px 48px rgba(15, 35, 58, 0.26);
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    z-index: 950;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mobile-drawer nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-drawer a {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    color: #0f172a;
    background: rgba(14, 116, 144, 0.08);
    border: 1px solid rgba(14, 116, 144, 0.12);
    box-shadow: 0 10px 22px rgba(15, 35, 58, 0.12);
}

.mobile-drawer.open {
    transform: translateX(0);
}

@media (max-width: 1024px) {
    .nav-menu-btn {
        display: inline-flex;
    }

    .nav-links {
        border: none;
        box-shadow: none;
        background: transparent;
        gap: 0.35rem;
    }

    .nav-links .hide-mobile {
        display: inline-flex;
    }

    .nav-link {
        padding: 0.65rem 0.75rem;
    }
}

/* Authentication Buttons */
.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-auth-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.sign-in-btn {
    color: var(--text-main);
    background: transparent;
}

.sign-in-btn:hover {
    color: var(--primary-color);
}

.sign-up-btn {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sign-up-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.3);
}

@media (max-width: 480px) {
    .nav-auth-link {
        padding: 0.5rem 0.85rem;
        font-size: 0.9rem;
    }
}

.home-page {
  background: linear-gradient(135deg, #1f3b57 0%, #21649f 100%);
  color: #ffffff;
  min-height: 100vh;
}

.hero {
  padding: 4rem 1rem 2rem;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-panel {
  background: linear-gradient(135deg, rgba(41, 128, 185, 0.32), rgba(34, 83, 120, 0.5));
  border-radius: 20px;
  padding: 2.6rem 2rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-panel h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 0.6rem;
  letter-spacing: -0.03em;
}

.hero-panel p {
  color: #d9e6f5;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-btn {
  box-shadow: 0 16px 32px rgba(12, 37, 61, 0.25);
}

.hero-secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.section-title {
  margin: 0 0 1.4rem;
  font-size: 1.6rem;
  color: #ffffff;
}

.category-section,
.how-it-works {
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, #234463 0%, #1d5c8c 100%);
}

.category-section .container,
.how-it-works .container {
  max-width: 1200px;
  margin: 0 auto;
}

.category-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.cat-button {
  display: grid;
  place-items: center;
  gap: 0.55rem;
  padding: 1rem 0.8rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(45, 104, 152, 0.9), rgba(30, 82, 124, 0.9));
  color: #e9f2fb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}

.cat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.cat-button span {
  font-size: 0.95rem;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.how-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.4rem 1.2rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
}

.step-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #1f3b57;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.how-card h3 {
  margin-bottom: 0.4rem;
}

.how-card p {
  color: #d9e6f5;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 1rem 1.5rem;
  }

  .hero-panel {
    padding: 2.2rem 1.6rem;
  }
}
.product-page {
    padding: 4rem 0;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.main-image:hover img {
    transform: scale(1.05);
    /* subtle zoom on hover */
}

.thumbnail-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.category-label {
    background-color: #e2e8f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.product-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.stock-info {
    margin-bottom: 2rem;
    font-weight: 500;
}

.in-stock {
    color: var(--secondary-color);
}

.out-of-stock-text {
    color: #ef4444;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.add-to-cart-large {
    flex: 1;
    font-size: 1.1rem;
    padding: 1rem;
}

.trust-signals {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.trust-badge svg {
    color: var(--primary-color);
}

@media (max-width: 900px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}.product-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.96) 100%);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
    border: 1px solid rgba(191, 208, 226, 0.82);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(18, 58, 99, 0.24);
}

.product-card:focus-visible {
    outline: 3px solid rgba(18, 58, 99, 0.18);
    outline-offset: 4px;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #dbe8f6 0%, #edf4fb 100%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image-container::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent 0%, rgba(18, 32, 51, 0.5) 100%);
}

.product-badges {
    position: absolute;
    inset: 0;
    padding: 0.95rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    z-index: 1;
}

.badge {
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 24px rgba(18, 32, 51, 0.18);
}

.featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d5a93 100%);
}

.out-of-stock {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.product-details {
    padding: 1.1rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.6rem;
}

.product-category {
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.94rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

.product-link-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--primary-color);
}

.product-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.product-price {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--primary-color);
}

.add-cart-btn {
    min-width: 138px;
    padding: 0.75rem 1.05rem;
    box-shadow: 0 16px 32px rgba(18, 58, 99, 0.18);
}

.add-cart-btn:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.product-card-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 42px;
    width: 138px;
    border: 1px solid var(--border-color);
}

.product-card-qty button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 100%;
    background: transparent;
    color: var(--text-color);
    transition: background 0.2s;
}

.product-card-qty button:hover:not(:disabled) {
    background: #e2e8f0;
}

.product-card-qty button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-card-qty span {
    font-weight: 700;
    font-size: 1.05rem;
    flex: 1;
    text-align: center;
}

@media (max-width: 640px) {
    .product-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .add-cart-btn {
        width: 100%;
        min-width: 0;
    }
}
.categories-page {
    padding: 3rem 1rem 3.5rem;
}

.catalog-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
}

.page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.filters-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 96px;
}

.filters-toggle-row {
    display: flex;
    justify-content: flex-start;
}

.filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.filters-panel {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 88vw);
    max-width: 360px;
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    transform: translateX(110%);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    z-index: 9999;
    overflow-y: auto;
    display: grid;
    gap: 1.2rem;
}

.filters-panel.open {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(15, 35, 58, 0.1);
}

.filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 9998;
}

.filters-panel.open ~ .filters-overlay {
    opacity: 1;
    pointer-events: auto;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filters-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.filters-close {
    border: none;
    background: #eef2f7;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.filters-section {
    display: grid;
    gap: 1.2rem;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.2rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-size: 1.05rem;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background: linear-gradient(135deg, #ffffff, #f5f8fc);
    box-shadow: var(--shadow-sm);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(18, 58, 99, 0.08);
}

.price-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.price-filters input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.price-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.category-filters,
.institution-filters {
    display: grid;
    gap: 0.6rem;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    transition: all var(--transition-speed);
    box-shadow: var(--shadow-sm);
}

.chip-btn.active,
.chip-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), #1e5aa8);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.product-grid {
    margin-top: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.skeleton-card {
    height: 280px;
    background: linear-gradient(90deg, #f4f6fb 25%, #e7ecf4 50%, #f4f6fb 75%);
    background-size: 400% 400%;
    border-radius: var(--border-radius);
    animation: shimmer 1.8s ease infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.no-results p {
    color: var(--text-muted);
}

.mt-4 {
    margin-top: 1rem;
}

@media (max-width: 960px) {
    .filters-layout {
        position: relative;
        top: 0;
    }
}

@media (max-width: 640px) {
    .price-filters {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.empty-cart-page {
    padding: 6rem 1rem;
    text-align: center;
}

.empty-cart-page h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.empty-cart-page p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cart-page {
    padding: 3rem 1rem;
}

.cart-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #f1f5f9;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex-grow: 1;
}

.item-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.item-details a {
    transition: color var(--transition-speed);
}

.item-details a:hover {
    color: var(--primary-color);
}

.item-category {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
    flex-shrink: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #f1f5f9;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.quantity-controls button {
    color: var(--text-main);
    opacity: 0.7;
}

.quantity-controls button:hover:not(:disabled) {
    opacity: 1;
    color: var(--primary-color);
}

.quantity-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.remove-btn {
    color: #ef4444;
    opacity: 0.7;
    transition: opacity var(--transition-speed);
}

.remove-btn:hover {
    opacity: 1;
}

.cart-summary {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.summary-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.checkout-btn {
    width: 100%;
    gap: 0.5rem;
    padding: 1rem 0;
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-controls {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
}.checkout-page {
    padding: 3rem 1rem;
    max-width: 1000px;
}

.checkout-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.error-alert {
    margin-bottom: 1rem;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    padding: 0.8rem 1rem;
    text-align: center;
}

.tab {
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
}

.tab.active {
    color: var(--primary-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 4px 4px 0 0;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 3rem;
}

.checkout-form {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.checkout-form h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group.row {
    display: flex;
    gap: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.w-100 {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.checkout-summary {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.payment-section,
.success-section {
    display: flex;
    justify-content: center;
}

.payment-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    max-width: 500px;
    width: 100%;
}

.payment-header {
    background: #f1f5f9;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.payment-header img {
    margin-bottom: 1rem;
}

.payment-header h2 {
    font-size: 1.25rem;
}

.payment-body {
    padding: 2rem;
    text-align: center;
}

.instructions {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: left;
    border-left: 4px solid var(--primary-color);
}

.mode-note {
    margin-top: 0.7rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.payment-note {
    margin: 0.65rem 0 0;
    font-size: 0.93rem;
    color: var(--primary-color);
    font-weight: 600;
}

.trigger-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.spinner {
    animation: spin 1s linear infinite;
    color: var(--secondary-color);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.payment-footer {
    background: #f8fafc;
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.success-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {

    .checkout-layout,
    .form-group.row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
.login-page {
    min-height: calc(100vh - 80px);
    padding: 3rem 1rem 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at left top, rgba(37, 99, 235, 0.08), transparent 30%),
        radial-gradient(circle at right top, rgba(249, 115, 22, 0.08), transparent 26%),
        #f1f5f9;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.login-header {
    padding: 1.8rem 1.6rem 1rem;
    text-align: center;
}

.login-header h2 {
    margin: 0;
    font-size: 1.75rem;
    color: #0f172a;
}

.login-header p {
    margin: 0.55rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.login-tab {
    padding: 1rem;
    font-weight: 700;
    color: #94a3b8;
    background: white;
}

.login-tab.active.institution {
    color: #2563eb;
    box-shadow: inset 0 -3px 0 #2563eb;
}

.login-tab.active.parent-student {
    color: #f97316;
    box-shadow: inset 0 -3px 0 #f97316;
}

.login-error {
    margin: 1rem 1.2rem 0;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.92rem;
}

.login-success {
    margin: 1rem 1.2rem 0;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.92rem;
}

.login-form {
    padding: 1.4rem 1.4rem 1rem;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.92rem;
}

.field input {
    width: 100%;
    border: 1.5px solid #dbe3ee;
    border-radius: 12px;
    padding: 0.88rem 0.9rem;
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.96rem;
}

.field input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.orange-theme .field input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.pass-container {
    position: relative;
}

.toggle-btn {
    position: absolute;
    right: 0.85rem;
    top: 2.25rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.forgot-pass {
    display: block;
    width: 100%;
    text-align: right;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: transparent;
}

.orange-link {
    color: #f97316;
}

.btn-login {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.institution-btn {
    background: #2563eb;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.parent-student-btn {
    background: #f97316;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.2);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    padding: 1rem 1.4rem 1.2rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.login-footer a {
    color: #2563eb;
    font-weight: 700;
}

@media (max-width: 640px) {
    .login-page {
        padding-top: 2rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }
}
.register-page {
    min-height: calc(100vh - 80px);
    padding: 3rem 1rem 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.08), transparent 26%),
        #f1f5f9;
}

.register-card {
    width: 100%;
    max-width: 520px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.register-header {
    padding: 1.75rem 1.75rem 1rem;
    text-align: center;
}

.register-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.8rem;
}

.register-header p {
    margin: 0.6rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.register-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.register-tab {
    padding: 1rem;
    font-weight: 700;
    color: #64748b;
    background: white;
}

.register-tab.active.institution {
    color: #2563eb;
    box-shadow: inset 0 -3px 0 #2563eb;
}

.register-tab.active.parent-student {
    color: #f97316;
    box-shadow: inset 0 -3px 0 #f97316;
}

.register-error {
    margin: 1rem 1.25rem 0;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.92rem;
}

.register-form {
    padding: 1.4rem 1.4rem 1.2rem;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.92rem;
}

.field input,
.field select {
    width: 100%;
    border: 1.5px solid #dbe3ee;
    border-radius: 12px;
    padding: 0.84rem 0.9rem;
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.96rem;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.orange-theme .field input:focus,
.orange-theme .field select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.pass-container {
    position: relative;
}

.toggle-btn {
    position: absolute;
    right: 0.85rem;
    top: 2.3rem;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    font-size: 0.82rem;
}

.btn-submit {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: #2563eb;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.orange-theme .btn-submit {
    background: #f97316;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.18);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.register-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.4rem 1.25rem;
    text-align: center;
    color: #64748b;
    font-size: 0.94rem;
}

.register-footer a {
    color: #2563eb;
    font-weight: 700;
}

@media (max-width: 640px) {
    .register-page {
        padding-top: 2rem;
    }

    .register-header h2 {
        font-size: 1.5rem;
    }
}
.institution-upload-container {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.upload-header {
    margin-bottom: 2rem;
}

.upload-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.upload-header p {
    color: var(--text-muted);
}

.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    background: #f8fafc;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-drop-area:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.drop-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.file-formats-note {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.image-preview-wrapper {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.document-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--primary-color);
}

.doc-name {
    font-weight: 600;
    word-break: break-all;
}

.clear-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ef4444;
    color: #ef4444;
    background: #fef2f2;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.clear-file-btn:hover {
    background: #ef4444;
    color: #fff;
}

.upload-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upload-error {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    color: #ef4444;
    border-radius: var(--border-radius);
    border: 1px solid #fecaca;
    font-weight: 500;
}

.upload-success-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #f0fdf4;
    border-radius: var(--border-radius);
    border: 1px solid #bbf7d0;
}

.success-icon {
    color: #22c55e;
    margin-bottom: 1rem;
}

.upload-success-state h3 {
    color: #166534;
    margin-bottom: 0.5rem;
}

.upload-success-state p {
    color: #15803d;
    margin-bottom: 1.5rem;
}
.dashboard-page {
    padding: 3.5rem 1rem 4.5rem;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-surface,
.dashboard-profile-card,
.dashboard-nav,
.dashboard-admin-link {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.dashboard-profile-card {
    padding: 1.25rem;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

.dashboard-profile-card h2 {
    margin: 0.35rem 0 0.35rem;
    font-size: 1.5rem;
    line-height: 1.15;
    word-break: break-all;
    overflow-wrap: break-word;
}

.dashboard-profile-card p {
    margin: 0;
    color: var(--text-muted);
}

.dashboard-sidebar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.8rem;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    padding: 0.85rem 0.9rem;
    color: var(--text-main);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.dashboard-nav-link:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.dashboard-nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    box-shadow: 0 18px 36px rgba(30, 64, 175, 0.18);
}

.dashboard-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
}

.dashboard-nav-link.active .dashboard-nav-icon {
    background: rgba(255, 255, 255, 0.16);
}

.dashboard-nav-arrow {
    margin-left: auto;
    opacity: 0.6;
}

.dashboard-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.dashboard-admin-link:hover {
    background: #eff6ff;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1rem;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 45%),
        linear-gradient(135deg, rgba(30, 64, 175, 0.06), rgba(15, 23, 42, 0.02)),
        var(--surface-color);
}

.dashboard-hero h1,
.dashboard-section h1,
.section-head h2 {
    margin: 0.35rem 0 0.55rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dashboard-hero p,
.section-head p {
    margin: 0;
    color: var(--text-muted);
    max-width: 62ch;
}

.dashboard-hero-meta {
    align-self: start;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 1rem;
}

.dashboard-hero-meta span,
.order-card-grid span {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.dashboard-hero-meta strong,
.order-card-grid strong {
    display: block;
    margin-top: 0.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.25rem;
}

.stat-card h3 {
    margin: 0 0 0.6rem;
    font-size: 0.98rem;
    color: var(--text-muted);
}

.stat-num {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-num.smaller {
    font-size: 1.2rem;
    text-transform: capitalize;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.quick-card {
    display: block;
    padding: 1.3rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.24);
}

.quick-card h3 {
    margin: 0.35rem 0 0.5rem;
}

.quick-card p {
    margin: 0;
    color: var(--text-muted);
}

.quick-card-link,
.section-link,
.empty-state-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.orders-list {
    display: grid;
    gap: 0.9rem;
}

.compact-orders-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.order-card {
    padding: 1.2rem;
}

.order-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.order-label {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.order-card-head h3 {
    margin: 0.25rem 0 0.2rem;
    font-size: 1.15rem;
}

.order-card-head p {
    margin: 0;
    color: var(--text-muted);
}

.order-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-pending {
    background: #fff7ed;
    color: #c2410c;
}

.status-paid,
.status-active {
    background: #ecfdf5;
    color: #047857;
}

.status-processing {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-delivered {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled,
.status-suspended {
    background: #fef2f2;
    color: #b91c1c;
}

.status-admin {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.profile-panel {
    padding: 1.5rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-form .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.profile-form .form-group input,
.profile-form .form-group select {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    background: white;
}

.readonly-field input {
    background: #f8fafc;
    color: var(--text-muted);
}

.save-banner {
    margin-bottom: 1rem;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    font-size: 0.92rem;
}

.save-banner.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.save-banner.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.warning-state {
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    background: #fff7ed;
    color: #9a3412;
}

@media (max-width: 1080px) {
    .dashboard-shell,
    .dashboard-hero,
    .stats-grid,
    .dashboard-quick-grid,
    .order-card-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }
}

@media (max-width: 820px) {
    .dashboard-page {
        padding-top: 2.5rem;
    }

    .dashboard-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.95rem;
    }

    .dashboard-nav-link {
        min-width: 170px;
        flex-shrink: 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .dashboard-page {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .dashboard-profile-card,
    .dashboard-hero,
    .stat-card,
    .quick-card,
    .order-card,
    .profile-panel,
    .empty-state {
        padding: 1rem;
    }

    .dashboard-nav-link {
        min-width: 150px;
        padding: 0.8rem;
    }
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.75rem;
}

.action-card {
    display: grid;
    gap: 0.55rem;
    padding: 1.35rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f5f7fb);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
    border-color: rgba(59, 130, 246, 0.18);
}

.action-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.action-card p {
    margin: 0;
    color: #475569;
}

.action-link {
    font-weight: 700;
    color: #1d4ed8;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.15rem;
}

.action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.action-icon.bulk { background: rgba(251, 146, 60, 0.16); color: #c2410c; }
.action-icon.quote { background: rgba(14, 165, 233, 0.16); color: #0369a1; }
.action-icon.notify { background: rgba(250, 204, 21, 0.2); color: #854d0e; }

.admin-container {
  padding: 3.5rem 1rem 4.5rem;
}

.admin-container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.85rem;
}

.admin-sidebar button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  color: var(--text-main);
  font-weight: 600;
  background: transparent;
}

.admin-sidebar button:hover {
  background: #f1f5f9;
}

.admin-sidebar button.active {
  background: var(--primary-color);
  color: white;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem;
}

.admin-card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-size: 1.12rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.admin-stat {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.9rem;
}

.admin-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-stat strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 0.25rem;
  color: var(--text-main);
}

.admin-form .form-group {
  margin-bottom: 0.95rem;
}

.admin-form label {
  display: block;
  margin-bottom: 0.38rem;
  font-weight: 600;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  font-family: inherit;
}

.admin-form textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stock-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stock-quick {
  display: flex;
  gap: 0.4rem;
}

.stock-quick .small-btn {
  background: linear-gradient(135deg, var(--primary-color), #1e5aa8);
  color: #fff;
  border: 1px solid transparent;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
}

.stock-quick .small-btn:hover {
  box-shadow: 0 10px 20px rgba(18, 58, 99, 0.16);
}

.upload-box {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.8rem;
}

.cloudinary-box {
  text-align: left;
}

.cloudinary-hint {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.upload-mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  background: #f1f5f9;
}

.mode-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.file-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-name {
  font-size: 0.85rem;
  color: var(--text-main);
  margin: 0;
  font-weight: 500;
}

.admin-divider {
  border: 0;
  border-top: 1px dashed var(--border-color);
  margin: 1.5rem 0;
}

.internal-details-heading {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 1.05rem;
  font-weight: 700;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.form-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.form-actions .btn {
  min-width: 150px;
}

.admin-table {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.admin-table-head,
.admin-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.admin-table-head {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
}

.admin-table-row {
  border-top: 1px solid #eef2f7;
  font-size: 0.95rem;
}

.admin-table-empty {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.admin-table-head.orders,
.admin-table-row.orders {
  grid-template-columns: 0.8fr 1.2fr 0.8fr 1fr 1fr 1fr;
}

.admin-table-head.customers,
.admin-table-row.customers {
  grid-template-columns: 1.8fr 0.85fr 0.8fr 1.6fr 1fr 0.6fr 1fr;
}

.action-cell {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.small-btn {
  border-radius: 8px;
  padding: 0.36rem 0.65rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
}

.small-btn.edit {
  background: #2563eb;
}

.small-btn.delete {
  background: #dc2626;
}

.order-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.order-controls label {
  font-weight: 600;
}

.order-controls select,
.status-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
  background: white;
}

.status-select.status-pending {
  color: #b45309;
}

.status-select.status-paid {
  color: #047857;
}

.status-select.status-processing {
  color: #1d4ed8;
}

.status-select.status-delivered {
  color: #14532d;
}

.status-select.status-cancelled {
  color: #b91c1c;
}

.status-select.status-active {
  color: #047857;
}

.status-select.status-suspended {
  color: #b91c1c;
}

.success-alert,
.error-alert {
  margin-bottom: 1rem;
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  font-size: 0.92rem;
}

.success-alert {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.error-alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 1024px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-sidebar button {
    width: auto;
  }
}

@media (max-width: 760px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-table-head,
  .admin-table-row,
  .admin-table-head.orders,
  .admin-table-row.orders,
  .admin-table-head.customers,
  .admin-table-row.customers {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .admin-table-head {
    display: none;
  }

  .admin-table-row {
    padding: 0.8rem;
  }
}
.chat-widget-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
}

.chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 220px;
  border-radius: 999px;
  padding: 0.85rem 1rem 0.85rem 0.9rem;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 40%),
    linear-gradient(135deg, #0f766e, #1d4ed8 55%, #0f172a);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.28);
}

.chat-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.chat-fab-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chat-fab-copy strong {
  font-size: 0.98rem;
}

.chat-fab-copy span {
  opacity: 0.86;
  font-size: 0.78rem;
}

.chat-window {
  width: min(400px, calc(100vw - 28px));
  height: min(680px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
  animation: assistantReveal 0.25s ease;
}

@keyframes assistantReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1rem 0.9rem;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(135deg, #0f766e, #1d4ed8 58%, #0f172a);
}

.chat-header-copy h4 {
  margin: 0.4rem 0 0.25rem;
  font-size: 1.18rem;
}

.chat-header-copy p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.88;
}

.chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-secondary-btn,
.close-btn {
  color: white;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.chat-secondary-btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.chat-context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.chat-context-strip span {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.06), transparent 28%),
    #f8fafc;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  max-width: 100%;
}

.message.outgoing {
  justify-content: flex-end;
}

.message.incoming {
  justify-content: flex-start;
}

.message.outgoing .message-avatar {
  order: 2;
}

.message-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
}

.message.incoming .message-avatar {
  background: #dbeafe;
  color: #1d4ed8;
}

.message.outgoing .message-avatar {
  background: #d1fae5;
  color: #047857;
}

.message-content {
  max-width: min(82%, 290px);
}

.bubble {
  padding: 0.88rem 1rem;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.message.incoming .bubble {
  background: white;
  color: #0f172a;
  border-bottom-left-radius: 8px;
}

.message.outgoing .bubble {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: white;
  border-bottom-right-radius: 8px;
}

.bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.bubble p + p {
  margin-top: 0.45rem;
}

.message-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.suggestion-chip {
  padding: 0.48rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.suggestion-chip:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.typing-bubble span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: assistantTyping 1s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes assistantTyping {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1rem 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  background: white;
}

.chat-input input {
  flex: 1;
  min-width: 0;
  padding: 0.82rem 0.95rem;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #f8fafc;
  font-family: inherit;
}

.chat-input input:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: white;
}

.chat-input button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.24);
}

.chat-input button:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .chat-widget-container {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .chat-fab {
    width: 100%;
    justify-content: center;
  }

  .chat-window {
    width: 100%;
    height: min(76vh, 720px);
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .chat-header {
    padding: 0.9rem 0.9rem 0.8rem;
  }

  .chat-context-strip,
  .chat-messages,
  .chat-input {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .message-content {
    max-width: 100%;
  }

  .chat-fab-copy span {
    display: none;
  }
}
