/* Base */
:root {
    --primary: #0ca678;
    --primary-dark: #099268;
    --secondary: #228be6;
    --danger: #fa5252;
    --bg: #f4f6f8;
    --white: #ffffff;
    --text: #333;
    --border: #dee2e6;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    height: 100vh;
}

a {
    text-decoration: none;
}

/* Dashboard Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

h1 {
    margin: 0;
    font-size: 2rem;
}

table {
    width: 100%;
    background: var(--white);
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

/* Editor Layout */
.editor-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 380px;
    background: var(--white);
    padding: 25px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 10;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.map-area {
    flex: 1;
    position: relative;
}

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

.map-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.form-col {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.form-check input {
    width: auto;
}

.form-check label {
    margin: 0;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Buttons & Utilities */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}

.badge.active {
    background: #e6fcf5;
    color: var(--primary);
}

.badge.stopped {
    background: #fff5f5;
    color: var(--danger);
}

.actions-footer {
    margin-top: auto;
    padding-top: 20px;
}

.back-link {
    display: inline-block;
    color: #888;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.sidebar-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Icon Button */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #888;
    padding: 5px;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--danger);
}

/* Large Button */
.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
    width: 100%;
    margin-top: 10px;
}