/* ==========================================================================
   GLOBAL THEME VARIABLES & CORE STYLES
   ========================================================================== */
:root {
    --elegant-green: #064e3b;    
    --main-gradient: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
    --mint-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --accent-mint: #10b981;      
    --light-bg: #f0fdf4;         
    --pure-white: #ffffff;
    --text-dark: #064e3b;
    --border-soft: #d1d5db;
    --neon-glow: rgba(16, 185, 129, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: #333;
}

/* --- Navigation Bar --- */
.top-nav {
    background-color: var(--elegant-green);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 45px;
    height: 45px;
    background: var(--pure-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--elegant-green);
    font-size: 0.8rem;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.brand-name {
    font-weight: 800;
    color: var(--pure-white);
    font-size: 1.3rem;
    letter-spacing: 1px;
    text-shadow: 0 0 8px var(--neon-glow);
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    background: var(--pure-white);
    color: var(--elegant-green);
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px; 
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin: 0 5px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15); 
    color: var(--pure-white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ==========================================================================
   NAVIGATION DROPDOWN SYSTEM (POLISHED)
   ========================================================================== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--pure-white);
    min-width: 160px;
    box-shadow: 0px 10px 25px rgba(6, 78, 59, 0.15);
    border-radius: 12px;
    top: 100%;
    overflow: hidden;
    z-index: 1100;
    border: 1px solid var(--border-soft);
    text-align: left;
}

.dropdown-content a {
    color: var(--elegant-green);
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--light-bg);
    color: var(--accent-mint);
    padding-left: 22px;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

/* --- Layout Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.section-title {
    color: var(--elegant-green);
    margin-bottom: 20px;
    border-left: 5px solid var(--accent-mint);
    padding-left: 15px;
    font-size: 1.5rem;
}

/* --- Hero & Search --- */
/* .hero-section {
    text-align: center;
    margin-bottom: 40px;
} */

.hero-section {

    background:
    linear-gradient(
    rgba(6,78,59,0.75),
    rgba(16,185,129,0.65)),

    url('https://images.unsplash.com/photo-1500937386664-56d1dfef3854?q=80&w=1400&auto=format&fit=crop');

    background-size: cover;

    background-position: center;

    border-radius: 20px;

    padding: 20px 10px;

    text-align: center;

    color: white;

    margin-bottom: 20px;
}

.hero-section h1 {

    font-size: 3rem;

    margin-bottom: 10px;
}

.hero-section p {

    font-size: 1.1rem;

    margin-bottom: 10px;
}



.search-bar-container input {
    width: 80%;
    padding: 18px 30px;
    border-radius: 50px;
    border: 2px solid var(--elegant-green);
    font-size: 1rem;
    outline: none;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-bar-container input:focus {
    box-shadow: 0 0 20px var(--neon-glow);
}

/* --- Action Grid --- */
.action-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
   
    
}

.btn {
    padding: 12px 20px;
    border: 1px solid var(--elegant-green);
    background: var(--pure-white);
    color: var(--elegant-green);
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    
}

.btn:hover {
    background: var(--elegant-green);
    color: var(--pure-white);
    box-shadow: 0 0 15px var(--neon-glow);
}

/* --- Listing Cards Layout --- */
.listings-wrapper {
    margin-bottom: 35px;
}

.listing-card {
    display: flex;
    background: var(--pure-white);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.listing-card:hover {
     transform: translateY(-8px);
     box-shadow: 0 25px 50px rgba(16, 185, 129, 0.12);
}

.card-left {
    width: 25%;
    padding: 15px;
    background: #fcfdfd; 
    border-right: 1px solid #f0f0f0; 
    text-align: center; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.image-placeholder {
    height: 120px;
    background: #e5e7eb;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: bold;
}

.card-center {
    width: 45%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-center p { 
    margin: 6px 0; 
    font-size: 0.95rem; 
}

.card-right {
    width: 30%;
    padding: 20px;
    background: #fafdfb;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Card Interface Buttons --- */
.manage-btn, .upgrade-btn, .unlock-btn {
    width: 100%;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-align: center;
}

.manage-btn { 
    background: #eee; 
    color: #555; 
    border-radius: 4px;
}

.manage-btn:hover {
    background: #e0e0e0;
}

.upgrade-btn { 
    background: linear-gradient(45deg, #156a25, #059669); 
    color: var(--pure-white); 
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    margin-top: 8px;
    font-size: 0.85rem;
}

.unlock-btn { 
    background: linear-gradient(45deg, #064e3b, #156a25); 
    color: var(--pure-white); 
    padding: 15px; 
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(6, 78, 59, 0.3);
    font-size: 0.9rem;
}

.unlock-btn:hover, .upgrade-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 20px var(--accent-mint);
}

.plan-tag {
    align-self: flex-end;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.location-box p {
    margin: 4px 0;
    font-size: 0.95rem;
}

/* --- Post CTA Option Block --- */
.post-cta {
    text-align: center;
    margin: 50px 0;
}

.btn-main {
    background: linear-gradient(135deg, #064e3b, #10b981);
    color: var(--pure-white);
    padding: 20px 60px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(6, 78, 59, 0.4);
    transition: all 0.4s ease;
}

.btn-main:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--accent-mint);
}

/* --- Chat Floating Element --- */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, #064e3b, #10b981);
    color: var(--pure-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 8px 25px var(--neon-glow);
    cursor: pointer;
    border: 3px solid var(--pure-white);
    z-index: 9999;
}

/* --- Main Site Footer Panel --- */
.footer {
    background: var(--elegant-green);
    color: var(--pure-white);
    text-align: center;
    padding: 25px;
    margin-top: 50px;
    font-size: 0.95rem;
    border-top: 3px solid var(--accent-mint);
}

/* ==========================================================================
   USER AUTHENTICATION DROPDOWN SYSTEM
   ========================================================================== */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    background-color: var(--elegant-green) !important;
    color: var(--pure-white) !important;
    font-weight: bold;
    border: 2px solid var(--accent-mint) !important;
}

.user-dropdown-btn:hover {
    background: var(--accent-mint) !important;
    color: var(--pure-white) !important;
    box-shadow: 0 0 15px var(--neon-glow);
}

.user-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--pure-white);
    min-width: 180px;
    box-shadow: 0px 10px 25px rgba(6, 78, 59, 0.15);
    border-radius: 12px;
    z-index: 1100;
    overflow: hidden;
    top: 100%;
    right: 0;
    border: 1px solid var(--border-soft);
}

/* ==========================================================================
   DROPDOWN HOVER STABILITY BRIDGE (GAP PATCH)
   ========================================================================== */
.dropdown-content::before,
.user-dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px; 
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent; 
}

.dropdown-content a:first-child,
.user-dropdown-content a:first-child {
    margin-top: 5px;
}

.user-dropdown-content a {
    color: var(--elegant-green) !important;
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    text-align: left;
    font-weight: 600;
    transition: all 0.2s ease;
}

.user-dropdown-content a:hover {
    background-color: var(--light-bg);
    color: var(--accent-mint);
    padding-left: 22px;
}

.user-dropdown-content a.logout-item:hover {
    background-color: #fee2e2;
    color: #dc2626 !important;
    padding-left: 22px;
}

.user-dropdown-container:hover .user-dropdown-content {
    display: block;
}

/* ==========================================================================
   AGRICULTURAL CROPS COMPONENT MULTI-SELECT EXTENSIONS
   ========================================================================== */
.crops-checkbox-list {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 12px;
    background-color: #fafafa;
    margin-top: 4px;
}

.crops-checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.crops-checkbox-list::-webkit-scrollbar-thumb {
    background-color: var(--border-soft);
    border-radius: 10px;
}

.crop-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-bottom: 10px;
    font-weight: 500 !important;
    color: #4b5563;
    cursor: pointer;
    font-size: 14px;
}

.crop-item input[type="checkbox"] {
    margin-right: 12px !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: var(--accent-mint) !important;
    cursor: pointer;
}

.crop-item:hover {
    color: var(--text-dark);
}

.form-help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: -4px;
    margin-bottom: 8px;
    font-style: italic;
}

/* ==========================================================================
   USER PROFILE HUB STYLES (profile.php Integration)
   ========================================================================== */
.profile-wrapper {
    max-width: 900px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}
.profile-card {
 
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.metrics-card {
   
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.avatar-circle {
    width: 90px;
    height: 90px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 auto 15px auto;
}
.profile-username {
    text-align: center; 
    margin-bottom: 25px; 
    color: #2c3e50;
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.metric-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border-top: 4px solid #27ae60;
}
.total-listings-box {
    grid-column: span 2; 
    background: #e8f8f0; 
    border-top-color: #2ecc71;
}
.box-label {
    font-weight: 600; 
    color: #27ae60;
}
.land-box {
    border-top-color: #34495e;
}
.crop-box {
    border-top-color: #f1c40f;
}
.product-box {
    grid-column: span 2; 
    border-top-color: #9b59b6;
}
.metric-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 5px;
}
.info-row {
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
}
.info-row strong {
    color: #7f8c8d;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.info-row p {
    margin: 5px 0 0 0;
    font-size: 1.05rem;
    color: #2c3e50;
    font-weight: 600;
}
.status-active {
    color: #27ae60;
}
.logout-nav-btn {
    color: #e74c3c;
}
.metrics-title {
    color: #2c3e50; 
    margin-bottom: 5px;
}
.metrics-subtitle {
    color: #7f8c8d; 
    margin-bottom: 20px;
}
.profile-cta-container {
    margin-top: 30px; 
    text-align: center;
}

/* ==========================================================================
   EDITABLE ACCOUNT SETTINGS INPUT MODIFIERS
   ========================================================================== */
.form-group-profile {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    text-align: left;
}
.form-group-profile label {
    font-size: 0.75rem;
    font-weight: bold;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.form-group-profile input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}
.form-group-profile input:focus {
    border-color: var(--accent-mint);
    outline: none;
}
.alert-box {
    max-width: 900px;
    margin: 20px auto -20px auto;
    padding: 15px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}
.success-alert {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.error-alert {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==========================================================================
   DASHBOARD SELLING DESK TABLE STYLES
   ========================================================================== */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
    text-align: left;
}
.dashboard-table th {
    background-color: #f8f9fa;
    color: #7f8c8d;
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}
.dashboard-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f1f1;
    color: #4a5568;
    vertical-align: middle;
}
.dashboard-table tr:hover {
    background-color: #fcfdfc;
}
.table-id-badge {
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    color: #4a5568;
}
.table-price {
    font-weight: bold;
    color: #27ae60;
}
.status-badge-live {
    color: #2cc711;
    font-weight: 600;
    font-size: 0.9rem;
}
.type-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: bold;
}
.land-tag { background: #e2e8f0; color: #4a5568; }
.crop-tag { background: #fef9c3; color: #713f12; }
.product-tag { background: #f3e8ff; color: #581c87; }

/* ==========================================================================
   DASHBOARD TABLE INTERACTIVE ACTION BUTTONS
   ========================================================================== */
.table-action-btn {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 0 4px;
    display: inline-block;
    transition: all 0.2s ease;
}
.edit-action {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.edit-action:hover {
    background-color: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
}
.delete-action {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}
.delete-action:hover {
    background-color: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==========================================================================
   REGISTRATION PROPERTIES FORM MODEL MODIFIERS
   ========================================================================== */
.form-container {
    max-width: 650px;
    background: #ffffff;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #c8e6c9;
}

.form-header {
    background-color: #004d40; 
    color: #ffffff;
    text-align: center;
    padding: 20px;
}

.form-header h2 {
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

form {
    padding: 30px;
}

.section-divider {
    border-top: 2px dashed #a5d6a7;
    margin: 25px 0;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1b5e20;
    font-size: 14px;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #004d40;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 77, 64, 0.2);
}

input[type="file"] {
    padding: 8px 0;
}

.submit-btn-container {
    text-align: center;
    margin-top: 10px;
}

.submit-btn {
    background-color: #0f9f6e; 
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 159, 110, 0.3);
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: #0b7a54;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(15, 159, 110, 0.4);
}

/* ==========================================================================
   RESPONSIVE MEDIA INQUIRIES
   ========================================================================== */
@media (max-width: 992px) {
    .listing-card {
        flex-direction: column;
    }

    .card-left, .card-center, .card-right {
        width: 100%;
        border: none;
    }
    
    .card-left {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .card-right {
        border-top: 1px solid #eee;
        gap: 15px;
    }

    .image-placeholder {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .profile-wrapper {
        grid-template-columns: 1fr; /* Sidebar stacks neatly above metrics table on tablets/phones */
    }

    .hero-section {
        padding: 40px 10px;
    }

    .search-bar-container input {
        width: 100%;
    }

    .btn-main {
        width: 100%;
        padding: 15px 30px;
    }

    .chat-bubble {
        width: 70px;
        height: 70px;
        font-size: 0.7rem;
    }
}

@media (max-width: 500px) {
    .nav-tabs {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown .dropdown-content {
        position: relative;
        width: 100%;
        box-shadow: none;
        margin-top: 0;
        border-radius: 25px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.05);
    }

    .nav-dropdown .dropdown-content a {
        color: var(--pure-white);
        text-align: center;
    }

    .nav-dropdown .dropdown-content a:hover {
        background-color: var(--pure-white);
        color: var(--elegant-green);
        padding-left: 18px;
    }

    .action-grid {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* --- Misc Helper Blocks --- */
.gst-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 20px 0;
}

.gst-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-dark);
}

.gst-label input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-mint);
}

.flow-box {
    display: none;
    text-align: center;
    background: var(--light-bg);
    border: 2px dashed var(--accent-mint);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}