/* ============================
   AgroSubprodutos - Complete CSS
   ============================ */
:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #FF8F00;
    --secondary-dark: #E65100;
    --accent: #1565C0;
    --bg: #F5F7FA;
    --bg-card: #FFFFFF;
    --text: #263238;
    --text-secondary: #546E7A;
    --text-light: #90A4AE;
    --border: #E0E0E0;
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FF9800;
    --info: #2196F3;
    --sidebar-width: 260px;
    --topbar-height: 137px;
    --ticker-height: 45px;
    --ad-height: 36px;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ============================
   BUTTONS
   ============================ */
.btn-primary { background: var(--primary); color: #fff; border: none; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: 15px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: #fff; color: var(--text); border: 2px solid var(--border); padding: 10px 22px; border-radius: var(--radius); font-weight: 500; font-size: 15px; transition: all 0.2s; }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; border: none; padding: 10px 20px; border-radius: var(--radius); font-weight: 600; font-size: 14px; }
.btn-danger:hover { background: #C62828; }
.btn-warning { background: var(--warning); color: #fff; border: none; padding: 10px 20px; border-radius: var(--radius); font-weight: 600; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-icon { background: none; border: 1px solid var(--border); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.2s; }
.btn-icon:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================
   FORMS
   ============================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 13px; color: var(--text-secondary); }
.form-group label i { margin-right: 4px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; transition: border-color 0.2s; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 42px; }
.toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-light); }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 14px; cursor: pointer; }
.checkbox-label input { margin-top: 3px; }
.radio-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.btn-row { display: flex; gap: 12px; margin-top: 16px; }
.btn-row button { flex: 1; }

/* ============================
   LOGIN PAGE
   ============================ */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 40%, #388E3C 100%);
    padding: 20px;
}
.login-container {
    display: flex; width: 100%; max-width: 1000px; background: #fff; border-radius: 20px;
    overflow: hidden; box-shadow: var(--shadow-lg); min-height: 620px;
}
.login-left {
    flex: 1; background: linear-gradient(135deg, #1B5E20, #2E7D32); color: #fff; padding: 60px 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.login-brand { margin-bottom: 40px; }
.login-logo { width: 70px; height: 70px; background: rgba(255,255,255,0.15); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 20px; }
.login-brand h1 { font-size: 28px; margin-bottom: 8px; }
.login-brand p { opacity: 0.85; font-size: 15px; line-height: 1.5; }
.login-features { display: flex; flex-direction: column; gap: 14px; }
.feature-item { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: 0.9; }
.feature-item i { color: #A5D6A7; }
.login-right { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; max-height: 90vh; }
.login-form-section h2 { font-size: 24px; margin-bottom: 4px; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; }

/* Social Login Buttons */
.social-login-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 500;
    border: 2px solid var(--border); transition: all 0.2s; cursor: pointer;
}
.social-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.google-btn { background: #fff; color: #333; }
.google-btn:hover { border-color: #4285F4; }
.apple-btn { background: #000; color: #fff; border-color: #000; }
.apple-btn:hover { background: #222; }
.apple-btn i { font-size: 20px; }
.microsoft-btn { background: #fff; color: #333; }
.microsoft-btn:hover { border-color: #00a4ef; }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-light); font-size: 13px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }

/* WhatsApp Contact */
.whatsapp-contact { margin-top: 24px; text-align: center; }
.whatsapp-link {
    display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff;
    padding: 10px 24px; border-radius: 30px; font-weight: 600; font-size: 14px; transition: all 0.2s;
}
.whatsapp-link:hover { background: #128C7E; text-decoration: none; transform: scale(1.03); }
.whatsapp-link i { font-size: 20px; }

/* Registration Steps */
.step-indicators { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 28px; }
.step-dot {
    width: 32px; height: 32px; border-radius: 50%; background: var(--border); color: var(--text-light);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; transition: all 0.3s;
}
.step-dot.active { background: var(--primary); color: #fff; }
.step-dot.completed { background: var(--success); color: #fff; }
.step-line { width: 40px; height: 3px; background: var(--border); }
.register-step { display: none; }
.register-step.active { display: block; }
.step-description { color: var(--text-secondary); margin-bottom: 16px; font-size: 14px; }

.user-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.user-type-card {
    border: 2px solid var(--border); border-radius: var(--radius); padding: 24px 16px;
    text-align: center; cursor: pointer; transition: all 0.2s; position: relative;
}
.user-type-card:hover { border-color: var(--primary); background: #E8F5E9; }
.user-type-card.selected { border-color: var(--primary); background: #E8F5E9; }
.user-type-card i { font-size: 36px; color: var(--primary); display: block; margin-bottom: 10px; }
.user-type-card span { font-weight: 600; font-size: 14px; }
.free-badge { position: absolute; top: 8px; right: 8px; background: var(--secondary); color: #fff; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; }

/* Document Upload */
.doc-upload-item { border: 2px dashed var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; }
.doc-upload-item:hover { border-color: var(--primary); background: #F1F8E9; }
.doc-upload-item.uploaded { border-color: var(--success); background: #E8F5E9; }
.doc-upload-item i { font-size: 24px; color: var(--text-light); display: block; margin-bottom: 6px; }
.doc-upload-item.uploaded i { color: var(--success); }
.doc-upload-item input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-upload-item .doc-name { font-weight: 600; font-size: 13px; }
.doc-upload-item .doc-status { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* Contract Preview */
.contract-preview {
    max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; font-size: 13px; line-height: 1.7; background: #FAFAFA;
}

.register-success { text-align: center; padding: 40px 20px; }
.register-success i { font-size: 64px; color: var(--success); margin-bottom: 16px; }
.register-success h3 { margin-bottom: 8px; }
.register-success p { color: var(--text-secondary); margin-bottom: 24px; }
.recover-method { margin-bottom: 16px; }

/* ============================
   TOP BAR
   ============================ */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.top-bar-row {
    display: flex; align-items: center; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--border);
}
.top-bar-left { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.menu-toggle { background: none; border: none; font-size: 20px; color: var(--text); padding: 8px; }
.brand-mini { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--primary); }
.brand-mini i { font-size: 22px; }
.top-bar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.notification-bell { position: relative; cursor: pointer; padding: 8px; }
.notification-bell i { font-size: 20px; color: var(--text-secondary); }
.notif-badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.user-menu { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 12px; border-radius: 8px; transition: background 0.2s; }
.user-menu:hover { background: var(--bg); }
.user-avatar { width: 34px; height: 34px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.user-name { font-weight: 500; font-size: 14px; }
.notifications-dropdown, .user-dropdown {
    position: fixed; top: 56px; right: 20px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); min-width: 300px; z-index: 1001;
}
.user-dropdown { min-width: 220px; }
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text); font-size: 14px; transition: background 0.2s; }
.user-dropdown a:hover { background: var(--bg); text-decoration: none; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-header h4 { font-size: 15px; }
.notif-list { max-height: 350px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #F5F5F5; font-size: 13px; cursor: pointer; transition: background 0.2s; }
.notif-item:hover { background: #F5F5F5; }
.notif-item.unread { background: #E3F2FD; }
.notif-item .notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ============================
   TICKER BAR - CSS Animation (no trembling)
   ============================ */
.ticker-container {
    height: var(--ticker-height); overflow: hidden; background: linear-gradient(90deg, #1B5E20, #2E7D32);
    position: relative; cursor: default;
}
.ticker-wrapper {
    display: flex; height: 100%; align-items: center; 
    animation: ticker-scroll 60s linear infinite;
    white-space: nowrap; width: max-content;
}
.ticker-container:hover .ticker-wrapper { animation-play-state: paused; }
.ticker-content { display: flex; align-items: center; gap: 0; padding: 0; white-space: nowrap; }
.ticker-item {
    display: inline-flex; align-items: center; gap: 6px; padding: 0 24px; color: #fff; font-size: 13px; font-weight: 500;
    border-right: 1px solid rgba(255,255,255,0.15); white-space: nowrap;
}
.ticker-item .ticker-label { opacity: 0.8; font-size: 11px; }
.ticker-item .ticker-value { font-weight: 700; font-size: 14px; }
.ticker-item .ticker-change { font-size: 11px; margin-left: 4px; }
.ticker-item .ticker-change.up { color: #69F0AE; }
.ticker-item .ticker-change.down { color: #FF8A80; }
.ticker-item .ticker-source { font-size: 9px; opacity: 0.6; margin-left: 4px; }
.ticker-source { position: absolute; bottom: 1px; right: 8px; font-size: 9px; color: rgba(255,255,255,0.4); }

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================
   AD BANNER
   ============================ */
.ad-banner {
    position: fixed; top: calc(56px + var(--ticker-height)); left: 0; right: 0;
    height: var(--ad-height); background: #FFF8E1; border-bottom: 1px solid #FFE082;
    z-index: 999; display: flex; align-items: center; overflow: hidden;
}
.ad-content { display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 13px; white-space: nowrap; }
.ad-label { background: var(--secondary); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
    position: fixed; top: var(--topbar-height); left: 0; bottom: 0; width: var(--sidebar-width);
    background: #fff; border-right: 1px solid var(--border); z-index: 998;
    overflow-y: auto; transition: transform 0.3s;
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar-menu { padding: 12px 0; }
.sidebar-section { padding: 0 16px; margin-bottom: 4px; }
.sidebar-section-title { font-size: 10px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; padding: 12px 0 6px; }
.sidebar-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--text);
    font-size: 14px; cursor: pointer; transition: all 0.2s; border-radius: 0;
    border-left: 3px solid transparent;
}
.sidebar-item:hover { background: #F1F8E9; color: var(--primary); text-decoration: none; }
.sidebar-item.active { background: #E8F5E9; color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.sidebar-item i { width: 20px; text-align: center; font-size: 16px; }

/* ============================
   MAIN CONTENT
   ============================ */
.main-content {
    margin-left: var(--sidebar-width); margin-top: var(--topbar-height);
    padding: 24px; min-height: calc(100vh - var(--topbar-height));
    position: relative;
}

/* Locked Overlay */
.locked-overlay {
    position: absolute; inset: 0; background: rgba(245,247,250,0.95);
    display: flex; align-items: center; justify-content: center; z-index: 50;
    backdrop-filter: blur(5px);
}
.locked-content { text-align: center; padding: 60px 40px; }
.locked-content i.fa-lock { font-size: 80px; color: var(--text-light); margin-bottom: 24px; display: block; }
.locked-content h2 { font-size: 24px; margin-bottom: 12px; }
.locked-content p { color: var(--text-secondary); font-size: 16px; margin-bottom: 28px; max-width: 400px; }

/* Page Header */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-header p { color: var(--text-secondary); margin-top: 4px; }
.page-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.page-breadcrumb a { color: var(--primary); }

/* Cards */
.card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 16px; }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-icon.green { background: #E8F5E9; color: var(--primary); }
.stat-icon.blue { background: #E3F2FD; color: var(--accent); }
.stat-icon.orange { background: #FFF3E0; color: var(--secondary); }
.stat-icon.red { background: #FFEBEE; color: var(--danger); }
.stat-info h4 { font-size: 26px; font-weight: 700; }
.stat-info p { font-size: 13px; color: var(--text-secondary); }

/* ============================
   DASHBOARD - Category Scrollbar Fix
   ============================ */
.category-section { margin-bottom: 24px; position: relative; }
.category-scroll-wrapper { position: relative; overflow: hidden; }
.category-scroll {
    display: flex; gap: 16px; overflow-x: auto; padding: 8px 4px 8px 4px; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-scroll-wrapper::before, .category-scroll-wrapper::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; pointer-events: none;
}
.category-scroll-wrapper::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.category-scroll-wrapper::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.category-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: var(--shadow); transition: all 0.2s; color: var(--text);
}
.category-nav-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.category-nav-btn.left { left: 4px; }
.category-nav-btn.right { right: 4px; }
.category-card {
    min-width: 160px; max-width: 180px; background: #fff; border-radius: var(--radius); padding: 20px 16px;
    text-align: center; cursor: pointer; transition: all 0.3s; border: 2px solid transparent;
    box-shadow: var(--shadow); flex-shrink: 0;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card.active { border-color: var(--primary); background: #E8F5E9; }
.category-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.category-card .cat-icon { width: 64px; height: 64px; border-radius: 50%; background: #E8F5E9; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 28px; color: var(--primary); }
.category-card h4 { font-size: 13px; font-weight: 600; line-height: 1.3; }
.category-card .cat-count { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* Drill-Down */
.drill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.drill-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); cursor: pointer; transition: all 0.2s; border-left: 4px solid var(--primary); }
.drill-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.drill-card h4 { font-size: 16px; margin-bottom: 4px; }
.drill-card p { font-size: 13px; color: var(--text-secondary); }
.drill-card .drill-badge { display: inline-block; background: #E8F5E9; color: var(--primary); padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; margin-top: 8px; }

/* ============================
   MAP
   ============================ */
.map-container { position: relative; }
#leaflet-map { width: 100%; height: 550px; border-radius: var(--radius); border: 2px solid var(--border); z-index: 1; }
.map-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.map-filter-chip {
    padding: 6px 16px; border-radius: 20px; border: 2px solid var(--border); background: #fff;
    font-size: 13px; cursor: pointer; transition: all 0.2s; font-weight: 500;
}
.map-filter-chip:hover, .map-filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.map-sidebar { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-top: 16px; }
.map-sidebar h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.map-result-item { padding: 10px; border-bottom: 1px solid #F5F5F5; cursor: pointer; transition: background 0.2s; border-radius: 6px; }
.map-result-item:hover { background: #F1F8E9; }
.freight-calc { background: #FFF8E1; padding: 16px; border-radius: var(--radius); margin-top: 12px; }
.freight-calc h4 { margin-bottom: 8px; font-size: 14px; }

/* ============================
   PRODUCTS PAGE
   ============================ */
.product-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; align-items: center; }
.product-filters select, .product-filters input { padding: 8px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.product-card {
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card-header { padding: 16px; background: linear-gradient(135deg, #E8F5E9, #F1F8E9); display: flex; align-items: center; gap: 12px; }
.product-card-header img { width: 48px; height: 48px; border-radius: 50%; }
.product-card-header .prod-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.product-card-body { padding: 16px; }
.product-card-body h3 { font-size: 16px; margin-bottom: 4px; }
.product-card-body .supplier-name { font-size: 13px; color: var(--text-secondary); }
.product-card-body .product-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.product-detail-item { font-size: 12px; }
.product-detail-item span { display: block; font-weight: 600; color: var(--text); }
.product-detail-item label { color: var(--text-light); font-size: 11px; }
.product-card-footer { padding: 12px 16px; border-top: 1px solid #F5F5F5; display: flex; justify-content: space-between; align-items: center; }
.negotiable-badge { background: #E8F5E9; color: var(--primary); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.not-negotiable-badge { background: #FFEBEE; color: var(--danger); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.product-price { font-size: 20px; font-weight: 700; color: var(--primary); }
.product-price small { font-size: 12px; font-weight: 400; color: var(--text-secondary); }

/* ============================
   CHAT
   ============================ */
.chat-layout { display: flex; gap: 16px; height: calc(100vh - var(--topbar-height) - 80px); }
.chat-list { width: 300px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.chat-list-header { padding: 16px; border-bottom: 1px solid var(--border); }
.chat-list-items { flex: 1; overflow-y: auto; }
.chat-list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid #F8F8F8; }
.chat-list-item:hover, .chat-list-item.active { background: #E8F5E9; }
.chat-avatar { width: 42px; height: 42px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.chat-preview { flex: 1; min-width: 0; }
.chat-preview h4 { font-size: 14px; margin-bottom: 2px; }
.chat-preview p { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { flex: 1; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #F5F7FA; }
.chat-message { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.chat-message.sent { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-message.received { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.chat-message .msg-time { font-size: 10px; opacity: 0.7; margin-top: 4px; display: block; }
.chat-message.blocked { background: #FFEBEE; color: var(--danger); font-style: italic; }
.chat-input-area { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input-area input { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: 20px; font-size: 14px; }
.chat-input-area input:focus { border-color: var(--primary); outline: none; }
.chat-input-area button { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; border: none; font-size: 16px; }

/* ============================
   ADMIN
   ============================ */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
    padding: 10px 20px; border-radius: 8px 8px 0 0; cursor: pointer; font-size: 13px; font-weight: 500;
    background: #fff; border: 1px solid var(--border); border-bottom: none; color: var(--text-secondary);
    transition: all 0.2s;
}
.admin-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-tab:hover:not(.active) { background: #F1F8E9; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #F5F7FA; padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); border-bottom: 2px solid var(--border); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #F5F5F5; font-size: 14px; vertical-align: middle; }
.admin-table tr:hover { background: #FAFAFA; }

.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.status-badge.active { background: #E8F5E9; color: var(--success); }
.status-badge.pending { background: #FFF8E1; color: var(--warning); }
.status-badge.rejected { background: #FFEBEE; color: var(--danger); }
.status-badge.in-progress { background: #E3F2FD; color: var(--info); }

/* Product Toggle - More Visible */
.toggle-switch { position: relative; width: 56px; height: 28px; display: inline-block; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0; background: #F44336; border-radius: 28px; transition: 0.3s;
}
.toggle-slider:before {
    content: ''; position: absolute; height: 22px; width: 22px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #4CAF50; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(28px); }
.toggle-label { font-size: 12px; font-weight: 600; margin-left: 8px; }
.toggle-label.enabled { color: #4CAF50; }
.toggle-label.disabled { color: #F44336; }

.product-row-enabled { background: rgba(76,175,80,0.04) !important; }
.product-row-disabled { background: rgba(244,67,54,0.04) !important; }

/* ============================
   PAYMENT / SUBSCRIPTION
   ============================ */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.plan-card {
    background: #fff; border-radius: var(--radius); padding: 32px 24px; text-align: center;
    box-shadow: var(--shadow); border: 2px solid transparent; transition: all 0.3s; position: relative;
}
.plan-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured { border-color: var(--primary); }
.plan-card.featured::before { content: 'MAIS POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 4px 16px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.plan-card h3 { font-size: 20px; margin-bottom: 8px; }
.plan-price { font-size: 36px; font-weight: 800; color: var(--primary); margin: 16px 0; }
.plan-price small { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.plan-features { text-align: left; margin: 20px 0; }
.plan-features li { list-style: none; padding: 6px 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.plan-features li i { color: var(--success); }

.payment-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.payment-method-card {
    border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center;
    cursor: pointer; transition: all 0.2s;
}
.payment-method-card:hover, .payment-method-card.selected { border-color: var(--primary); background: #E8F5E9; }
.payment-method-card i { font-size: 32px; color: var(--primary); display: block; margin-bottom: 8px; }

.payment-processing { text-align: center; padding: 40px; }
.payment-processing .spinner { width: 48px; height: 48px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================
   COMMISSION CALCULATOR
   ============================ */
.commission-calc { background: #FFF8E1; border: 1px solid #FFE082; border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.commission-calc h4 { font-size: 14px; margin-bottom: 12px; color: var(--secondary-dark); }
.commission-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.commission-row.total { border-top: 2px solid var(--secondary); padding-top: 8px; font-weight: 700; }

/* ============================
   EQUIPMENT
   ============================ */
.equipment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.equipment-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.2s; }
.equipment-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.equipment-img { height: 160px; background: #E0E0E0; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 48px; }
.equipment-body { padding: 16px; }
.equipment-body h4 { margin-bottom: 4px; }
.equipment-body .equip-price { font-size: 20px; font-weight: 700; color: var(--primary); margin-top: 8px; }
.equipment-body .equip-details { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ============================
   CONTRACTS
   ============================ */
.contract-document { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; max-width: 800px; margin: 0 auto; line-height: 1.8; font-size: 14px; }
.contract-document h2 { text-align: center; margin-bottom: 24px; }
.contract-document .clause { margin-bottom: 16px; }
.contract-document .clause-title { font-weight: 700; margin-bottom: 4px; }
.contract-signature { display: flex; justify-content: space-around; margin-top: 40px; padding-top: 60px; }
.contract-signature-line { text-align: center; width: 200px; border-top: 1px solid #333; padding-top: 8px; font-size: 13px; }

/* ============================
   INTEGRATIONS
   ============================ */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.integration-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.integration-logo { width: 64px; height: 64px; border-radius: 12px; background: #F5F5F5; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--text-secondary); overflow: hidden; position: relative; flex-shrink: 0; }
.integration-logo img { width: 100%; height: 100%; object-fit: cover; }
.integration-logo-upload { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; color: #fff; cursor: pointer; font-size: 16px; border-radius: 12px; }
.integration-logo:hover .integration-logo-upload { display: flex; }
.integration-logo-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.integration-info { flex: 1; }
.integration-info h4 { margin-bottom: 4px; }
.integration-info p { font-size: 12px; color: var(--text-secondary); }
.integration-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ============================
   PROFILE
   ============================ */
.profile-card { max-width: 600px; }
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-avatar-big { width: 80px; height: 80px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; }

/* ============================
   MODAL
   ============================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-container { background: #fff; border-radius: var(--radius); max-width: 700px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 32px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; }
.modal-close:hover { color: var(--text); }

/* ============================
   TOAST
   ============================ */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 14px 20px; border-radius: var(--radius); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; min-width: 280px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================
   EMPTY STATE
   ============================ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 64px; color: var(--border); margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 14px; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
@media (max-width: 768px) {
    .login-container { flex-direction: column; max-width: 500px; }
    .login-left { padding: 30px 24px; }
    .login-right { padding: 24px; }
    .user-type-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .chat-layout { flex-direction: column; height: auto; }
    .chat-list { width: 100%; max-height: 250px; }
    .product-grid { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .payment-method-grid { grid-template-columns: 1fr; }
    .drill-grid { grid-template-columns: 1fr; }
    .category-card { min-width: 140px; }
    .form-row { flex-direction: column; }
    .top-bar-left .brand-mini span { display: none; }
    .user-name { display: none; }
    .main-content { padding: 16px; }
}
@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .admin-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .admin-tab { white-space: nowrap; }
}

/* Utility */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-secondary); }
.badge-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-green { background: #E8F5E9; color: #2E7D32; }
.badge-red { background: #FFEBEE; color: #F44336; }

/* ============================
   MAP PRODUCT MARKERS
   ============================ */
.map-product-marker {
    background: none !important;
    border: none !important;
}
.map-marker-content {
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 4px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 60px;
}
.map-marker-icons {
    display: flex;
    gap: 4px;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    flex-wrap: wrap;
}
.map-marker-icons i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8F5E9;
    border-radius: 50%;
    font-size: 10px;
}
.map-marker-count {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
}
.map-tooltip {
    background: #fff !important;
    border: 2px solid var(--primary) !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
}

/* ============================
   ADMIN STATUS SELECT
   ============================ */
.admin-status-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}
.admin-status-select:focus {
    box-shadow: 0 0 0 2px rgba(46,125,50,0.2);
}

/* ============================
   TEST ACCOUNTS INFO
   ============================ */
.test-accounts-info {
    border: 1px solid #A5D6A7;
}
.test-accounts-info span {
    font-family: monospace;
    color: var(--text);
}
