/* =========================================
   GioWeb — Admin Panel Styles
   ========================================= */

:root {
    /* Radzen Sidebar Variables - Aura Dark Style */
    --rz-sidebar-background-color: #111827;
    --rz-sidebar-width: 260px;
    --rz-sidebar-item-color: #9ca3af;
    --rz-sidebar-item-hover-color: #ffffff;
    --rz-sidebar-item-active-color: #ffffff;
    --rz-sidebar-item-active-background-color: rgba(255, 255, 255, 0.1);
    --rz-sidebar-item-hover-background-color: rgba(255, 255, 255, 0.05);
    
    --header-bg: #ffffff;
    --header-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --body-bg: #f8fafc;
    --primary: #c41e1e;
    --primary-rgb: 196, 30, 30;
    --rz-primary: #c41e1e;
    --rz-primary-light: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --font: 'Inter', sans-serif;
    --radius: 12px;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--body-bg);
}

/* Fix for the annoying focus outline appearing on static text/headings */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, div:focus, span:focus, p:focus, li:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Sidebar Customizations */
.rz-sidebar {
    background-color: var(--rz-sidebar-background-color) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.rz-sidebar-content {
    background-color: var(--rz-sidebar-background-color) !important;
}

.sidebar-brand {
    padding: 24px 12px;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: #ffffff !important;
}

/* Overriding Radzen PanelMenu specifically to fix the pale look */
.rz-panel-menu {
    background: transparent !important;
}

.rz-navigation-item-link {
    color: var(--rz-sidebar-item-color) !important;
    padding: 12px 12px !important;
    margin: 4px 8px !important;
    border-radius: 8px !important;
}

.rz-navigation-item-icon {
    color: var(--rz-sidebar-item-color) !important;
    margin-right: 12px !important;
}

.rz-navigation-item-text {
    color: inherit !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

/* Hover */
.rz-navigation-item-link:hover {
    background-color: var(--rz-sidebar-item-hover-background-color) !important;
    color: var(--rz-sidebar-item-hover-color) !important;
}

.rz-navigation-item-link:hover .rz-navigation-item-icon {
    color: var(--rz-sidebar-item-hover-color) !important;
}

/* Active */
.rz-navigation-item-active > .rz-navigation-item-wrapper > .rz-navigation-item-link {
    background-color: var(--rz-sidebar-item-active-background-color) !important;
    color: var(--rz-sidebar-item-active-color) !important;
    border-left: 3px solid var(--rz-sidebar-item-active-color);
}

.rz-navigation-item-active .rz-navigation-item-icon {
    color: var(--rz-sidebar-item-active-color) !important;
}




/* ---- HEADER ---- */
.rz-header {
    background: var(--header-bg) !important;
    box-shadow: var(--header-shadow) !important;
    border-bottom: none !important;
    /* Ensure the header doesn't overflow when sidebar is present */
    width: auto !important;
    box-sizing: border-box !important;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    /* Add more right padding as requested to shift info to the left */
    padding: 0 40px 0 16px; 
    box-sizing: border-box !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ---- BODY ---- */
.rz-body {
    background: var(--body-bg) !important;
}

.main-content {
    padding: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* ---- STAT CARDS ---- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--card-shadow) !important;
    border: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-products .stat-icon { background: rgba(59,130,246,0.1); color: var(--primary); }
.stat-projects .stat-icon { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-messages .stat-icon { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-quotes .stat-icon  { background: rgba(239,68,68,0.1); color: var(--danger); }

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- Recent Items ---- */
.recent-item {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.recent-item:last-child { border-bottom: none; }

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.login-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 8px;
    letter-spacing: -1px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group .rz-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: block;
}

/* ---- GENERAL ---- */
.rz-card {
    border-radius: var(--radius) !important;
    box-shadow: var(--card-shadow) !important;
    border: none !important;
}

h5 {
    font-weight: 700;
    margin-bottom: 12px;
}

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

.mb-4 { margin-bottom: 1.5rem; }
.me-3 { margin-right: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.me-1 { margin-right: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

/* ---- DIALOG OVERLAY ---- */
.dialog-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.dialog-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    max-width: 600px;
    width: 96%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.dialog-lg {
    max-width: 800px;
}

/* ---- CHAT ---- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 280px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.chat-msg {
    display: flex;
    margin-bottom: 12px;
}

.chat-msg.user { justify-content: flex-end; }
.chat-msg.ai { justify-content: flex-start; }

.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.chat-msg.user .chat-bubble {
    background: var(--primary);
    color: #fff;
    border-radius: 12px 12px 0 12px;
}

.chat-msg.ai .chat-bubble {
    background: #f1f5f9;
    color: var(--text-primary);
    border-radius: 12px 12px 12px 0;
}

.chat-role {
    font-size: 0.75rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    opacity: 0.7;
}

.chat-bubble p { margin: 0; }

.chat-input-area {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.quick-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---- EMPTY LAYOUT ---- */
.empty-layout {
    min-height: 100vh;
}

/* =========================================
   PUBLIC SITE STYLES
   ========================================= */
.public-site {
    font-family: var(--font);
    color: var(--text-primary);
    background: #fff;
}

/* ---- NAVBAR ---- */
.pub-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
}

.pub-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.pub-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.pub-logo img { height: 42px; }

.pub-nav-links {
    display: flex;
    gap: 28px;
}

.pub-nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.pub-nav-links a:hover,
.pub-nav-links a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.pub-nav-right { display: flex; align-items: center; gap: 12px; }
.pub-menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

.pub-mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
}

.pub-mobile-menu a {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .pub-nav-links { display: none; }
    .pub-menu-toggle { display: block; }
    .section-grid-3, .section-grid-4 { grid-template-columns: 1fr !important; }
    .contact-grid { grid-template-columns: 1fr !important; }
    .footer-grid { grid-template-columns: 1fr !important; }
    .hero-content h1 { font-size: 2rem !important; }
}

/* ---- HERO ---- */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9b673e 0%, #9b673e 50%, #9b673e 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('/images/logo.png') center center / 300px no-repeat;
    opacity: 0.03;
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    max-width: 700px;
    padding: 40px 20px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -1px;
}

.hero-content h1 span { color: #8b6914; }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin: 0 0 32px; }

.hero-btns { display: flex; gap: 16px; justify-content: center; }

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #8b6914, #b8860b);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,105,20,0.3); }

.btn-outline {
    display: inline-block;
    padding: 14px 32px;
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ---- SECTIONS ---- */
.pub-section { padding: 80px 0; }
.pub-section.bg-light { background: #f8fafc; }

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.section-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.section-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.page-header {
    background: linear-gradient(135deg, #4a321f 0%, #9b673e 100%);
    color: #fff;
}

.page-header h1 { margin: 0; font-size: 2.2rem; font-weight: 800; }

/* ---- FEATURES ---- */
.feature-card {
    text-align: center;
    padding: 40px 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h3 { font-weight: 700; margin: 0 0 12px; }
.feature-card p { color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ---- PRODUCTS ---- */
.product-card {
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-placeholder { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: #f1f5f9; }
.product-info { padding: 16px; }
.product-info h4 { margin: 0 0 8px; font-weight: 600; font-size: 0.95rem; }
.product-price { color: #8b6914; font-weight: 700; }

/* ---- PROJECTS ---- */
.project-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

.project-card img { width: 100%; height: 260px; object-fit: cover; }

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.project-overlay h4 { margin: 0 0 4px; font-weight: 700; }
.project-overlay span { font-size: 0.85rem; opacity: 0.8; }

/* ---- BLOG ---- */
.blog-card {
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.blog-card:hover { transform: translateY(-4px); }
.blog-card img { width: 100%; height: 180px; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-card-body h4 { margin: 0 0 8px; font-weight: 600; }
.blog-date { font-size: 0.85rem; color: var(--text-secondary); }

/* ---- FILTER BAR ---- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn {
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover { background: #1a1d23; color: #fff; border-color: #1a1d23; }

/* ---- CONTACT ---- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.pub-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.pub-input:focus { outline: none; border-color: var(--primary); }
textarea.pub-input { resize: vertical; }
.contact-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.contact-item span { font-size: 1.3rem; }
.success-msg { padding: 20px; background: #f0fdf4; border-radius: 10px; color: #166534; font-weight: 500; }

/* ---- ABOUT ---- */
.about-content { max-width: 800px; margin: 0 auto; }
.about-text p { line-height: 1.8; color: var(--text-secondary); font-size: 1.05rem; }
.about-stats { display: flex; gap: 40px; margin-top: 40px; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 2.5rem; font-weight: 800; color: #8b6914; }
.stat-item span:last-child { font-size: 0.9rem; color: var(--text-secondary); }

/* ---- CTA ---- */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #9b673e, #9b673e);
    color: #fff;
}
.cta-section h2 { font-size: 2rem; font-weight: 800; margin: 0 0 12px; }
.cta-section p { color: rgba(255,255,255,0.7); margin: 0 0 32px; font-size: 1.1rem; }

/* ---- FOOTER ---- */
.pub-footer {
    background: #0f1115;
    color: #a0a3b1;
    padding: 60px 0 0;
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 36px; margin-bottom: 16px; }
.footer-col h4 { color: #fff; font-weight: 700; margin: 0 0 16px; }
.footer-col a { display: block; color: #a0a3b1; text-decoration: none; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-col p { line-height: 1.7; font-size: 0.9rem; }

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

/* ---- REFERENCES ---- */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.ref-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ref-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.ref-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ref-card img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.ref-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.ref-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    text-align: center;
}

/* ---- MAP ---- */
.map-container {
    width: 100%;
    border-top: 1px solid #e2e8f0;
}

.map-container iframe {
    display: block;
    width: 100%;
}

/* ---- SOCIAL MEDIA ---- */
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.sm-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #a0a3b1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.sm-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sm-icon:hover {
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sm-icon.facebook:hover { background: #1877f2; }
.sm-icon.instagram:hover { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.sm-icon.youtube:hover { background: #ff0000; }
.sm-icon.linkedin:hover { background: #0077b5; }
.sm-icon.x-twitter:hover { background: #000000; }
.sm-icon.tiktok:hover { background: #000000; }


.sm-icon.x-twitter svg, .sm-icon.tiktok svg { fill: currentColor; stroke: none; }

/* ---- TOOLTIP SYSTEM (ADVANCED) ---- */
[data-tooltip] {
    position: relative !important;
}

/* Ensure Radzen components don't clip tooltips */
.rz-button, .rz-switch, .rz-card, .rz-datalist-content, .rz-data-list, .rz-datalist-data, .rz-data-grid, .rz-datagrid, .rz-column-resizer, .rz-col, .rz-layout, .rz-column {
    overflow: visible !important;
}

/* Refined Tooltip Visibility: Only show if data-tooltip has at least one visible character */
[data-tooltip]:not([data-tooltip=""]):not([data-tooltip=" "])::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    padding: 6px 14px;
    background: #0f172a !important; /* Slate 900 */
    color: white !important;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.1);
}

[data-tooltip]:not([data-tooltip=""]):not([data-tooltip=" "]):hover::before {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Force tooltip to be above everything in grid cells */
.rz-datagrid-data td, .rz-grid-table td {
    overflow: visible !important;
}

