body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', sans-serif; 
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVBAR */
.navbar {
    background: #1a1a1a;
    color: #eee;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    font-size: 1.5rem;
}

.navbar-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4CAF50;
    letter-spacing: 1px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-user {
    color: #aaa;
    font-size: 0.9rem;
}

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

/* MAIN CONTENT AREA */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* LEFT SIDEBAR - Controls */
#left-sidebar { 
    width: 300px; 
    background: #1a1a1a; 
    color: #eee; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 2px 0 5px rgba(0,0,0,0.5); 
    z-index: 2;
}

/* RIGHT SIDEBAR - Drone List */
#right-sidebar {
    width: 280px;
    background: #1a1a1a;
    color: #eee;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    z-index: 2;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #333;
    background: #222;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#drone-count {
    color: #4CAF50;
    font-weight: bold;
}

.p-4 { 
    padding: 20px; 
}

h2 { 
    margin-top: 0; 
    color: #4CAF50; 
    font-size: 1.2rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

h3 { 
    font-size: 0.9rem; 
    color: #888; 
    margin-bottom: 10px; 
    text-transform: uppercase; 
}

.btn { 
    display: block; 
    width: 100%; 
    padding: 10px; 
    margin-bottom: 10px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.2s; 
}

.btn-primary { 
    background: #2196F3; 
    color: white; 
}

.btn-success { 
    background: #4CAF50; 
    color: white; 
}

.btn-danger { 
    background: #f44336; 
    color: white; 
}

.btn-outline { 
    background: transparent; 
    border: 1px solid #555; 
    color: #ccc; 
}

.btn:hover { 
    opacity: 0.9; 
}

/* COMPACT DRONE LIST */
.drone-list-compact {
    overflow-y: auto;
    flex: 1;
}

.no-drones {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

.drone-item-compact {
    padding: 8px 12px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.drone-item-compact:hover {
    background: #252525;
}

.drone-item-compact.selected {
    background: #2a3a2a;
    border-left: 3px solid #4CAF50;
}

.drone-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.drone-status-icon.ready {
    background: #4CAF50;
    box-shadow: 0 0 4px #4CAF50;
}

.drone-status-icon.not-ready {
    background: #ff9800;
}

.drone-status-icon.error {
    background: #f44336;
}

.drone-status-icon.armed {
    background: #2196F3;
    box-shadow: 0 0 6px #2196F3;
}

.drone-info {
    flex: 1;
    min-width: 0;
}

.drone-name {
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drone-details {
    display: flex;
    gap: 8px;
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

.drone-battery {
    display: flex;
    align-items: center;
    gap: 3px;
}

.drone-battery.low {
    color: #f44336;
}

.drone-battery.good {
    color: #4CAF50;
}

.drone-error {
    font-size: 0.7rem;
    color: #ff9800;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Old drone item styles (keep for backward compatibility) */
.drone-item { 
    background: #333; 
    padding: 10px; 
    margin-bottom: 5px; 
    border-radius: 4px; 
    cursor: pointer; 
    border-left: 4px solid #555; 
}

.drone-item.active { 
    border-left-color: #4CAF50; 
    background: #2a2a2a; 
}

.drone-item.no-gps { 
    border-left-color: #f44336; 
}

.drone-item:hover { 
    background: #444; 
}

.drone-item span {
    line-height: 1.4;
}

/* MAP */
#map-container { 
    flex-grow: 1; 
    position: relative; 
}

#map { 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    width: 100%; 
}

/* Waypoint markers should show move cursor when hoverable */
.mapboxgl-marker {
    cursor: move;
}

/* MODAL */
.modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.7); 
    z-index: 999; 
    justify-content: center; 
    align-items: center; 
}

.modal-content { 
    background: #222; 
    padding: 20px; 
    width: 500px; 
    border-radius: 8px; 
    color: #eee; 
}

textarea { 
    width: 100%; 
    height: 200px; 
    background: #111; 
    color: #0f0; 
    border: 1px solid #333; 
    font-family: monospace; 
    padding: 10px; 
    margin-top: 10px;
}

input { 
    width: 100%; 
    padding: 8px; 
    margin-bottom: 10px; 
    background: #333; 
    border: 1px solid #444; 
    color: white; 
}

select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    border-radius: 4px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
}

label {
    display: block;
    margin-bottom: 5px;
}

/* LOGIN PAGE */
.login-body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #222;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    text-align: center;
}

.login-title {
    color: #4CAF50;
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: bold;
    letter-spacing: 2px;
}

.login-subtitle {
    color: #888;
    margin: 0 0 30px 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
}

.flash-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.flash-error {
    background: #f44336;
    color: white;
}

.flash-info {
    background: #2196F3;
    color: white;
}

.flash-success {
    background: #4CAF50;
    color: white;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}
