/* ========================================
   Super Golden Investment - Main Stylesheet
   Luxury • Professional • Mobile-First
   ======================================== */

:root {
    --gold: #C9A227;
    --gold-light: #E8D48B;
    --gold-dark: #A6851E;
    --navy: #0B1C2C;
    --navy-light: #132A40;
    --navy-mid: #1A3A55;
    --white: #FFFFFF;
    --off-white: #F8F6F1;
    --gray-100: #F1F0EB;
    --gray-200: #E5E2D9;
    --gray-400: #9A9588;
    --gray-600: #5C584E;
    --gray-800: #2C2A25;
    --success: #1A7A4C;
    --danger: #B33A3A;
    --shadow-sm: 0 2px 8px rgba(11, 28, 44, 0.06);
    --shadow: 0 8px 30px rgba(11, 28, 44, 0.1);
    --shadow-lg: 0 20px 60px rgba(11, 28, 44, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--off-white);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.45);
}

.btn-outline {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--navy);
}

.btn-dark {
    background: var(--navy);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--navy-mid);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 28, 44, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
}

.logo-icon {
    color: var(--gold);
    font-size: 1.5rem;
}

.logo .gold {
    color: var(--gold);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu > li > a {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--gold);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 8px;
}

.user-greeting {
    color: var(--gold-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--navy-light);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--radius);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    box-shadow: var(--shadow-lg);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #0F2A45 100%);
    color: var(--white);
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201,162,39,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: rgba(201, 162, 39, 0.15);
    border: 1px solid rgba(201, 162, 39, 0.3);
    color: var(--gold-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 20px;
}

.hero h1 .gold {
    color: var(--gold);
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ========== Sections ========== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 50px;
}

.section-header .eyebrow {
    display: inline-block;
    color: var(--gold-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.05rem;
}

/* ========== Service Cards ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201, 162, 39, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(201,162,39,0.15), rgba(201,162,39,0.05));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--gold-dark);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.service-card .card-link {
    color: var(--gold-dark);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.service-card .card-link:hover {
    gap: 10px;
}

/* ========== About ========== */
.about-section {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--gray-600);
    margin-bottom: 16px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.stat-item .number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-dark);
}

.stat-item .label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 4px;
}

.about-visual {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    border-radius: var(--radius-lg);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.about-visual .big-icon {
    font-size: 8rem;
    color: rgba(201, 162, 39, 0.25);
}

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255,255,255,0.8);
    max-width: 500px;
    margin: 0 auto 32px;
}

/* ========== Contact ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h3 {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item .icon {
    width: 44px;
    height: 44px;
    background: rgba(201,162,39,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-dark);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-form {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    background: var(--white);
    transition: var(--transition);
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235C584E' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.form-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: var(--success);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ========== Auth Pages ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-card .logo {
    justify-content: center;
    margin-bottom: 8px;
    color: var(--navy);
}

.auth-card h1 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--gold-dark);
    font-weight: 600;
}

/* ========== Dashboard ========== */
.dashboard-page {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--gray-600);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.dash-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.dash-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(201, 162, 39, 0.35);
}

.dash-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, rgba(201,162,39,0.18), rgba(201,162,39,0.06));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.dash-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.dash-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.recent-requests {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.recent-requests h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.request-table {
    width: 100%;
    border-collapse: collapse;
}

.request-table th,
.request-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.request-table th {
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-100);
}

.request-table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-processing {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-completed {
    background: #D1FAE5;
    color: #065F46;
}

/* ========== Service Detail Pages ========== */
.service-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--white);
    padding: 130px 0 70px;
    text-align: center;
}

.service-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 12px;
}

.service-hero p {
    color: rgba(255,255,255,0.8);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.service-content {
    padding: 60px 0;
}

.service-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
}

.service-info h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.service-info p {
    color: var(--gray-600);
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    margin: 24px 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--gray-800);
}

.feature-list li::before {
    content: '✓';
    color: var(--gold-dark);
    font-weight: 700;
    flex-shrink: 0;
}

.process-form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 100px;
}

.process-form-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.process-form-card .form-desc {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ========== Footer ========== */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.75);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer h4 {
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    display: block;
    padding: 6px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ========== Alerts ========== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: var(--success);
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--danger);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .about-grid,
    .contact-grid,
    .service-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        height: 280px;
        order: -1;
    }
    
    .process-form-card {
        position: static;
    }
    
    .stats-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        border-bottom: 1px solid rgba(201,162,39,0.2);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }
    
    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-menu > li > a {
        display: block;
        padding: 12px 16px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        border: none;
        display: none;
        margin-top: 4px;
    }
    
    .dropdown.open .dropdown-menu {
        display: block;
    }
    
    .nav-user {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin: 8px 0 0;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .hero {
        padding: 120px 0 70px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 36px 24px;
    }
    
    .request-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Language switcher */
.lang-switch { margin-left: 8px; }
.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
}
.lang-btn:hover {
    background: var(--gold);
    color: var(--navy);
}

/* File upload */
.file-input-wrap {
    position: relative;
}
.file-input-wrap input[type=file] {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed var(--gray-200);
    border-radius: 10px;
    background: var(--gray-100);
    font-size: 0.9rem;
}
.file-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 6px;
}

/* Admin styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.admin-stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.admin-stat .num {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-dark);
}
.admin-stat .lbl {
    font-size: 0.85rem;
    color: var(--gray-600);
}
.admin-table-wrap {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.admin-actions a, .admin-actions button {
    margin-right: 6px;
}
.badge-rejected {
    background: #FEE2E2;
    color: #991B1B;
}


/* ========== AI Chat Widget ========== */
.sgi-chat-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}
body.rtl .sgi-chat-root {
    right: auto;
    left: 24px;
}
.sgi-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #C9A227 0%, #A6851E 100%);
    color: #0B1C2C;
    box-shadow: 0 8px 28px rgba(201, 162, 39, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sgi-chat-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 32px rgba(201, 162, 39, 0.55);
}
.sgi-chat-toggle .sgi-close-icon { display: none; font-size: 1.4rem; font-weight: 700; }
.sgi-chat-root.open .sgi-chat-toggle .sgi-bot-icon { display: none; }
.sgi-chat-root.open .sgi-chat-toggle .sgi-close-icon { display: block; }

.sgi-chat-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(11, 28, 44, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, 0.25);
}
body.rtl .sgi-chat-panel {
    right: auto;
    left: 0;
}
.sgi-chat-root.open .sgi-chat-panel {
    display: flex;
    animation: sgiSlideUp 0.28s ease;
}
@keyframes sgiSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.sgi-chat-header {
    background: linear-gradient(135deg, #0B1C2C 0%, #1A3A55 100%);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sgi-chat-header .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9A227, #E8D48B);
    color: #0B1C2C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.sgi-chat-header .meta h4 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}
.sgi-chat-header .meta span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
}
.sgi-chat-header .status-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.sgi-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #F8F6F1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sgi-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.sgi-msg.bot {
    background: #fff;
    color: #2C2A25;
    border: 1px solid #E5E2D9;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.sgi-msg.user {
    background: linear-gradient(135deg, #C9A227, #A6851E);
    color: #0B1C2C;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}
.sgi-msg.typing {
    opacity: 0.7;
    font-style: italic;
}

.sgi-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 10px;
    background: #F8F6F1;
}
.sgi-quick button {
    border: 1px solid rgba(201,162,39,0.4);
    background: #fff;
    color: #0B1C2C;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.sgi-quick button:hover {
    background: rgba(201,162,39,0.15);
}

.sgi-chat-footer {
    padding: 12px;
    border-top: 1px solid #E5E2D9;
    background: #fff;
}
.sgi-chat-input-row {
    display: flex;
    gap: 8px;
}
.sgi-chat-input-row input {
    flex: 1;
    border: 1.5px solid #E5E2D9;
    border-radius: 24px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}
.sgi-chat-input-row input:focus {
    border-color: #C9A227;
}
.sgi-chat-input-row button.send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #C9A227, #A6851E);
    color: #0B1C2C;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
}
.sgi-human-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    background: #25D366;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.sgi-human-btn:hover {
    background: #1ebe57;
}

@media (max-width: 480px) {
    .sgi-chat-root {
        bottom: 16px;
        right: 16px;
    }
    body.rtl .sgi-chat-root {
        left: 16px;
        right: auto;
    }
    .sgi-chat-panel {
        width: calc(100vw - 24px);
        height: calc(100vh - 100px);
        bottom: 70px;
    }
}
