/* F1N Land Management System - My Lands Page Styles */
/* Green-based minimal theme for land management interface */

/* ===== HEADER CUSTOMIZATION ===== */
.sub_header_in {
    background: linear-gradient(135deg, #2e5640 0%, #3d6b4a 100%) !important;
    border-bottom: 3px solid #4a7c59;
    box-shadow: 0 2px 8px rgba(46, 86, 64, 0.15);
}

.sub_header_in h1 {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sub_header_in .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.sub_header_in .breadcrumb-item a {
    color: #e8f5e8 !important;
    text-decoration: none;
}

.sub_header_in .breadcrumb-item a:hover {
    color: #ffffff !important;
}

.sub_header_in .breadcrumb-item.active {
    color: #ffffff !important;
}

.sub_header_in .btn-outline-secondary {
    border-color: #ffffff;
    color: #ffffff;
    background: transparent;
}

.sub_header_in .btn-outline-secondary:hover {
    background: #ffffff;
    color: #2e5640;
    border-color: #ffffff;
}

/* ===== MAIN CONTAINER & LAYOUT ===== */
.my-lands-container {
    background: #ffffff;
    min-height: 100vh;
    padding: 40px 0;
}

.page-header {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(46, 86, 64, 0.1);
    margin-bottom: 40px;
    padding: 40px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: #2e5640;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #666666;
    font-size: 1rem;
    margin-bottom: 0;
}

/* ===== STATISTICS SECTION ===== */
.stats-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(46, 86, 64, 0.1);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid #f0f0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2e5640;
    margin-bottom: 5px;
}

.stat-label {
    color: #666666;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== DATA TABLE ===== */
.data-table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(46, 86, 64, 0.1);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #2e5640;
    font-size: 0.9rem;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8fffe;
}

/* ===== LAND CARD ELEMENTS ===== */
.land-image-cell {
    width: 80px;
    padding: 8px !important;
}

.land-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.land-title {
    font-weight: 600;
    color: #2e5640;
    font-size: 1rem;
    margin-bottom: 4px;
}

.land-location {
    color: #666666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.land-location i {
    margin-right: 4px;
    color: #879e6e;
    font-size: 0.7rem;
}

.land-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2e5640;
    display: flex;
    align-items: center;
}

.land-price i {
    margin-right: 4px;
    font-size: 0.9rem;
}

.land-date {
    color: #999999;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.land-date i {
    margin-right: 4px;
    font-size: 0.7rem;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

.status-active {
    background: #879e6e;
    color: white;
}

.status-soldout {
    background: #ffc107;
    color: #212529;
}

/* ===== TABLE CONTROLS (SEARCH & FILTERS) ===== */
.table-controls {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(46, 86, 64, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    flex: 1;
    min-width: 300px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #879e6e;
    font-size: 0.9rem;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #879e6e;
    box-shadow: 0 0 0 2px rgba(135, 158, 110, 0.1);
}

.filter-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #2e5640;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #879e6e;
    box-shadow: 0 0 0 2px rgba(135, 158, 110, 0.1);
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #879e6e;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-slider {
    background: #ffc107;
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label-off,
.toggle-label-on {
    font-size: 0.6rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

.toggle-label-off {
    opacity: 1;
}

.toggle-label-on {
    opacity: 0;
}

.toggle-input:checked + .toggle-slider .toggle-label-off {
    opacity: 0;
}

.toggle-input:checked + .toggle-slider .toggle-label-on {
    opacity: 1;
}

.toggle-switch:hover .toggle-slider {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 0, 0, 0.1);
}

/* ===== ACTION BUTTONS ===== */
.land-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-edit {
    background: #2e5640;
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #1e3d2a;
    color: white;
    text-decoration: none;
    transform: scale(1.1);
}

.btn-delete {
    background: #dc3545;
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
    transform: scale(1.1);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(46, 86, 64, 0.1);
    border: 1px solid #f0f0f0;
}

.empty-state i {
    font-size: 3rem;
    color: #879e6e;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2e5640;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666666;
    font-size: 1rem;
    margin-bottom: 25px;
}

.btn-add-land {
    background: #2e5640;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-land:hover {
    background: #1e3d2a;
    color: white;
    text-decoration: none;
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2e5640;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 20px 25px;
}

.modal-text {
    color: #666666;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.modal-footer {
    padding: 15px 25px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
}

.btn-confirm-delete {
    background: #dc3545;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-confirm-delete:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== EDIT LAND PAGE STYLES ===== */
.edit-land-main {
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5e8 100%);
    min-height: 100vh;
    padding: 0.5rem 0;
}

.edit-land-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(39, 80, 44, 0.15);
    overflow: hidden;
    border: none;
    max-width: 800px;
    margin: 0 auto;
}

.edit-land-card .card-header {
    background: linear-gradient(135deg, #27502c 0%, #839454 100%);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
}

.edit-land-card .card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.edit-land-card .card-subtitle {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.edit-land-card .card-body {
    padding: 1rem 1.5rem;
}

.form-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.section-title {
    color: #27502c;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e8f5e8;
}

.section-description {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.form-label {
    font-weight: 600;
    color: #27502c;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.form-control {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #839454;
    box-shadow: 0 0 0 0.15rem rgba(131, 148, 84, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.land-type-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin-right: 0.4rem;
}

.form-check-label {
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.image-upload-card {
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.image-upload-card:hover {
    border-color: #839454;
    background-color: #f8fffe;
}

.image-upload-area {
    position: relative;
}

.image-input {
    margin-bottom: 0.5rem;
}

.current-image img {
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.image-preview img {
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.input-group-text {
    background-color: #839454;
    color: white;
    border: 1px solid #839454;
    font-weight: 600;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e8f5e8;
}

.btn-lg {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-success {
    background: linear-gradient(135deg, #27502c 0%, #839454 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e3a20 0%, #6d7a45 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 80, 44, 0.3);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-2px);
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #839454;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #27502c;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* Mobile Responsive Styles for Edit Page */
@media (max-width: 768px) {
    .edit-land-main {
        padding: 0.25rem 0;
    }
    
    .edit-land-card {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .edit-land-card .card-header {
        padding: 0.75rem 1rem;
    }
    
    .edit-land-card .card-title {
        font-size: 1.1rem;
    }
    
    .edit-land-card .card-body {
        padding: 0.75rem 1rem;
    }
    
    .form-section {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    .land-type-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .row {
        flex-direction: column;
    }
    
    .form-actions .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .edit-land-card .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .edit-land-card .card-body {
        padding: 0.5rem 0.75rem;
    }
    
    .edit-land-card .card-title {
        font-size: 1rem;
    }
    
    .form-control {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop Optimizations */
@media (min-width: 1200px) {
    .data-table-container {
        margin: 0;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .my-lands-container {
        padding: 20px 0;
    }
    
    .page-header {
        margin: 0 20px 30px;
        padding: 30px;
    }
    
    .stats-container {
        margin: 0 20px 30px;
        padding: 25px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .data-table-container {
        margin: 0 20px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .my-lands-container {
        padding: 15px 0;
    }
    
    .page-header {
        margin: 0 15px 20px;
        padding: 25px 20px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .stats-container {
        margin: 0 15px 20px;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .table-controls {
        margin: 0 15px 20px;
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: auto;
        margin-bottom: 10px;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .data-table-container {
        margin: 0 15px;
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .land-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .toggle-switch {
        width: 45px;
        height: 22px;
    }
    
    .toggle-slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-input:checked + .toggle-slider:before {
        transform: translateX(23px);
    }
    
    .toggle-label-off,
    .toggle-label-on {
        font-size: 0.55rem;
    }
    
    .btn-edit, .btn-delete {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .empty-state {
        margin: 0 15px;
        padding: 40px 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.6rem;
    }
    
    .land-title {
        font-size: 0.9rem;
    }
    
    .land-price {
        font-size: 1rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .land-image {
        width: 50px;
        height: 50px;
    }
    
    .toggle-switch {
        width: 40px;
        height: 20px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
    
    .toggle-label-off,
    .toggle-label-on {
        font-size: 0.5rem;
    }
    
    .btn-edit, .btn-delete {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    /* Mobile Modal */
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 15px 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-cancel, .btn-confirm-delete {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
}

/* ===== LEGACY STYLES (for backward compatibility) ===== */
.btn-view {
    background: #879e6e;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
}

.btn-view:hover {
    background: #6d7a56;
    color: white;
    text-decoration: none;
}

.btn-soldout {
    background: #ffc107;
    border: none;
    color: #212529;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
}

.btn-soldout:hover {
    background: #e0a800;
    color: #212529;
    text-decoration: none;
}

.soldout-label {
    background: #ffc107;
    color: #212529;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    border: 1px solid #ffc107;
}
