/* Global Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4; /* Colore di sfondo pagina */
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: #16a085; /* Verde chiaro per l'header */
    color: white;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between; /* Spazio tra il titolo e l'immagine */
    align-items: center;
    width: 50%;
}

header h1 {
    font-size: 36px;
    margin: 0;
}

.welcome-image {
    width: 120px; /* Cambia la dimensione dell'immagine */
    height: auto;
    margin-left: 20px; /* Distanza tra il titolo e l'immagine */
}




/* Navbar principale verde acqua */
.navbar-custom {
    background-color: #16a085 !important;
}

/* Titolo "CryptoGang" bianco */
.navbar-custom .navbar-brand span {
    color: #ffffff !important;
}

/* Dropdown chiaro */
.navbar-custom .dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #ccc;
}

/* Dropdown item */
.navbar-custom .dropdown-item {
    color: #16a085;
    font-weight: 500;
}

.navbar-custom .dropdown-item:hover {
    background-color: #e0f2f1;
    color: #000;
}

/* Voci di menu principali */
.navbar-custom .navbar-nav > .nav-item > .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-custom .navbar-nav > .nav-item > .nav-link:hover {
    color: #dffaf7 !important;
}

/* Pulsante "Esci" con rosso soft e sfumatura coerente */
.navbar-custom .btn-logout {
    background-color: #455A64; /* Grigio-blu scuro */
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.navbar-custom .btn-logout:hover {
    background-color: #607D8B; /* Grigio-blu medio */
    color: #ffffff;
}



/* User Profile Link (opzionale) */
.user-profile a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    display: inline-block;
    background-color: #444;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.user-profile a:hover {
    background-color: #1abc9c; /* Verde chiaro al passaggio del mouse */
}

/* Main content area */
main {
    padding: 20px;
    /*max-width: 1200px;*/
    margin: 0 auto;
}

.container {
    padding: 40px;
    background-color: white; /* Sfondo bianco */
    border-radius: 12px; /* Angoli arrotondati */
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12); /* Ombra leggera */
    border: 3px solid rgba(0, 0, 0, 0.1); /* Bordi sottili e tenui */
    margin: 40px auto;
    transition: all 0.3s ease-in-out;
    color: #2C3E50; /* Testo scuro per contrasto */
    
    /* Responsive */
    max-width: 90%;
    width: 100%;
}

/* Effetto al passaggio del mouse */
.container:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18); /* Ombra più forte al passaggio del mouse */
}

/* Stile per dispositivi più grandi */
@media (min-width: 1200px) {
    .container {
        max-width: 98% !important;
    }
}

/* Form Styling */
.form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

label {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #16a085; /* Verde chiaro */
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #16a085;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #1abc9c; /* Verde chiaro al passaggio del mouse */
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 10px;
    text-align: center;
    margin-top: 40px;
}

footer .footer-content p {
    margin: 0;
}

/* Tabella Utenti */
table {
    width: 100%;
    border-collapse: collapse; /* Per unire i bordi */
    margin-top: 20px;
}

th, td {
    padding: 12px 15px; /* Spazio interno per le celle */
    text-align: left;
    border-bottom: 1px solid #ddd; /* Bordi sottili per la tabella */
}

th {
    background-color: #16a085; /* Colore di sfondo per le intestazioni */
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9; /* Colore alternato per le righe della tabella */
}

tr:hover {
    background-color: #f1f1f1; /* Colore al passaggio del mouse */
}


/* Aggiungi padding e bordi alle celle */
td a {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center; /* Centra orizzontalmente */
    align-items: center; /* Centra verticalmente */
    width: 100%;
    height: 70vh; /* Altezza della finestra del browser per centrare verticalmente */
}

.login-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

/* Form Styling */
.login-form .form-group {
    margin-bottom: 15px;
}

.login-form input {
    width: 90%;
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #16a085; /* Verde chiaro */
}

/* Button Styling */
.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: #16a085;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form .btn:hover {
    background-color: #1abc9c;
}

/* Stili per i messaggi di successo */
.alert-success {
    background-color: #28a745; /* Verde per il messaggio di successo */
    color: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Stili per i messaggi di errore */
.alert-error {
    background-color: #dc3545; /* Rosso per il messaggio di errore */
    color: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Messaggio icona */
.alert-success .icon, .alert-error .icon {
    margin-right: 10px;
}

/* Icona a sinistra per entrambi i tipi di messaggio */
.alert-success .icon::before {
    content: '\2714'; /* Icona di check per il successo */
    font-size: 20px;
}

.alert-error .icon::before {
    content: '\26A0'; /* Icona di avvertimento per l'errore */
    font-size: 20px;
}

/* Classe per indicare che un job è in esecuzione */
.in-execution {
    font-weight: bold;
    color: green !important; /* Usa !important per sovrascrivere eventuali stili conflittuali */
    text-decoration-line: underline;
}
/* Classe per indicare che un job non è in esecuzione */
.not-in-execution {
    font-weight: bold;
    color: #fd7e14 !important; /* Usa !important per sovrascrivere eventuali stili conflittuali */
    text-decoration-line: none;
}

/* Classe per lo stato ACTIVE */
.active-status {
	font-weight: bold;
    color: green !important;
}

/* Classe per lo stato UPDATING */
.updating-status {
	font-weight: bold;
    color: yellow !important;
}

/* Classe per lo stato TERMINATED */
.terminated-status {
	font-weight: bold;
    color: red !important;
}

.hidden {
    display: none !important;
}

.table thead th {
    background-color: #007bff; /* Blu acceso */
    color: white; /* Testo bianco per contrasto */
    text-align: center;
    padding: 10px;
}

/*override style bootstrap*/
.text-danger {
    color: #ff5733 !important;
    font-size: 14px;
    font-weight: bold;
}

.custom-hr {
    border-top: 1px solid #343a40; /* Arancione */
    opacity: 1; /* Evita che Bootstrap lo renda trasparente */
}

/* Allinea al centro e impedisce il ritorno a capo */
#live-operations-table th,
#live-operations-table td {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

/* Fa sì che la tabella si adatti al contenuto */
#live-operations-table {
    width: 100%;
    table-layout: auto;
}

#live-operations-table-wrapper {
    overflow-x: auto;
}

.note-small {
    font-size: 0.9rem;
    font-weight: normal;
    color: #555;
}

tr.separator-bottom > td {
    border-bottom: 2px solid #333 !important; /* bordo scuro per separare le coppie */
}

.pending-buy td {
    background-color: #fff3cd !important; /* colore giallo chiaro compatibile con Bootstrap */
    color: #856404 !important; /* colore del testo scuro per leggibilità */
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333; /* un grigio scuro leggibile */
    margin-bottom: 1rem;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.time-it { 
	color: green; 

}
.time-ny { 
	color: red; margin-left: 8px; 
}

.btn-force-sell {
    background-color: #dc3545; /* rosso pieno */
    color: white;
    font-weight: normal;
    padding: 0.35rem 0.6rem;
    border: none;
    border-radius: 0.3rem;
    transition: all 0.2s ease-in-out;
    font-size: 0.85rem;
}

.btn-force-sell:hover {
    background-color: #c82333;
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
    cursor: pointer;
}

@keyframes blinkProfit {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.7; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

.blink-profit {
  animation: blinkProfit 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes blinkBlack {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.6; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

.blink-black {
  animation: blinkBlack 1.5s ease-in-out infinite;
  font-weight: bold;
  color: #000 !important;
  display: inline-block;
}

#live-operations-table-wrapper {
    max-height: 500px; /* o l'altezza che vuoi */
    overflow-y: auto;
}

#live-operations-table thead th {
    position: sticky;
    top: 0;
    background-color: #007bff; /* stesso colore che hai già */
    z-index: 2;
}

/* Centra orizzontalmente e verticalmente le 3 tabelle degli asset */
#fiat-table th, #fiat-table td,
#stablecoin-table th, #stablecoin-table td,
#crypto-table th, #crypto-table td {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

/* Bordo sottile e uniforme */
#fiat-table, #stablecoin-table, #crypto-table {
    border-collapse: collapse;
    width: 100%;
}

#fiat-table td, #stablecoin-table td, #crypto-table td,
#fiat-table th, #stablecoin-table th, #crypto-table th {
    border: 1px solid #ddd;
    padding: 8px;
}
