/* Reset dan base styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}


/* Login Styles */

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    color: #333;
    margin-bottom: 5px;
    font-size: 24px;
}

.login-form h2 {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: normal;
}


/* Mobile Container */

.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}


/* Header */

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 20px;
}

.user-info {
    font-size: 14px;
    text-align: right;
}

.logout-btn,
.back-btn {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-left: 10px;
    font-size: 12px;
    opacity: 0.9;
}

.logout-btn:hover,
.back-btn:hover {
    opacity: 1;
}


/* Navigation */

.mobile-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.nav-item.active {
    color: #667eea;
    border-bottom-color: #667eea;
}


/* Main Content */

.main-content {
    padding: 20px;
}


/* Stats Grid */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}


/* Chart Container */

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #f0f0f0;
    position: relative;
    margin: 0 auto 20px;
    overflow: hidden;
}

.chart-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%);
    background: conic-gradient( from var(--start-angle), var(--color) 0%, var(--color) calc(var(--percentage) * 1%), transparent calc(var(--percentage) * 1%), transparent 100%);
    transform: rotate(var(--start-angle));
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chart-center span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.chart-center small {
    font-size: 12px;
    color: #666;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-label {
    flex: 1;
    font-size: 14px;
}

.legend-percentage {
    font-weight: bold;
    color: #333;
}


/* Forms */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}


/* Buttons */

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 5px;
    width: 100%;
}


/* Messages */

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}


/* Admin Tabs */

.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* Tables */

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:last-child td {
    border-bottom: none;
}


/* Demo Accounts */

.demo-accounts {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.demo-accounts h3 {
    margin-bottom: 10px;
    color: #333;
}

.demo-accounts p {
    margin-bottom: 5px;
}


/* Responsive */

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .pie-chart {
        width: 150px;
        height: 150px;
    }
    .chart-center {
        width: 60px;
        height: 60px;
    }
    .chart-center span {
        font-size: 16px;
    }
    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .user-info {
        text-align: center;
    }
}


/* Styles untuk fitur lokasi dan foto */

.btn-location,
.btn-camera,
.btn-gallery {
    width: 100%;
    padding: 12px 15px;
    border: 2px dashed #667eea;
    background: #f8f9ff;
    color: #667eea;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-location:hover,
.btn-camera:hover,
.btn-gallery:hover {
    background: #667eea;
    color: white;
}

.btn-gallery {
    border-color: #28a745;
    background: #f8fff9;
    color: #28a745;
    margin-top: 10px;
}

.btn-gallery:hover {
    background: #28a745;
    color: white;
}

.location-status {
    margin-top: 8px;
    font-size: 14px;
}

.location-status .loading {
    color: #ffc107;
    font-weight: 500;
}

.location-status .success {
    color: #28a745;
    font-weight: 500;
}

.location-status .error {
    color: #dc3545;
    font-weight: 500;
}

.photo-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-preview {
    margin-top: 10px;
    text-align: center;
}

.photo-preview img {
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Required field indicator */

.form-group label[for]:after {
    content: " *";
    color: #dc3545;
}


/* Improved form styling */

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}


/* Responsive improvements */

@media (max-width: 480px) {
    .btn-location,
    .btn-camera,
    .btn-gallery {
        padding: 15px;
        font-size: 14px;
    }
    .photo-preview img {
        max-width: 100%;
        height: auto;
    }
}


/* Layout untuk dua chart berdampingan */

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}


/* Responsive untuk mobile */

@media (max-width: 768px) {
    .charts-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .chart-container {
        margin-bottom: 0;
    }
}


/* Perbaikan tampilan chart untuk ukuran kecil */

.pie-chart {
    width: 150px;
    height: 150px;
}

.chart-center {
    width: 60px;
    height: 60px;
}

.chart-center span {
    font-size: 16px;
}

.chart-center small {
    font-size: 10px;
}


/* Tabel detail sektor usaha */

.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.table-container h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #667eea;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
}

.data-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.data-table tr:nth-child(even) {
    background: #f8f9fa;
}

.data-table tr:hover {
    background: #e9ecef;
}


/* Legend improvements */

.chart-legend {
    max-height: 200px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.legend-item:last-child {
    border-bottom: none;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-percentage {
    font-weight: bold;
    color: #333;
    font-size: 12px;
    flex-shrink: 0;
}


/* Daftar Prospek Styles */

.action-bar {
    margin-bottom: 20px;
    text-align: right;
}

.btn-excel {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-excel:hover {
    background: #218838;
}

.prospek-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prospek-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #667eea;
}

.prospek-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.prospek-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.prospek-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.berminat {
    background: #d4edda;
    color: #155724;
}

.status-badge.belum_berminat {
    background: #fff3cd;
    color: #856404;
}

.status-badge.tidak_berminat {
    background: #f8d7da;
    color: #721c24;
}

.prospek-info {
    display: grid;
    gap: 8px;
}

.prospek-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* 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);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
}


/* Detail Section Styles */

.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.info-item span {
    color: #333;
    text-align: right;
    flex: 1;
}

.photo-container {
    text-align: center;
}

.activity-photo {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-container {
    margin-top: 15px;
}

.map-caption {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 10px 0 5px 0;
}

.map-credit {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 0;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}


/* Responsive */

@media (max-width: 480px) {
    .prospek-header {
        flex-direction: column;
        gap: 10px;
    }
    .info-item {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    .info-item span {
        text-align: left;
    }
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}

.btn-excel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-excel:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}


/* Location Container Styles */

.location-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-location {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-location:hover {
    background: #218838;
    transform: translateY(-2px);
}


/* Location Status Styles */

.location-status {
    margin-top: 8px;
    font-size: 14px;
    min-height: 20px;
}

.location-status .loading {
    color: #ffc107;
    font-weight: 500;
}

.location-status .success {
    color: #28a745;
    font-weight: 500;
}

.location-status .error {
    color: #dc3545;
    font-weight: 500;
}


/* Form Improvements */

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    cursor: not-allowed;
}


/* Photo Options */

.photo-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-camera,
.btn-gallery {
    width: 100%;
    padding: 12px 20px;
    border: 2px dashed #667eea;
    background: #f8f9ff;
    color: #667eea;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-camera:hover,
.btn-gallery:hover {
    background: #667eea;
    color: white;
}

.btn-gallery {
    border-color: #28a745;
    background: #f8fff9;
    color: #28a745;
}

.btn-gallery:hover {
    background: #28a745;
    color: white;
}

.photo-preview {
    margin-top: 10px;
    text-align: center;
}

.photo-preview img {
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Location Styles sesuai struktur baru */

.uppercase-input {
    text-transform: uppercase;
}

.btn-location {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-location:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-location i {
    font-size: 16px;
}

.location-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.location-info strong {
    color: #495057;
}

.field-status {
    margin-top: 5px;
    font-size: 12px;
    min-height: 18px;
}


/* Form input styles */

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}


/* Photo Options */

.photo-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-camera,
.btn-gallery {
    width: 100%;
    padding: 12px 20px;
    border: 2px dashed #667eea;
    background: #f8f9ff;
    color: #667eea;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-camera:hover,
.btn-gallery:hover {
    background: #667eea;
    color: white;
}

.btn-gallery {
    border-color: #28a745;
    background: #f8fff9;
    color: #28a745;
}

.btn-gallery:hover {
    background: #28a745;
    color: white;
}

.photo-preview {
    margin-top: 10px;
    text-align: center;
}

.photo-preview img {
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Location Styles */

.uppercase-input {
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
}

.btn-location {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.btn-location:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-location i {
    font-size: 16px;
}

.location-info {
    margin-top: 10px;
    padding: 12px 15px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    font-size: 14px;
}

.location-info strong {
    color: #0056b3;
}

.field-status {
    margin-top: 8px;
    font-size: 14px;
    min-height: 20px;
    padding: 5px 0;
}

.field-status .loading {
    color: #ffc107;
    font-weight: 500;
}

.field-status .success {
    color: #28a745;
    font-weight: 500;
}

.field-status .warning {
    color: #fd7e14;
    font-weight: 500;
}

.field-status .error {
    color: #dc3545;
    font-weight: 500;
}

.field-status .info {
    color: #17a2b8;
    font-weight: 500;
}


/* Form input styles */

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    cursor: not-allowed;
}

.form-group input[readonly]:focus {
    background-color: #f8f9fa;
    border-color: #ced4da;
}


/* Photo Options */

.photo-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-camera,
.btn-gallery {
    width: 100%;
    padding: 12px 20px;
    border: 2px dashed #667eea;
    background: #f8f9ff;
    color: #667eea;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-camera:hover,
.btn-gallery:hover {
    background: #667eea;
    color: white;
}

.btn-gallery {
    border-color: #28a745;
    background: #f8fff9;
    color: #28a745;
}

.btn-gallery:hover {
    background: #28a745;
    color: white;
}

.photo-preview {
    margin-top: 10px;
    text-align: center;
}

.photo-preview img {
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}


/* Warning Message Styles */

.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ffeaa7;
}

.session-info {
    margin-top: 15px;
    text-align: center;
    color: #6c757d;
    font-size: 12px;
}

.session-info p {
    margin: 5px 0;
}


/* Notification Styles */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}