:root {
    --primary-green: #2e7d32;      /* Deep Green */
    --bg-green-tint: #e8f5e9;      /* Lightest Green */
    --border-color: #e2e8f0;       /* Light Gray for borders */
    --text-dark: #2c3e50;          /* Dark Text */
    --text-light: #64748b;         /* Muted Text */
}

/* --- Container & Header Layout --- */
.land-profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Aligns title and back button */
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.land-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green); /* Using your green var */
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.crop-badge {
    font-size: 0.9rem;
    background-color: var(--bg-green-tint);
    color: var(--primary-green);
    padding: 3px 10px;
    border-radius: 20px;
    vertical-align: middle;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.land-address {
    color: #64748b;
    margin-top: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- The Grid System (Responsive Magic) --- */
.dashboard-grid {
    display: grid;
    /* Columns will be at least 300px wide, or split 50/50 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Make Boundaries take full width if space allows */
.full-width-mobile {
    grid-column: 1 / -1;
}

/* --- Card Styling --- */
.info-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color); /* Light gray */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    overflow: hidden; /* Keeps header corners rounded */
    transition: transform 0.2s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.card-body {
    padding: 20px;
}

/* --- Data Rows styling --- */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.label {
    color: #64748b;
    font-weight: 500;
}

.value {
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
}

/* --- Geography Box --- */
.geo-box {
    display: flex;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
}

.geo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48%;
}

.mono-value {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--primary-green);
    margin-top: 5px;
}

/* --- Boundary Grid (2x2) --- */
.boundary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.boundary-item {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.boundary-item .direction {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.boundary-item .b-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* --- Action Footer (Buttons) --- */
.action-footer {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Primary Button (for Edit Details) */
.btn-primary {
    background-color: var(--primary-green);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #4CAF50; /* Highlight color */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.4);
}

/* Secondary Button (Back to List) - NEUTRAL COLOR SCHEME */
.header-action .btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    background: #ffffff !important;
    color: #3a3a3a !important;
    font-weight: 700 !important;

    padding: 4px 20px !important;
    border: 2px solid #dcdcdc !important;
    border-radius: 20px !important;

    font-size: 16px !important;
    text-decoration: none !important;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s ease !important;
}

.header-action .btn-secondary:hover {
    background: #f8f8f8 !important;
    border-color: #cfcfcf !important;
    transform: translateY(3px) !important;
}


/* Danger Button Specifics */
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    border: 1px solid #fee2e2;
    color: #ef4444;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
    transform: translateY(-2px);
}

/* --- Mobile Specific Adjustments --- */
@media screen and (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-action {
        width: 100%;
        margin-top: 10px; /* Space between title and button on mobile */
    }

    .btn-secondary {
        /* On mobile, this button needs to be displayed block/full width */
        display: flex;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .boundary-grid {
        grid-template-columns: 1fr; /* Stack boundaries on very small screens */
    }

    .action-footer {
        flex-direction: column;
    }

    .action-footer a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

