/**
 * Estils globals per IoT-Vertebrae v2
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e;
    color: #ecf0f1;
    overflow: hidden;
}

/* Container principal (per sota del MenuBar) */
#app-container {
    position: fixed;
    top: 36px; /* Altura del MenuBar */
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* Scrollbars globals */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #2c3e50;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}

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

.no-select {
    user-select: none;
}

/* Loading spinner (per futures funcionalitats) */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay per modals (futur) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
}

.overlay.active {
    display: block;
}

/* Notificacions toast (futur) */
.toast {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    animation: toastIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #2ecc71;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid #3498db;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Text selection */
::selection {
    background: #3498db;
    color: white;
}

::-moz-selection {
    background: #3498db;
    color: white;
}

/* Focus rings */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Disable outline per clicks de ratolí (només teclat) */
*:focus:not(:focus-visible) {
    outline: none;
}
