/* ==========================================================================
   DOMINIMANAGER - MODERN SAAS & VAULT UI DESIGN SYSTEM
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --indigo-color: #4f46e5;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --card-radius: 14px;
    --btn-radius: 8px;

    /* Colori Semaforo RISERVATI ESCLUSIVAMENTE ALLE SCADENZE (Giorni mancanti) */
    --exp-green: #10b981;
    --exp-orange: #f59e0b;
    --exp-red: #ef4444;
}

body {
    background-color: var(--slate-100) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--slate-900);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

.font-monospace, code {
    font-family: 'JetBrains Mono', SFMono-Regular, Consolas, monospace !important;
}

/* ==========================================================================
   NAVBAR MODERNA (Dark Slate Enterprise)
   ========================================================================== */
.navbar.bg-primary {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.18) !important;
}

.navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.18rem;
    letter-spacing: -0.025em;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar .navbar-brand .brand-ios-icon {
    width: 32px;
    height: 32px;
    border-radius: 7.5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
    display: block;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar .navbar-brand:hover .brand-ios-icon {
    transform: scale(1.06);
}

.ios-app-icon-hero {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.45), 0 4px 10px rgba(15, 23, 42, 0.2);
    display: inline-block;
}

.navbar .navbar-brand i {
    color: #38bdf8;
    font-size: 1.25rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.18s ease;
}

.navbar .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(56, 189, 248, 0.16);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.3);
}

/* Bottone "+ NUOVO" nella Navbar (Blu/Indaco brillante, non giallo) */
.nav-btn-new {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.02em;
    border-radius: 8px !important;
    padding: 0.45rem 1rem !important;
    margin-right: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35) !important;
    transition: all 0.2s ease !important;
}

.nav-btn-new:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5) !important;
}

/* Profilo Utente in Navbar */
.navbar .dropdown.bg-primary {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px !important;
}

.navbar .dropdown-menu {
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
    padding: 0.4rem;
}

.navbar .dropdown-item {
    border-radius: 7px;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
}

/* ==========================================================================
   CARDS, MODALS & CONTAINERS
   ========================================================================== */
.card {
    border: 1px solid var(--slate-200);
    border-radius: var(--card-radius);
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 4px 12px rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-header {
    border-top-left-radius: calc(var(--card-radius) - 1px) !important;
    border-top-right-radius: calc(var(--card-radius) - 1px) !important;
    border-bottom: 1px solid var(--slate-200);
    font-weight: 600;
}

.modal-content {
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25);
}

/* Form Controls */
.form-control, .form-select {
    border-color: #cbd5e1;
    border-radius: 8px;
    padding: 0.52rem 0.85rem;
    font-size: 0.92rem;
    color: var(--slate-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.input-group-text {
    border-color: #cbd5e1;
    border-radius: 8px;
    background-color: var(--slate-50);
}

.btn {
    border-radius: var(--btn-radius);
    font-weight: 500;
    transition: all 0.16s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* ==========================================================================
   TABELLE & LISTE MODERNE
   ========================================================================== */
.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table > thead > tr > th {
    background-color: var(--slate-50);
    color: var(--slate-600);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--slate-200);
    padding: 0.85rem 0.75rem;
}

.table > tbody > tr > td {
    padding: 0.78rem 0.75rem;
    border-bottom-color: #f1f5f9;
    font-size: 0.9rem;
}

.table-hover > tbody > tr:hover > * {
    background-color: #f8fafc;
}

/* ==========================================================================
   INDICATORI SCADENZE & CERCHI PERFETTI (MAI OVALI)
   ========================================================================== */
.rounded-circle, .kpi-icon-circle {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    aspect-ratio: 1 / 1;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.status-dot {
    height: 11px !important;
    width: 11px !important;
    min-width: 11px !important;
    min-height: 11px !important;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    display: inline-block !important;
    vertical-align: middle;
    flex-shrink: 0;
    margin-right: 6px;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}
.status-ok { background-color: var(--exp-green) !important; }
.status-warning { background-color: var(--exp-orange) !important; }
.status-danger { background-color: var(--exp-red) !important; }
.status-archived { background-color: var(--slate-500) !important; }

.days-count { font-weight: 700; font-size: 0.95rem; }
.domain-name { font-weight: 700; color: var(--slate-900); text-decoration: none; }
.domain-name:hover { color: var(--primary-color); }

/* ==========================================================================
   PALETTE BADGE NON-SCADENZA (Indigo, Teal, Purple, Slate, Blue)
   ========================================================================== */
.badge-purple { background-color: #7c3aed !important; color: #fff !important; }
.badge-indigo { background-color: #4f46e5 !important; color: #fff !important; }
.badge-teal { background-color: #0891b2 !important; color: #fff !important; }
.badge-slate { background-color: #475569 !important; color: #fff !important; }
.badge-darkblue { background-color: #1e40af !important; color: #fff !important; }

.badge-service {
    font-size: 0.72rem;
    padding: 0.32em 0.6em;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.01em;
    white-space: nowrap !important;
}

/* Impedisce a qualsiasi pillola o badge di andare a capo su 2 righe diventando tondo */
.rounded-pill, .badge {
    white-space: nowrap !important;
    flex-shrink: 0;
}

.btn.rounded-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
    padding: 3px 10px !important;
}

.btn-cred-counter {
    position: relative;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* ==========================================================================
   PROVIDER PILL STANDARDIZZATA & SCHEDA HOSTING LOGO STUDIO
   ========================================================================== */
.provider-pill {
    width: 98px;
    height: 30px;
    min-width: 98px;
    min-height: 30px;
    padding: 3px 8px !important;
    border-color: var(--slate-200) !important;
    background-color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.provider-pill img {
    width: 100% !important;
    height: 100% !important;
    max-width: 82px !important;
    max-height: 22px !important;
    object-fit: contain !important;
    display: block !important;
}

.provider-pill:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.07) !important;
}

/* Workspace Ritaglio Proporzionato (Cropper 3.5:1) */
.logo-cropper-workspace {
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background-color: #f8fafc;
    overflow: hidden;
}

.logo-cropper-canvas-wrap {
    width: 100%;
    height: 210px;
    background-color: #e2e8f0;
    background-image: linear-gradient(45deg, #cbd5e1 25%, transparent 25%),
                      linear-gradient(-45deg, #cbd5e1 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #cbd5e1 75%),
                      linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    position: relative;
}

.logo-cropper-canvas-wrap img {
    display: block;
    max-width: 100%;
}

/* Card Hosting nella pagina Impostazioni */
.provider-item-card {
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #ffffff;
    transition: all 0.18s ease;
}

.provider-item-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.07);
    transform: translateY(-1px);
}

.provider-logo-box {
    width: 115px;
    height: 44px;
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    flex-shrink: 0;
}

.provider-logo-box img {
    max-width: 95px;
    max-height: 28px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Dropzone Interattiva per Upload / Drag & Drop / Incolla Logo */
.logo-dropzone {
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    background-color: var(--slate-50);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.logo-dropzone:hover, .logo-dropzone.dragover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

/* Galleria 1-Click Loghi Ufficiali */
.logo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
    max-height: 185px;
    overflow-y: auto;
    padding: 4px;
}

.logo-gallery-item {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: #ffffff;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 54px;
}

.logo-gallery-item:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
    transform: translateY(-1px);
}

.logo-gallery-item.selected {
    border: 2px solid var(--primary-color);
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.logo-gallery-item img {
    max-height: 20px;
    max-width: 82px;
    object-fit: contain;
}

/* Navigation Tabs Moderne */
.nav-tabs-modern {
    border-bottom: 1px solid var(--slate-200);
    gap: 0.5rem;
}

.nav-tabs-modern .nav-link {
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    color: var(--slate-600);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.15s ease;
}

.nav-tabs-modern .nav-link:hover {
    color: var(--slate-900);
    background-color: rgba(255, 255, 255, 0.6);
}

.nav-tabs-modern .nav-link.active {
    color: var(--primary-color);
    background-color: #ffffff;
    border-color: var(--slate-200) var(--slate-200) #ffffff;
    box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.03);
}

/* Checkbox List Box */
.checkbox-list-box {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    padding: 0.65rem;
    background: #fff;
}

/* ==========================================================================
   HERO SEARCH BAR (RICERCA PRINCIPALE SUBITO INDIVIDUABILE)
   ========================================================================== */
.hero-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 14px;
    padding: 6px 10px 6px 8px;
    box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.14), 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.hero-search-wrapper:focus-within {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 10px 28px -4px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.hero-search-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    margin-right: 12px;
    flex-shrink: 0;
}

.hero-search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 1.06rem !important;
    font-weight: 500 !important;
    color: var(--slate-900) !important;
    padding: 0.45rem 0.25rem !important;
    width: 100%;
}

.hero-search-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.hero-search-kbd {
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    color: var(--slate-600);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.74rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.hero-search-clear {
    border: none;
    background: var(--slate-100);
    color: var(--slate-600);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 6px;
    transition: all 0.15s ease;
}

.hero-search-clear:hover {
    background: #e2e8f0;
    color: var(--slate-900);
}

/* Helper for hiding columns via JS */
.col-hidden { display: none !important; }

/* CONTAINER FLUID PER NAVBAR */
.navbar .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* PRINT STYLES */
@media print {
    .no-print, .navbar, .btn, .modal, form, .card-header {
        display: none !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    .table {
        font-size: 11px;
        width: 100%;
        color: #000;
    }
    a { text-decoration: none; color: black !important; }
    th, td { display: table-cell !important; }
    .badge { border: 1px solid #000; color: #000 !important; font-weight: normal; }
}
/* END OF STYLE.CSS */
