/* Font & Base */
body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #f0f2f5;
    font-size: 14px;
}

/* Main Layout */
#app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
#sidebar {
    width: 340px;
    background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    /* Above map */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.scrolling-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Map */
#map {
    flex-grow: 1;
    height: 100%;
    z-index: 1;
}

/* Header */
.panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-logo {
    height: 40px;
    width: auto;
}

.panel-header h1 {
    font-size: 1.1em;
    color: #2c3e50;
    margin: 0;
}

.panel-nav {
    padding: 10px;
    background: #f1f2f6;
    border-bottom: 1px solid #e1e4e8;
    text-align: center;
    font-size: 0.9em;
}

.panel-nav a {
    color: #555;
    text-decoration: none;
    margin: 0 5px;
}

.panel-nav a:hover {
    color: #3498db;
}

/* Sections */
.section {
    margin-bottom: 25px;
}

.section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 0.95em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    display: inline-block;
}

/* Inputs */
.coord-inputs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

/* Buttons */
button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.primary-btn {
    background: #3498db;
    color: white;
    margin-top: 5px;
}

.primary-btn:hover {
    background: #2980b9;
}

.success-btn {
    background: #27ae60;
    color: white;
    margin-top: 10px;
}

.success-btn:hover {
    background: #219150;
}

.tool-btn {
    color: white;
}

.polygon-btn {
    background: #e67e22;
}

.polygon-btn:hover {
    background: #d35400;
}

.marker-btn {
    background: #1abc9c;
}

.marker-btn:hover {
    background: #16a085;
}

.utm-btn {
    background: #2c3e50;
    /* Midnight Blue */
}

.utm-btn:hover {
    background: #34495e;
}

.clear-btn {
    background: #7f8c8d;
}

.clear-btn:hover {
    background: #95a5a6;
}

/* Results */
.result-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-box h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #333;
}

.alert-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

.alert-no-conflict {
    background: #eafaf1;
    color: #27ae60;
    border-left: 3px solid #27ae60;
}

.alert-conflict {
    background: #fceceb;
    color: #c0392b;
    border-left: 3px solid #c0392b;
}

/* Location Info */
.location-info {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d0e6fb;
}

.location-info h4 {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    color: #2c3e50;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    margin-bottom: 5px;
    border-bottom: 1px solid #e1ecf7;
    padding-bottom: 4px;
}

.info-row:last-child {
    border-bottom: none;
}

/* WhatsApp */
.whatsapp-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Mobile */
@media (max-width: 768px) {
    #app-wrapper {
        flex-direction: column-reverse;
    }

    #sidebar {
        width: 100%;
        height: 45vh;
        border-right: none;
        border-top: 1px solid #ddd;
    }

    #map {
        height: 55vh;
    }
}