/* ------------------------------------------------------------------------------- GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Plus Jakarta Sans", sans-serif;
}

header {
    width: 100%;
    padding: 15px;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    z-index: 99;
}

header .title a {
    font-size: 20px;
    font-weight: 100;
    color: white;
    text-decoration: none;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(149deg, #9a297a -53.31%, #0a1523 58.45%);
}

main {
    background: linear-gradient(149deg, #9a297a -53.31%, #0a1523 58.45%);
    min-height: 100vh;
    width: 100%;
    padding: 2vh;
    overflow: hidden;
}

/* .animate__animated {
    animation-duration: 1s !important;
} */

.animate__fadeIn {
    animation-duration: 0.5s !important;
}

.animate__delay-01s {
    animation-delay: 0.1s !important;
}

.animate__delay-02s {
    animation-delay: 0.2s !important;
}

.animate__delay-03s {
    animation-delay: 0.3s !important;
}

.animate__delay-04s {
    animation-delay: 0.4s !important;
}

.animate__delay-05s {
    animation-delay: 0.5s !important;
}

.disabled {
    opacity: 0.4;
    cursor: none !important;
    pointer-events: none !important;
}

.hidden {
    display: none !important;
}

.lc { 
    text-transform: lowercase;
}

.uc { 
    text-transform: uppercase;
}

/* Firefox */
.scroll-hidden {
  overflow: auto;              /* or overflow-y: scroll */
  -ms-overflow-style: none;    /* IE/old Edge */
}

/* Chrome, Safari */
.scroll-hidden::-webkit-scrollbar {
  display: none;               /* hides but still scrolls */
}

.menu-separator {
    width: 90%;
    height: 2px;
    background-color: white;
    opacity: 0.25;
    margin: 10px auto;
}

/* ------------------------------------------------------------------------------- DROPDOWN OPTIONS */

/* options inside the dropdown */
select option {
  background:#1d1a3b;   /* dropdown row background */
  color:#fff;           /* text color */
}

/* disabled state */
select:disabled {
  opacity:.5;
  cursor:not-allowed;
}

/* hide the old arrow in IE/Edge Legacy (optional) */
select::-ms-expand { display:none; }

/* ------------------------------------------------------------------------------- COMPONENTS */

/* ------SMALL BUTTON------ */
.small-button {
    z-index: 99;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: #000;
    color: white;
    border: 1px solid white;
    font-family: "Orbitron", serif !important;
    font-size: 16px;
    transition: all 0.5s cubic-bezier(.215, .61, .355, 1);
}

.small-button span {
    font-size: 35px;
    margin: 0 !important;
    padding: 0 !important;
    margin-top: -9px !important;
}

.small-button:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.small-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* ------TOOLTIP------ */
.tooltip {
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%);
    background-color: black;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent black;
}

/* ------------------------------------------------------------------------------- PASSWORDS*/

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 60%;
    right: 8px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    padding: 10px;
}

.toggle-password img{
    width: 25px;
}


/* ------------------------------------------------------------------------------- TOGGLE VISTA*/
.view-toggle-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: transparent;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.view-toggle-btn:hover {
    background-color: #f0f0f0;
    border-color: white;
    color: black;
}

.view-toggle-btn.active {
    background: linear-gradient(139deg, #20204a 12.3%, #5C3973 43.9%, #20204a 76.5%);
    color: white;
}

.view-toggle-btn svg {
    transition: transform 0.2s ease;
}

.view-toggle-btn:hover svg {
    transform: scale(1.1);
}


/* ===== CONTAINER VISTE ===== */
.view-container {
    display: none;
}

.view-container.active {
    display: block;
}

/* ===== VISTA CARDS CLIENTI ===== */
.customers-cards-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.customer-card {
    background: linear-gradient(139deg, #20204a 12.3%, #5C3973 43.9%, #20204a 76.5%);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, background-position 0.6s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 320px;
    max-width: 400px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    background-position: 0% 50%;
}

/* ===== EFFETTI CARDS ===== */

.customer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(154, 41, 122, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    background-position: 100% 50%;
    background: linear-gradient(139deg, #2a2a5a 12.3%, #7d4a94 43.9%, #2a2a5a 76.5%);
}

.customer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.customer-card:hover::before {
    opacity: 1;
    animation: rotate 3s linear infinite;
}

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

/* ===== ALTRI ELEMENTI CARDS ===== */

.customer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 0px solid rgba(255, 255, 255, 0.2);
}

.customer-card-header h3 {
    font-size: 20px;
    font-family: "Orbitron", serif !important;
    text-transform: uppercase;
    color: white;
    margin: 0;
    letter-spacing: 1px;
    font-weight: 400;
}

.customer-card-info {
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.customer-card-info p {
    margin: 6px 0;
    color: white;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.customer-card-info strong {
    color: white;
    font-weight: 600;
}

.customer-instances-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* padding-top: 16px; */
}

.customer-instances-list h4 {
    font-size: 14px;
    color: white;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instance-item {
    background-color: rgba(184, 184, 184, 0.461);
    padding: 10px 15px;
    transition: all 0.2s ease;
}

.instance-item-title {
    font-weight: 600;
    color: white;
    font-size: 12px;
}

.instance-item-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.instance-item-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.instance-item-details strong {
    color: white;
}

.instance-status-badge {
    margin-top: 10px;
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.instance-status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.instance-status-paused {
    background-color: #fef3c7;
    color: #92400e;
}

.instance-status-expired {
    background-color: #fee2e2;
    color: #991b1b;
}

.instance-status-disabled {
    background-color: #e5e7eb;
    color: #374151;
}

.instance-status-inactive {
    background-color: #e5e7eb;
    color: #374151;
}

/* Footer della card con counter */
.customer-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    display: flex;
    justify-content: center;
}

.customer-card-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    background-color: black;
    color: white;
}

/* Loading state */
.loading-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: white;
    font-size: 16px;
}

/* Empty state */
.empty-cards-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.empty-cards-state h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: white;
}

.empty-cards-state p {
    color: rgba(255, 255, 255, 0.8);
}

/* TOGGLE LOCK-UNLOCK DATA */


.unlock-dates-box {
    margin: 15px 0;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 0;
}

.unlock-dates-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.unlock-icon {
    color: #fff;
    flex-shrink: 0;
}

.unlock-text {
    flex: 1;
}

.unlock-text strong {
    display: block;
    color: #fff;
    font-size: 13px;
    margin-bottom: 2px;
}

.unlock-text p {
    margin: 0;
    color: #fff;
    font-size: 12px;
    opacity: 0.8;
}

/* Toggle nero */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #00000089;
    transition: 0.2s;
    border-radius: 0;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.2s;
    border-radius: 0;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #000;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.unlock-dates-box.active {
    border-color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .customers-cards-grid {
        flex-direction: column;
    }

    .customer-card {
        min-width: 100%;
        max-width: 100%;
    }

    .view-toggle-wrapper {
        justify-content: center;
    }

    .customer-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}