/* ================================================================
   style.css - Premium Theme for Land Broker System
   ================================================================ */

/* ---------- 1. CSS Variables (Premium Light Theme) ---------- */
:root {
    --primary-gradient: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    --primary-blue: #1a2a6c;
    --primary-gold: #fdbb2d;
    --primary-red: #b21f1f;
    --bg-page: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #1a2a6c;
    --text-secondary: #2d3748;
    --text-muted: #718096;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 60px rgba(26, 42, 108, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Rasa', serif;
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    color: var(--text-secondary);
}
a { text-decoration: none; color: inherit; }

/* ---------- 3. Container ---------- */
.container {
    max-width: 1300px;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
}

/* ---------- Navigation Bar & Buttons ---------- */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}
.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-brand i {
    color: var(--primary-gold);
}
.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    border-radius: 20px;
    font-family: 'Rasa', serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: var(--transition);
    line-height: 1;
    white-space: nowrap;
}
.nav-btn-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: 1.5px solid transparent;
    box-shadow: 0 3px 10px rgba(26, 42, 108, 0.2);
}
.nav-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26, 42, 108, 0.3);
}
.nav-btn-outline {
    background: #ffffff;
    color: var(--primary-blue) !important;
    border: 1.5px solid var(--primary-blue);
}
.nav-btn-outline:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}
.nav-btn-subtle {
    background: #f7fafc;
    color: var(--text-secondary) !important;
    border: 1.5px solid #cbd5e0;
}
.nav-btn-subtle:hover {
    background: #edf2f7;
    color: var(--primary-blue) !important;
    transform: translateY(-2px);
}

/* ---------- 4. Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- 5. Login Screen ---------- */
#loginScreen {
    max-width: 420px;
    margin: 40px auto;
    padding: 30px 25px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
}
#loginScreen h1 {
    font-size: 32px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}
.input-group { margin-bottom: 18px; }
.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 15px;
}
.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Rasa', serif;
    font-size: 18px;
    outline: none;
    background: #f7fafc;
    transition: var(--transition);
}
.input-group input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(26, 42, 108, 0.3);
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 42, 108, 0.4);
}
.error-msg { color: var(--primary-red); margin-top: 10px; font-weight: 600; text-align: center; }
.demo-hint {
    margin-top: 20px;
    background: #f7fafc;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
}
.demo-hint code {
    background: #e2e8f0;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--primary-blue);
}

/* ---------- 6. Dashboard Header ---------- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}
.dashboard-header h2 {
    font-size: 26px;
    color: var(--text-primary);
    font-weight: 700;
}
.dashboard-header h2 i { color: var(--primary-gold); margin-right: 8px; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.header-actions button {
    padding: 8px 20px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Rasa', serif;
    font-size: 15px;
    transition: var(--transition);
}
.btn-logout {
    background: var(--primary-red);
    color: #fff;
}
.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(178, 31, 31, 0.3);
}
.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 42, 108, 0.3);
}
.btn-success {
    background: #27ae60;
    color: #fff;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
.btn-danger {
    background: var(--primary-red);
    color: #fff;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(178, 31, 31, 0.3);
}
.btn-warning {
    background: var(--primary-gold);
    color: #1a2a6c;
}
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253, 187, 45, 0.3);
}

/* ---------- 7. Stats Cards ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.stat-card {
    background: var(--bg-card);
    padding: 18px 20px;
    border-radius: var(--border-radius);
    border-left: 6px solid var(--primary-blue);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.stat-card .label {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 600;
}
.stat-card.available { border-left-color: #27ae60; }
.stat-card.sold { border-left-color: var(--primary-red); }
.stat-card.today { border-left-color: var(--primary-gold); }

/* ---------- 8. Filter Bar ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px 18px;
    background: #f7fafc;
    border-radius: var(--border-radius);
    align-items: center;
}
.filter-bar input, .filter-bar select {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-family: 'Rasa', serif;
    font-size: 16px;
    background: #fff;
    color: var(--text-secondary);
    outline: none;
    flex: 1 1 150px;
    min-width: 120px;
    transition: var(--transition);
}
.filter-bar input:focus, .filter-bar select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}
.filter-bar .sort-group { display: flex; gap: 6px; }
.filter-bar .sort-group button {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Rasa', serif;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}
.filter-bar .sort-group button.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary-blue);
}
.filter-bar .clear-filters {
    padding: 10px 20px;
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Rasa', serif;
    font-size: 15px;
    transition: var(--transition);
}
.filter-bar .clear-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(178, 31, 31, 0.3);
}

/* ---------- 9. Add Plot Section ---------- */
.add-plot-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}
.add-plot-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 22px;
}
.add-plot-section h3 i { color: var(--primary-gold); margin-right: 8px; }
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.form-row input, .form-row select, .form-row textarea {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Rasa', serif;
    font-size: 17px;
    background: #fff;
    color: var(--text-secondary);
    outline: none;
    flex: 1 1 160px;
    transition: var(--transition);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}
.form-row textarea {
    flex: 1 1 100%;
    resize: vertical;
    min-height: 50px;
}
.area-group {
    display: flex;
    flex: 1 1 200px;
    gap: 10px;
}
.area-group input { flex: 2 1 100px; }
.area-group select { flex: 1 1 80px; cursor: pointer; }
.btn-add {
    padding: 14px 35px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Rasa', serif;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 42, 108, 0.3);
}
.btn-add:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.note {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

/* ---------- 10. Location Picker ---------- */
.location-picker-section {
    margin: 15px 0 10px 0;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 12px;
    background: #fff;
}
.location-picker-section .picker-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}
.location-picker-section .picker-header input {
    flex: 3 1 200px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-family: 'Rasa', serif;
    font-size: 16px;
    outline: none;
    background: #f7fafc;
    transition: var(--transition);
}
.location-picker-section .picker-header input:focus {
    border-color: var(--primary-blue);
}
.location-picker-section .picker-header button {
    padding: 10px 20px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Rasa', serif;
    font-size: 16px;
    transition: var(--transition);
}
.location-picker-section .picker-header button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 42, 108, 0.3);
}
.location-picker-section .picker-header button.gps-btn {
    background: #27ae60;
}
.location-picker-section .picker-header button.gps-btn:hover {
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
#mapPicker {
    height: 250px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    width: 100%;
}
.selected-coords {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

/* ---------- 11. Plot Cards (List) ---------- */
.plots-list { display: flex; flex-direction: column; gap: 15px; margin-top: 10px; }
.plot-card-item {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease;
}
.plot-card-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}
.plot-card-item .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.plot-card-item .survey-no {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}
.plot-card-item .village-name {
    font-size: 17px;
    color: var(--text-secondary);
}
.plot-card-item .details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 8px 0;
    font-size: 16px;
    color: var(--text-secondary);
}
.plot-card-item .details span {
    background: #f7fafc;
    padding: 4px 12px;
    border-radius: 20px;
}
.plot-card-item .price-tag {
    font-weight: 700;
    color: #27ae60;
    font-size: 20px;
}
.plot-card-item .broker-tag {
    font-weight: 600;
    color: var(--primary-blue);
}
.plot-card-item .status-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 15px;
    display: inline-block;
}
.status-available { background: #d4edda; color: #155724; }
.status-sold { background: #f8d7da; color: #721c24; }
.plot-card-item .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.action-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Rasa', serif;
    font-size: 14px;
    transition: var(--transition);
}
.action-btn:hover {
    transform: translateY(-2px);
}
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sold { background: #f39c12; color: #fff; }
.btn-edit { background: var(--primary-blue); color: #fff; }
.btn-delete { background: var(--primary-red); color: #fff; }
.btn-view { background: #e2e8f0; color: var(--text-secondary); }
.status-select {
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-family: 'Rasa', serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- 12. Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.pagination button {
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Rasa', serif;
    font-weight: 600;
    transition: var(--transition);
}
.pagination button.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary-blue);
}
.pagination button:hover:not(.active) {
    background: #e2e8f0;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .info { font-size: 16px; color: var(--text-muted); }

/* ---------- 13. Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeInUp 0.3s ease;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--bg-card);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 35px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeInUp 0.4s ease;
}
.modal-box .modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-box .modal-close:hover { color: var(--primary-red); }
.modal-box h3 {
    font-size: 26px;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-right: 30px;
}
.modal-box .form-group { margin-bottom: 16px; }
.modal-box .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-secondary);
}
.modal-box .form-group input, .modal-box .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Rasa', serif;
    font-size: 17px;
    background: #f7fafc;
    outline: none;
    transition: var(--transition);
}
.modal-box .form-group input:focus, .modal-box .form-group select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}
.modal-box .btn-save {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}
.modal-box .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 42, 108, 0.3);
}

/* ---------- 14. Toast ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 100%;
}
.toast {
    background: #2d3748;
    color: #fff;
    padding: 16px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease;
    font-size: 16px;
    font-weight: 500;
}
.toast.success { background: #27ae60; }
.toast.error { background: var(--primary-red); }
.toast.warning { background: #f39c12; }
.toast.info { background: var(--primary-blue); }
.toast .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
}
.toast .toast-close:hover { opacity: 1; }

/* ---------- 15. Tabs (Super Admin) ---------- */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}
.tabs button {
    padding: 12px 25px;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
    color: var(--text-muted);
}
.tabs button.active {
    border-bottom-color: var(--primary-blue);
    color: var(--text-primary);
}
.tabs button:hover { color: var(--text-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- 16. List Items (Super Admin) ---------- */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 15px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}
.list-item .info { font-size: 17px; flex: 1; }
.list-item .info strong { color: var(--text-primary); }
.list-item .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.list-item .actions button {
    padding: 5px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-family: 'Rasa', serif;
}
.list-item .actions button:hover { transform: translateY(-2px); }
.btn-del { background: var(--primary-red); color: #fff; }
.btn-edit { background: var(--primary-blue); color: #fff; }
.btn-activate { background: #27ae60; color: #fff; }
.btn-suspend { background: #f39c12; color: #fff; }
.status-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}
.status-pending { background: #f39c12; color: #fff; }
.status-active { background: #27ae60; color: #fff; }
.status-suspended { background: var(--primary-red); color: #fff; }
.empty-msg { text-align: center; color: var(--text-muted); padding: 30px; font-size: 18px; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 768px) {
    .container { padding: 15px 10px; }
    .dashboard-header h2 { font-size: 20px; }
    .stat-card .number { font-size: 24px; }
    .stat-card { padding: 12px 15px; }
    .form-row input, .form-row select, .form-row textarea { flex: 1 1 100%; }
    .area-group { flex: 1 1 100%; }
    .btn-add { flex: 1 1 100%; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar input, .filter-bar select { flex: 1 1 auto; }
    .filter-bar .sort-group { justify-content: center; }
    .modal-box { padding: 20px 15px; margin: 10px; }
    .list-item { flex-direction: column; align-items: stretch; }
    .list-item .actions { justify-content: flex-start; }
    .tabs button { font-size: 15px; padding: 8px 15px; }
    .plot-card-item .row { flex-direction: column; align-items: stretch; }
    .toast-container { max-width: 90%; right: 5%; top: 10px; }
}
@media (max-width: 400px) {
    .stat-card .number { font-size: 20px; }
    .action-btn { font-size: 13px; padding: 6px 12px; }
    .modal-box h3 { font-size: 20px; }
}