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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Layout */
header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

header nav a {
    color: #0066cc;
    text-decoration: none;
}

header nav a:hover {
    text-decoration: underline;
}

header nav .locale-switch {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

header nav .locale-switch strong {
    color: #333;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.875rem;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Table */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    margin: 1rem 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

tr:last-child th,
tr:last-child td {
    border-bottom: none;
}

th {
    background: #f8f8f8;
    font-weight: 600;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.table-actions form {
    display: inline;
    margin: 0;
}

.table-actions a,
.table-actions button {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.table-actions a:hover,
.table-actions button:hover {
    background: #f4f7fb;
    border-color: #b9cce0;
    color: #0052a3;
}

.table-actions button,
.table-actions button.btn-danger {
    background: #fff;
    border-color: #ecc;
    color: #c00;
}

.table-actions button:hover,
.table-actions button.btn-danger:hover {
    background: #fdf2f2;
    border-color: #e0a0a0;
    color: #a00;
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.form-group .error {
    color: #c00;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Button */
button, .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

button, .btn-primary {
    background: #0066cc;
    color: #fff;
}

button:hover, .btn-primary:hover {
    background: #0052a3;
}

.btn-danger {
    background: #c00;
    color: #fff;
}

.btn-danger:hover {
    background: #a00;
}

.btn-secondary {
    background: #eee;
    color: #333;
}

.btn-secondary:hover {
    background: #ddd;
}

button.is-active {
    background: #0066cc;
    color: #fff;
}

/* Map (Places) */
#places-map {
    height: 420px;
    width: 100%;
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 1;
}

.map-route {
    margin: 0 0 1.5rem;
}

#places-route-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.map-route-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0;
}

.map-route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.map-route-actions button {
    margin: 0;
}

.map-route-note,
.map-route-summary {
    color: #666;
    font-size: 0.875rem;
}

.map-route-save {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}
