/* ============================================
   TIGGABYTE - Modern IT Consulting Website
   ============================================ */

/* --- Custom Properties --- */
:root {
    --primary: #1a365d;
    --primary-light: #2d4a7a;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --text: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
    --container: 1200px;
    --nav-height: 72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- Container --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}
.section-title.text-left { text-align: left; }
.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}
.btn-primary {
    background: var(--accent);
    color: var(--text-white);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: var(--text-white);
    transform: translateY(-2px);
}
.btn-outline-sm {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}
.btn-outline-sm:hover {
    background: var(--accent);
    color: var(--text-white);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-nav {
    background: var(--accent);
    color: var(--text-white) !important;
    padding: 8px 20px !important;
    border-radius: var(--radius-sm) !important;
}
.btn-nav:hover {
    background: var(--accent-dark);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow var(--transition);
}
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-img {
    height: 40px;
    width: auto;
}
.footer-logo-img {
    height: 40px;
    width: auto;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links a {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--bg-alt);
}
.nav-links a.btn-nav.active {
    background: var(--accent-dark);
    color: var(--text-white) !important;
}
/* Avatar Dropdown */
.nav-avatar-wrap {
    position: relative;
}
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-white);
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-family: inherit;
}
.nav-avatar:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}
.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    overflow: hidden;
}
.avatar-dropdown.open {
    display: block;
}
.avatar-dropdown-header {
    padding: 14px 16px;
}
.avatar-dropdown-header strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
}
.avatar-dropdown-header span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.avatar-dropdown-divider {
    height: 1px;
    background: var(--border);
}
.avatar-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text);
    transition: background var(--transition);
}
.avatar-dropdown a:hover {
    background: var(--bg-alt);
    color: var(--text);
}
.avatar-dropdown-logout {
    color: #dc2626 !important;
}
.avatar-dropdown-logout:hover {
    background: #fef2f2 !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition);
    border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: calc(var(--nav-height) + 80px) 0 100px;
    background: linear-gradient(135deg, var(--primary) 0%, #0f2847 50%, #0c1e3a 100%);
    position: relative;
    overflow: hidden;
}
.hero-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay,
.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.88) 0%, rgba(15,40,71,0.82) 50%, rgba(12,30,58,0.75) 100%);
    z-index: 0;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}
.hero-title {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-weight: 800;
}
.hero-title .highlight {
    color: var(--accent);
}
.hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero .btn-outline {
    color: var(--text-white);
    border-color: rgba(255,255,255,0.4);
}
.hero .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-white);
    color: var(--text-white);
}

/* Page Hero (inner pages) */
.page-hero {
    padding: calc(var(--nav-height) + 60px) 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, #0f2847 100%);
    text-align: center;
}
.page-hero-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.page-hero h1 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}
.page-hero p {
    color: rgba(255,255,255,0.7);
    font-size: 1.15rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}
.section:nth-child(even) {
    background: var(--bg-alt);
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(26,54,93,0.1));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}
.card h3 {
    margin-bottom: 12px;
    color: var(--primary);
}
.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}
.card-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition);
}
.card-link:hover {
    color: var(--accent-dark);
}

/* --- Photo Cards --- */
.card-photo {
    padding: 0;
    overflow: hidden;
}
.card-photo .card-body {
    padding: 24px 28px 28px;
}
.card-photo-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.card-photo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card-photo:hover .card-photo-img img {
    transform: scale(1.05);
}

/* --- CTA Photo --- */
.cta-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.cta-photo .cta-content {
    position: relative;
    z-index: 1;
}

/* --- Service Photo Blocks --- */
.service-photo-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 20px 0;
}
.service-photo-block.reverse {
    direction: rtl;
}
.service-photo-block.reverse > * {
    direction: ltr;
}
.service-photo-media {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.service-photo-media img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.service-photo-media:hover img {
    transform: scale(1.03);
}
.service-photo-content h2 {
    margin-bottom: 1rem;
}
.service-photo-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* --- Mission Section (About page) --- */
.mission-section {
    background: var(--bg-alt);
}
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.mission-photo {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.mission-photo img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}
.mission-text h2 {
    margin-bottom: 1rem;
}
.mission-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
}
.mission-text .btn {
    margin-top: 8px;
}

/* --- Technology Grid --- */
.tech-partners {
    background: var(--bg-alt);
}
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}
.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    transition: all var(--transition);
}
.tech-item:hover {
    opacity: 1;
    transform: translateY(-4px);
}
.tech-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.tech-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tech-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

/* --- About Preview Photo --- */
.about-preview-photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-photo-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}
.about-stats-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(15,23,42,0.9));
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stat-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 10px 16px;
}
.stat-pill .stat-number {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0;
    min-width: 56px;
}
.stat-pill .stat-label {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- Contact Photo --- */
.contact-photo {
    margin-top: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.contact-photo img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
}
.contact-form-title {
    margin-bottom: 24px;
    color: var(--primary);
    font-size: 1.2rem;
}

/* --- About Preview --- */
.about-preview {
    background: var(--bg-alt);
}
.about-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-preview-text p {
    color: var(--text-light);
    margin-bottom: 1.2rem;
}
.about-preview-text .btn {
    margin-top: 8px;
}
.about-preview-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    text-align: center;
    transition: all var(--transition);
}
.stat:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}
.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}
.product-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.product-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.product-card h3 {
    margin-bottom: 12px;
    color: var(--primary);
}
.product-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* --- Testimonials --- */
.testimonials {
    background: var(--bg-alt);
}
.testimonial-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.testimonial-text {
    color: var(--text-light);
    font-style: italic;
    font-size: 1.1rem;
}

/* --- CTA --- */
.cta {
    background: var(--accent) !important;
    text-align: center;
    padding: 80px 0;
}
.cta-content h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}
.cta-content p {
    color: rgba(255,255,255,0.95);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.cta .btn-primary {
    background: var(--text-white);
    color: var(--accent);
    border-color: var(--text-white);
}
.cta .btn-primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
}
.about-story h2 {
    margin-bottom: 0.5rem;
}
.about-story h3 {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.about-story p {
    color: var(--text-light);
    margin-bottom: 1.2rem;
}
.about-values {
    display: grid;
    gap: 20px;
}
.value-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}
.value-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.value-icon {
    color: var(--accent);
    margin-bottom: 12px;
}
.value-card h4 {
    margin-bottom: 6px;
    color: var(--primary);
}
.value-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ============================================
   SERVICES PAGE
   ============================================ */
.service-detail {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: start;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}
.service-detail:last-of-type {
    border-bottom: none;
}
.service-detail.reverse {
    direction: rtl;
}
.service-detail.reverse > * {
    direction: ltr;
}
.service-detail-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(26,54,93,0.1));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.service-detail-content h2 {
    margin-bottom: 1rem;
}
.service-detail-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.service-features {
    display: grid;
    gap: 8px;
}
.service-features li {
    padding-left: 28px;
    position: relative;
    color: var(--text-light);
    font-size: 0.95rem;
}
.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.2;
}
.service-features li::after {
    content: '✓';
    position: absolute;
    left: 3px;
    top: 0;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Partners */
.partners {
    background: var(--bg-alt);
}
/* Scrolling Marquee */
.marquee-wrap {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    padding: 20px 0;
}
.marquee-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}
.marquee-item {
    flex-shrink: 0;
}
.marquee-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    white-space: nowrap;
    opacity: 0.7;
    transition: all 0.3s;
}
.marquee-logo:hover {
    opacity: 1;
    border-color: var(--accent);
    color: var(--text);
}
.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 10px;
}
.marquee-dark {
    background: #1a2332;
    padding: 12px 28px;
}
.marquee-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s;
}
.marquee-img-sm {
    height: 50px;
    width: auto;
    min-width: 120px;
}
.marquee-img-lg {
    height: 80px;
}
.marquee-item:hover .marquee-img {
    opacity: 1;
}
.marquee-dark .marquee-img {
    opacity: 0.85;
    filter: none;
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-25%); }
}

/* ============================================
   SOFTWARE PAGE
   ============================================ */
.software-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}
.software-card:last-of-type {
    border-bottom: none;
}
.software-card.reverse {
    direction: rtl;
}
.software-card.reverse > * {
    direction: ltr;
}
.software-card-media {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}
.software-card-media img {
    max-height: 200px;
    object-fit: contain;
}
.software-placeholder {
    text-align: center;
    color: var(--accent);
}
.software-placeholder h3 {
    margin-top: 16px;
    color: var(--primary);
}
.software-card-content h2 {
    margin-bottom: 1rem;
}
.software-card-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.software-features {
    display: grid;
    gap: 8px;
    margin-bottom: 2rem;
}
.software-features li {
    padding-left: 28px;
    position: relative;
    color: var(--text-light);
    font-size: 0.95rem;
}
.software-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.2;
}
.software-features li::after {
    content: '✓';
    position: absolute;
    left: 3px;
    top: 0;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}
.contact-info h2 {
    margin-bottom: 1rem;
}
.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
}
.contact-details {
    display: grid;
    gap: 16px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
}
.contact-item svg {
    color: var(--accent);
    flex-shrink: 0;
}
.contact-item a {
    color: var(--accent);
    font-weight: 500;
}
.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--primary);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}
.form-status {
    margin-top: 16px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}
.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 0.8fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.footer-logo-img {
    height: 40px;
    width: auto;
}
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer-links h4,
.footer-software h4,
.footer-connect h4 {
    color: var(--text-white);
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.footer-links ul,
.footer-software ul {
    display: grid;
    gap: 8px;
}
.footer-links a,
.footer-software a {
    font-size: 0.9rem;
    transition: color var(--transition);
}
.footer-links a:hover,
.footer-software a:hover {
    color: var(--accent);
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: all var(--transition);
}
.social-link:hover {
    background: var(--accent);
    color: var(--text-white);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-container {
    max-width: 420px;
    margin: 0 auto;
}
.auth-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}
.auth-alt {
    text-align: center;
    margin-top: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
}
.auth-alt a {
    color: var(--accent);
    font-weight: 600;
}
.auth-alt a:hover { text-decoration: underline; }

/* ============================================
   ACCOUNT PAGE
   ============================================ */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.account-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}
.account-card h3 {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.2rem;
}
.account-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.account-field:last-of-type { border-bottom: none; }
.account-label { color: var(--text-light); font-size: 0.9rem; }
.account-value { color: var(--text); font-weight: 500; font-size: 0.9rem; }
.account-badge {
    background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(26,54,93,0.1));
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}
.account-no-license {
    color: var(--text-light);
    font-size: 0.95rem;
}
.account-no-license a { color: var(--accent); font-weight: 600; }
.account-actions { margin-top: 20px; }
.account-admin-link { margin-top: 32px; text-align: center; }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}
.admin-sidebar {
    background: var(--bg-dark);
    padding: 24px 0;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}
.admin-sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}
.admin-sidebar-header h3 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin: 0;
}
.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}
.admin-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
}
.admin-nav a.active {
    background: var(--accent);
    color: var(--text-white);
}
.admin-nav a svg { flex-shrink: 0; }
.admin-main {
    padding: 32px 40px;
    background: var(--bg-alt);
    overflow-y: auto;
}
.admin-main h2 {
    margin-bottom: 24px;
    font-size: 1.5rem;
    color: var(--primary);
}
.admin-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.admin-metric-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.admin-metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}
.admin-metric-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}
.admin-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.admin-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.admin-card h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--primary);
}
.admin-card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}
.admin-card-link:hover { text-decoration: underline; }
.admin-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-activity-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.admin-activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.admin-activity-action { font-weight: 600; font-size: 0.85rem; color: var(--primary); }
.admin-activity-detail { font-size: 0.8rem; color: var(--text-light); }
.admin-activity-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
.admin-empty { color: var(--text-light); font-size: 0.9rem; text-align: center; padding: 20px; }
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th {
    text-align: left; padding: 10px 12px; background: var(--bg-alt);
    color: var(--text-light); font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border);
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-input-sm { width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.85rem; }
.admin-input-md { width: 160px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.85rem; }
.admin-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; background: var(--bg-alt); color: var(--text-light);
}
.admin-badge-standard { background: #eff6ff; color: #1e40af; }
.admin-badge-enterprise { background: #fef3c7; color: #92400e; }
.admin-badge-admin { background: #dcfce7; color: #166534; }
.admin-actions-cell { position: relative; }
.admin-actions-dropdown > summary { cursor: pointer; list-style: none; }
.admin-actions-dropdown > summary::-webkit-details-marker { display: none; }
.admin-actions-menu {
    position: absolute; right: 0; top: 100%; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg); padding: 8px; z-index: 100; min-width: 220px;
}
.admin-actions-menu button,
.admin-actions-menu summary {
    display: block; width: 100%; text-align: left; padding: 6px 10px;
    border: none; background: none; font-size: 0.85rem; cursor: pointer;
    border-radius: 4px; color: var(--text); font-family: inherit;
}
.admin-actions-menu button:hover,
.admin-actions-menu summary:hover { background: var(--bg-alt); }
.admin-inline-form > form {
    padding: 8px; display: flex; flex-direction: column; gap: 6px;
}
.admin-inline-form input,
.admin-inline-form select {
    padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px;
    font-size: 0.8rem; font-family: inherit;
}
.form-select {
    padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.95rem; color: var(--text); background: var(--bg);
}

/* Admin User Cards */
.admin-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.admin-user-summary {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    flex-wrap: wrap;
}
.admin-user-detail {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.admin-user-detail.open { display: block; }
.admin-user-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.admin-action-section h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 12px;
}
.admin-action-form .form-group {
    margin-bottom: 10px;
}
.admin-action-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}
.admin-action-form input,
.admin-action-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

/* ============================================
   ADMIN TABS
   ============================================ */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 0;
}
.admin-tab {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* PoolChemCalc sa-tab styles */
.sa-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}
.sa-tab-btn {
    padding: 0.6rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.sa-tab-btn.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}
.sa-tab-btn:hover:not(.active) {
    color: #334155;
}

/* ============================================
   PRICING EDIT CARDS
   ============================================ */
.pricing-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.pricing-edit-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}
.pricing-edit-card:hover { box-shadow: var(--shadow-md); }
.pricing-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.pricing-edit-header h4 { margin: 0; font-size: 1rem; color: var(--primary); }
.pricing-edit-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}
.pricing-edit-price span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
}
.pricing-edit-form .form-group { margin-bottom: 12px; }
.pricing-edit-form label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}
.pricing-edit-form input[type="number"],
.pricing-edit-form input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

/* ============================================
   PROMO CODE CARDS
   ============================================ */
.promo-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.promo-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.promo-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}
.promo-card:hover { box-shadow: var(--shadow-md); }
.promo-inactive { opacity: 0.6; }
.promo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.promo-code-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}
.promo-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.promo-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.promo-detail span { color: var(--text-light); }
.promo-detail strong { color: var(--text); }

/* ============================================
   STRIPE SETUP WIZARD (PoolChemCalc style)
   ============================================ */
.sa-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.sa-status-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.sa-status-value { font-size: 0.85rem; color: var(--text-light); }
.sa-status-value.configured { color: var(--accent); }
.sa-check { font-size: 1rem; margin-right: 4px; }
.sa-status-value.configured .sa-check { color: #16a34a; }

/* Accordion Steps */
.sa-step {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}
.sa-step.complete { border-left: 3px solid #16a34a; }
.sa-step > summary { list-style: none; }
.sa-step > summary::-webkit-details-marker { display: none; }
.sa-step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
}
.sa-step-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--border); color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.sa-step-icon.done { background: #16a34a; color: var(--text-white); }
.sa-step-info { flex: 1; }
.sa-step-info strong { display: block; font-size: 0.95rem; color: var(--text); }
.sa-step-info span { font-size: 0.8rem; color: var(--text-light); }
.sa-step-chevron { color: var(--text-light); font-size: 0.8rem; transition: transform var(--transition); }
.sa-step[open] .sa-step-chevron { transform: rotate(90deg); }
.sa-step-body { padding: 0 20px 20px 68px; border-top: 1px solid var(--border); }

/* Form Elements */
.sa-form-group { margin-bottom: 16px; }
.sa-form-group label {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: var(--text); margin-bottom: 6px;
}
.sa-form-group input[type="text"],
.sa-form-group input[type="password"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 0.85rem; font-family: inherit;
    color: var(--text); background: var(--bg);
}
.sa-form-group input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}
.sa-current-val { margin-bottom: 8px; font-size: 0.8rem; color: var(--text-light); }
.sa-current-val code {
    background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; font-size: 0.78rem;
}
.sa-mode-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
    letter-spacing: 0.5px; margin-left: 6px;
}
.sa-mode-badge.live { background: #dcfce7; color: #166534; }
.sa-mode-badge.test { background: #eff6ff; color: #6366f1; }
.sa-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 4px; }
.sa-hint a { color: #6366f1; }
.sa-btn-primary {
    display: inline-block; padding: 8px 20px; background: var(--accent);
    color: var(--text-white); border: none; border-radius: 6px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: all var(--transition);
}
.sa-btn-primary:hover { background: var(--accent-dark); }
.sa-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.sa-btn {
    display: inline-block; padding: 8px 20px; background: var(--bg);
    color: var(--text); border: 1px solid var(--border); border-radius: 6px;
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    font-family: inherit; text-decoration: none; transition: all var(--transition);
}
.sa-btn:hover { background: var(--bg-alt); border-color: var(--text-light); }
.sa-info-box {
    margin-bottom: 16px; padding: 12px 16px;
    background: var(--bg-alt); border-radius: 8px; font-size: 0.85rem;
}
.sa-endpoint-code {
    display: block; background: var(--border); padding: 8px 12px;
    border-radius: 4px; font-size: 0.78rem; word-break: break-all; margin-top: 4px;
}
.sa-warning-box {
    margin-bottom: 16px; padding: 12px 16px;
    background: #fefce8; border: 1px solid #fef08a;
    border-radius: 8px; font-size: 0.78rem; color: #854d0e;
}
.sa-event-chip {
    background: #fef9c3; padding: 2px 8px; border-radius: 4px; font-size: 0.72rem;
}
.sa-instructions {
    margin-top: 20px; padding: 12px 16px;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 8px; font-size: 0.78rem; color: var(--text-light);
}
.sa-instructions ol { margin: 8px 0 0; padding-left: 20px; }
.sa-instructions li { margin-bottom: 4px; }
.sa-instructions a { color: #6366f1; }

/* Pricing Grid & Cards */
.sa-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.sa-pricing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}
.sa-pricing-card:hover { box-shadow: var(--shadow-md); }
.sa-card-inactive { opacity: 0.5; }

/* Modal — exact copy from PoolChemCalc SystemAdminLayout.css */
.sa-modal {
    background: white;
    border: none;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
.sa-modal::backdrop { background: rgba(0,0,0,0.5); }
.sa-modal-content { padding: 0; }
.sa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.sa-modal-header h3 { margin: 0; font-size: 1rem; color: #1e293b; }
.sa-modal-close {
    background: none; border: none; font-size: 1.25rem;
    color: #64748b; cursor: pointer;
}
.sa-modal-close:hover { color: #1e293b; }
.sa-modal form,
.sa-modal .sa-modal-body { padding: 1.25rem; }
.sa-modal .sa-form-group { margin-bottom: 1rem; }
.sa-modal .sa-form-group label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: #475569; margin-bottom: 0.35rem;
}
.sa-modal .sa-form-group input,
.sa-modal .sa-form-group select {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0; border-radius: 0.375rem;
    font-size: 0.85rem; outline: none; font-family: inherit;
}
.sa-modal .sa-form-group input::placeholder { color: #94a3b8; }
.sa-modal .sa-form-group input:focus,
.sa-modal .sa-form-group select:focus {
    border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.1);
}
/* PoolChemCalc modal footer buttons */
.sa-btn-save {
    background: #6366f1; border: 1px solid #6366f1;
    color: white; padding: 0.5rem 1rem; border-radius: 0.375rem;
    font-size: 0.85rem; cursor: pointer; font-family: inherit;
    font-weight: 600; transition: all 0.2s;
}
.sa-btn-save:hover { background: #4f46e5; border-color: #4f46e5; }
.sa-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }
.sa-btn-cancel {
    background: white; border: 1px solid #e2e8f0;
    color: #64748b; padding: 0.5rem 1rem; border-radius: 0.375rem;
    font-size: 0.85rem; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.sa-btn-cancel:hover { border-color: #cbd5e1; color: #1e293b; }

/* ============================================
   ORG ADMIN CARDS
   ============================================ */
.org-section-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 32px 0 16px;
}
.org-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.org-license-card, .org-member-card, .org-invite-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}
.org-license-card:hover, .org-member-card:hover {
    box-shadow: var(--shadow-md);
}
.org-license-assigned {
    border-left: 3px solid var(--accent);
}
.org-license-key {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.org-license-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.org-license-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
}
.org-license-avatar, .org-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.org-license-user-name, .org-member-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.org-license-user-email, .org-member-email {
    font-size: 0.8rem;
    color: var(--text-light);
}
.org-license-machine {
    font-size: 0.7rem;
    color: var(--text-light);
    font-family: monospace;
    margin-top: 2px;
}
.org-license-empty {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
    padding: 8px 0;
}
.org-license-expires {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
}
.org-member-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.org-member-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.org-member-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.org-detail-label {
    color: var(--text-light);
}
.org-invite-card {
    border-left: 3px solid #f59e0b;
}
.org-invite-email {
    font-weight: 600;
    color: var(--text);
}
.org-invite-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HOME - PRODUCT HIGHLIGHT (single product)
   ============================================ */
.product-highlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    transition: all var(--transition);
}
.product-highlight:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.product-highlight-media {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.product-highlight-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.product-highlight-content h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--primary);
}
.product-tagline {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.product-highlight-content p {
    color: var(--text-light);
}
.product-highlight-content .btn {
    margin-top: 8px;
}

/* ============================================
   FILEFORGE PAGE
   ============================================ */
.ff-hero {
    padding: calc(var(--nav-height) + 60px) 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, #0f2847 100%);
}
.ff-hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
}
.ff-hero-text h1 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}
.ff-version {
    font-size: 0.5em;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    vertical-align: middle;
}
.ff-tagline {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.ff-description {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 540px;
}
.ff-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.ff-hero .btn-outline {
    color: var(--text-white);
    border-color: rgba(255,255,255,0.4);
}
.ff-hero .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-white);
    color: var(--text-white);
}
.ff-trial-note {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 12px;
}
.ff-hero-media {
    flex-shrink: 0;
}
.ff-hero-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Download Bar */
.ff-download-bar {
    background: var(--bg-dark);
    padding: 12px 0;
}
.ff-download-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ff-download-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ff-download-version {
    color: var(--text-white);
    font-weight: 700;
    font-size: 0.9rem;
}
.ff-download-date {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}
.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

/* Tier Titles */
.ff-tier-title {
    color: var(--primary);
    font-size: 1.3rem;
    margin: 48px 0 16px;
    text-align: center;
}
.ff-tier-title:first-of-type {
    margin-top: 0;
}
.ff-tier-subtitle {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Category Titles */
.ff-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 48px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.ff-category-title:first-of-type {
    margin-top: 0;
}
.ff-category-title svg {
    color: var(--accent);
}

/* Modules */
.ff-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 16px;
}
.ff-module {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}
.ff-module:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.ff-module-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
    overflow: hidden;
}
.ff-module-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ff-emoji {
    font-size: 36px;
    line-height: 1;
}
.ff-emoji-bw {
    filter: grayscale(100%);
}
.ff-module h3 {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 1.1rem;
}
.ff-module p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Pricing - PoolChemCalc Style */
.ff-pricing-section {
    background: var(--bg-alt);
}

/* Billing Toggle (PoolChemCalc style) */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.billing-toggle-pill {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 3px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}
.billing-toggle-option {
    position: relative;
    z-index: 1;
    padding: 0.4rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6b7280;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 9999px;
    transition: color 0.3s;
    white-space: nowrap;
    text-align: center;
    font-family: inherit;
}
.billing-toggle-option.active {
    color: white;
    font-weight: 600;
}
.billing-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: calc(50% - 3px);
    background: var(--accent);
    border-radius: 9999px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.billing-toggle-pill.yearly .billing-toggle-slider {
    left: calc(50%);
}
.billing-toggle-save {
    font-size: 0.7rem;
    font-weight: 600;
    color: #16a34a;
    background: #f0fdf4;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
    transition: opacity 0.3s;
}
.billing-toggle-save.hidden {
    opacity: 0;
}
.ff-price-monthly { display: block; }
.ff-price-yearly { display: none; }
.billing-yearly .ff-price-monthly { display: none; }
.billing-yearly .ff-price-yearly { display: block; }

.ff-pricing-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 20px auto 0;
}
.ff-plan-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    position: relative;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.ff-plan-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.ff-plan-featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}
.ff-plan-featured:hover {
    transform: scale(1.02) translateY(-4px);
}
.ff-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.ff-plan-header {
    padding: 32px 24px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.ff-plan-header h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 16px;
}
.ff-plan-price {
    margin-bottom: 8px;
}
.ff-plan-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}
.ff-plan-period {
    font-size: 0.9rem;
    color: var(--text-light);
}
.ff-plan-desc {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0;
}
.ff-plan-features {
    padding: 24px;
    flex: 1;
}
.ff-plan-features li {
    padding: 6px 0 6px 28px;
    position: relative;
    color: var(--text);
    font-size: 0.9rem;
}
.ff-plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}
.ff-plan-cta {
    padding: 0 24px 28px;
}
.ff-plan-btn {
    width: 100%;
    text-align: center;
}
.ff-pricing-3col {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 24px;
}
.ff-pricing-single {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-bottom: 24px;
}
.ff-pricing-2col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 760px;
    margin-bottom: 24px;
}
.ff-pricing-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.ff-pricing-note a {
    color: var(--accent);
    font-weight: 500;
}
.ff-pricing-note a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .about-preview-grid,
    .about-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .software-card {
        grid-template-columns: 1fr;
    }
    .software-card.reverse {
        direction: ltr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .service-detail {
        grid-template-columns: 1fr;
    }
    .service-detail.reverse {
        direction: ltr;
    }
    .service-photo-block {
        grid-template-columns: 1fr;
    }
    .service-photo-block.reverse {
        direction: ltr;
    }
    .mission-grid {
        grid-template-columns: 1fr;
    }
    .service-detail-icon {
        width: 80px;
        height: 80px;
    }
    .ff-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .ff-hero-media {
        order: -1;
    }
    .ff-hero-logo {
        width: 150px;
        height: 150px;
    }
    .ff-hero-actions {
        justify-content: center;
    }
    .ff-description {
        max-width: none;
    }
    .product-highlight {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .product-highlight-media {
        margin: 0 auto;
    }
    .ff-pricing-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .ff-pricing-3col {
        grid-template-columns: repeat(2, 1fr);
    }
    .account-grid {
        grid-template-columns: 1fr;
    }
    .ff-plan-featured {
        transform: none;
    }
    .ff-plan-featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        width: 100%;
        padding: 12px 16px;
    }
    .btn-nav {
        text-align: center;
        margin-top: 8px;
    }
    .hero {
        padding: calc(var(--nav-height) + 40px) 0 60px;
    }
    .hero-title { font-size: 2rem; }
    .section { padding: 60px 0; }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .about-preview-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .ff-pricing-cards {
        grid-template-columns: 1fr;
    }
    /* About page: stats 2x2, values 1 col on mobile */
    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
    .about-values-grid {
        grid-template-columns: 1fr !important;
    }
    /* Tech grid: 2x2 on mobile */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 100%;
    }
    /* FileForge tools: 1 col */
    .ff-modules-grid {
        grid-template-columns: 1fr;
    }
    /* FileForge hero */
    .ff-download-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    /* Pricing toggle */
    .billing-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }
    /* Admin sidebar collapses */
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .admin-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .admin-nav a {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    .admin-nav a svg {
        display: none;
    }
    .admin-main {
        margin-left: 0;
        padding: 16px;
    }
    /* Admin grid */
    .admin-grid-2col {
        grid-template-columns: 1fr;
    }
    /* Org cards */
    .org-card-grid {
        grid-template-columns: 1fr;
    }
    /* Contact form */
    .contact-layout {
        grid-template-columns: 1fr;
    }
    /* Marquee smaller */
    .marquee-img {
        height: 40px;
    }
    .marquee-img-lg {
        height: 60px;
    }
    /* Avatar dropdown */
    .avatar-dropdown {
        right: -60px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
    .about-preview-stats {
        grid-template-columns: 1fr;
    }
    .marquee-track {
        gap: 30px;
    }
    /* Tech grid: single col on very small */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tech-icon {
        width: 52px;
        height: 52px;
    }
    .tech-item span {
        font-size: 0.75rem;
    }
    /* Section titles smaller */
    .section-title {
        font-size: 1.5rem;
    }
    /* Service cards text */
    .service-detail-content h3 {
        font-size: 1.1rem;
    }
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    /* Pricing cards full width */
    .ff-pricing-single {
        max-width: 100%;
    }
    .ff-pricing-2col {
        max-width: 100%;
        grid-template-columns: 1fr;
    }
    .ff-pricing-3col {
        grid-template-columns: 1fr;
    }
    /* Admin cards */
    .sa-card {
        padding: 1rem;
    }
    .sa-modal {
        max-width: 95vw;
        margin: 8px;
    }
    /* CTA section */
    .cta-content h2 {
        font-size: 1.5rem;
    }
}

/* ── Legal Pages (Privacy Policy, Terms of Service) ─────────── */

.legal-content {
    line-height: 1.8;
    color: var(--text);
}

.legal-content h2 {
    color: var(--primary);
    font-size: 1.35rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.legal-content h3 {
    color: var(--primary-light);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content ul {
    margin: 0.5rem 0 1.25rem 1.5rem;
    color: var(--text-light);
}

.legal-content ul li {
    margin-bottom: 0.4rem;
}

.legal-content a {
    color: var(--accent);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.legal-content strong {
    color: var(--text);
}
