:root {
    /* Vinotinto Palette */
    --primary-color: #800020;
    /* Burgundy */
    --primary-dark: #4a0012;
    /* Darker Burgundy */
    --primary-light: #a52a4a;
    /* Lighter Burgundy */

    --accent-color: #D4AF37;
    /* Gold */
    --accent-hover: #b5952f;

    --text-main: #333333;
    --text-light: #ffffff;
    --text-muted: #666666;

    --bg-body: #f4f4f4;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;

    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);

    --danger-color: #dc3545;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 320px;
    /* Slightly wider for forms */
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    text-align: left;
    font-size: 16px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover {
    background-color: rgba(128, 0, 32, 0.05);
    color: var(--primary-color);
}

.nav-btn.active {
    background-color: rgba(128, 0, 32, 0.1);
    color: var(--primary-color);
    border-right: 4px solid var(--primary-color);
    font-weight: 500;
}

/* Sidebar Content Panes */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.sidebar-pane {
    padding: 20px;
    height: 100%;
    display: none;
    flex-direction: column;
}

.sidebar-pane.active {
    display: flex;
}

.sidebar-actions {
    margin-bottom: 20px;
}

.sidebar-actions h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Buttons */
.action-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-secondary {
    padding: 10px 15px;
    background-color: #f0f0f0;
    color: var(--text-main);
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    padding: 10px 15px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-danger:hover {
    background-color: #c82333;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(128, 0, 32, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

.location-preview {
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Node List */
.node-list {
    flex: 1;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 20px;
}

/* Details View */
.details-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.details-header h3 {
    font-size: 20px;
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    background-color: var(--text-muted);
    margin-top: 5px;
}

.details-body p {
    margin-bottom: 10px;
    font-size: 14px;
}

.details-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.top-bar {
    height: 60px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
}

.status-dot.online {
    background-color: #2ecc71;
}

.map-container {
    flex: 1;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* List Group for Wizard */
.list-group {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

.list-group .nav-btn {
    width: 100%;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.list-group .nav-btn:last-child {
    border-bottom: none;
}

.list-group .nav-btn:hover {
    background-color: #f9f9f9;
    color: var(--primary-color);
}

/* Fiber Colors */
.fiber-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 4px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.fiber-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.fiber-item.used {
    opacity: 0.5;
    cursor: not-allowed;
}

.fiber-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(128, 0, 32, 0.1);
}

.fiber-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid #ccc;
}

.fiber-color.azul {
    background-color: #0066cc;
}

.fiber-color.naranja {
    background-color: #ff6600;
}

.fiber-color.verde {
    background-color: #00cc00;
}

.fiber-color.marron {
    background-color: #8b4513;
}

.fiber-color.gris {
    background-color: #808080;
}

.fiber-color.blanco {
    background-color: #ffffff;
}

.fiber-color.rojo {
    background-color: #cc0000;
}

.fiber-color.negro {
    background-color: #000000;
}

.fiber-color.amarillo {
    background-color: #ffcc00;
}

.fiber-color.violeta {
    background-color: #9933cc;
}

.fiber-color.rosa {
    background-color: #ff66cc;
}

.fiber-color.aguamarina {
    background-color: #00cccc;
}

/* Fusion Management Styles */
.fusion-fiber-list {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    height: 100%;
    overflow-y: auto;
}

.fusion-fiber-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.fusion-fiber-item:hover {
    background-color: #f1f3f5;
    border-color: var(--primary-color);
}

.fusion-fiber-item.selected {
    background-color: rgba(128, 0, 32, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.fusion-fiber-item.connected {
    background-color: #e6f4ea; /* Light green */
    border-color: #28a745;
}

.fusion-fiber-item.connected .fiber-status {
    color: #28a745;
    font-size: 11px;
    margin-left: auto;
}

.fusion-fiber-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.fusion-fiber-name {
    font-weight: 500;
    font-size: 13px;
}

.fusion-fiber-detail {
    font-size: 11px;
    color: #666;
}