* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: #f4f6f9;
}

/* Header */
.header {
    height: 60px;
    background: #1e293b;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.logo .icon {
    font-size: 1.4rem;
}

.logo .subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
}

.status-panel {
    display: flex;
    gap: 10px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-loading {
    background: #475569;
    color: #cbd5e1;
}

.badge-success {
    background: #059669;
    color: #fff;
}

.badge-error {
    background: #dc2626;
    color: #fff;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
}

.sidebar {
    width: 360px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
}

.card .desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
}

.form-check {
    margin-bottom: 8px;
}

.form-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 4px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s;
    margin-bottom: 6px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #0d9488;
    color: #fff;
}
.btn-secondary:hover {
    background: #0f766e;
}

.btn-outline {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.btn-outline:hover {
    background: #f1f5f9;
}

.result-box {
    margin-top: 10px;
    font-size: 0.8rem;
    max-height: 120px;
    overflow-y: auto;
}

.system-info ul {
    list-style: none;
}

.system-info li {
    margin-bottom: 6px;
}

.system-info a {
    font-size: 0.85rem;
    color: #2563eb;
    text-decoration: none;
}

.system-info a:hover {
    text-decoration: underline;
}

/* Map */
.map-container {
    flex: 1;
    position: relative;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

.map-tip {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    font-size: 0.85rem;
    color: #1e293b;
    z-index: 999;
}
