/* BESQUARE Theme - Be2Sign Backend */
/* Colori aziendali BESQUARE */
:root {
    --besquare-red: #E30613;
    --besquare-red-dark: #B30510;
    --besquare-red-light: #FF1724;
    --besquare-gray: #333333;
    --besquare-gray-dark: #2E2E2E;
    --besquare-gray-light: #666666;
    --besquare-bg: #F5F5F5;
    --besquare-white: #FFFFFF;
    --text-dark: #2E2E2E;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #E30613;
}

/* Font sizing ottimizzato per iPad */
html {
    font-size: 18px; /* Base font size aumentata per iPad */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--besquare-bg);
}

/* Headings ottimizzati per iPad */
h1 { font-size: 2.5rem; font-weight: 700; color: var(--besquare-gray-dark); margin-bottom: 1.5rem; }
h2 { font-size: 2rem; font-weight: 600; color: var(--besquare-gray-dark); margin-bottom: 1.25rem; }
h3 { font-size: 1.75rem; font-weight: 600; color: var(--besquare-gray); margin-bottom: 1rem; }
h4 { font-size: 1.5rem; font-weight: 600; color: var(--besquare-gray); margin-bottom: 0.875rem; }
h5 { font-size: 1.25rem; font-weight: 600; color: var(--besquare-gray); margin-bottom: 0.75rem; }
h6 { font-size: 1.1rem; font-weight: 600; color: var(--besquare-gray); margin-bottom: 0.5rem; }

/* Buttons BESQUARE Style */
.btn {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    min-height: 48px; /* Touch-friendly per iPad */
}

.btn-primary {
    background-color: var(--besquare-red);
    color: var(--besquare-white);
    box-shadow: 0 4px 6px rgba(227, 6, 19, 0.2);
}

.btn-primary:hover {
    background-color: var(--besquare-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(227, 6, 19, 0.3);
}

.btn-primary:active {
    background-color: var(--besquare-red-dark);
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--besquare-gray);
    color: var(--besquare-white);
}

.btn-secondary:hover {
    background-color: var(--besquare-gray-dark);
}

.btn-outline-primary {
    border: 2px solid var(--besquare-red);
    color: var(--besquare-red);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--besquare-red);
    color: var(--besquare-white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--besquare-white);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--besquare-white);
}

/* Navigation Bar */
.navbar {
    background-color: var(--besquare-gray-dark) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    min-height: 70px;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--besquare-white) !important;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand img {
    height: 45px;
    width: auto;
}

.nav-link {
    font-size: 1.1rem;
    color: var(--besquare-white) !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: var(--besquare-red);
    color: var(--besquare-white) !important;
}

.nav-link.active {
    background-color: var(--besquare-red) !important;
    color: var(--besquare-white) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    background-color: var(--besquare-white);
}

.card-header {
    background-color: var(--besquare-red);
    color: var(--besquare-white);
    font-size: 1.3rem;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--besquare-gray-dark);
    margin-bottom: 1rem;
}

/* Forms ottimizzati per iPad */
.form-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--besquare-gray);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    font-size: 1.1rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    min-height: 50px; /* Touch-friendly */
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--besquare-red);
    box-shadow: 0 0 0 0.25rem rgba(227, 6, 19, 0.15);
    outline: none;
}

.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--besquare-red);
    border-color: var(--besquare-red);
}

.form-check-label {
    font-size: 1.1rem;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Tables */
.table {
    font-size: 1.05rem;
}

.table thead th {
    background-color: var(--besquare-gray-dark);
    color: var(--besquare-white);
    font-weight: 600;
    padding: 1rem;
    border: none;
    font-size: 1.1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 1.05rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(227, 6, 19, 0.03);
}

.table-hover tbody tr:hover {
    background-color: rgba(227, 6, 19, 0.08);
}

/* Alerts */
.alert {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
}

.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
}

/* Badges */
.badge {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--besquare-red);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--besquare-gray-dark) 0%, var(--besquare-gray) 100%);
    padding: 2rem;
}

.login-card {
    background-color: var(--besquare-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
}

.login-logo {
    max-width: 280px;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
}

.login-title {
    font-size: 2rem;
    color: var(--besquare-gray-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
}

/* Sidebar Navigation */
.sidebar {
    background-color: var(--besquare-gray-dark);
    min-height: 100vh;
    padding: 1.5rem 0;
}

.sidebar .nav-item {
    margin-bottom: 0.5rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar .nav-link:hover {
    background-color: rgba(227, 6, 19, 0.1);
    color: var(--besquare-white);
    border-left-color: var(--besquare-red);
}

.sidebar .nav-link.active {
    background-color: var(--besquare-red);
    color: var(--besquare-white);
    border-left-color: var(--besquare-red-light);
}

.sidebar .nav-link i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

/* Syncfusion Components Theme */
.e-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.e-card .e-card-header {
    background-color: var(--besquare-red);
    color: var(--besquare-white);
    font-size: 1.3rem;
    padding: 1.25rem;
}

.e-btn.e-primary {
    background-color: var(--besquare-red);
    border-color: var(--besquare-red);
    font-size: 1.1rem;
    min-height: 48px;
}

.e-btn.e-primary:hover {
    background-color: var(--besquare-red-dark);
    border-color: var(--besquare-red-dark);
}

.e-grid .e-headercell {
    background-color: var(--besquare-gray-dark);
    color: var(--besquare-white);
    font-size: 1.1rem;
    font-weight: 600;
}

.e-grid .e-rowcell {
    font-size: 1.05rem;
    padding: 1rem;
}

/* Responsive per iPad */
@media (max-width: 1024px) {
    html {
        font-size: 20px;
    }
    
    .btn {
        min-height: 52px;
        font-size: 1.15rem;
    }
    
    .form-control,
    .form-select {
        min-height: 54px;
        font-size: 1.15rem;
    }
    
    .navbar-brand {
        font-size: 1.85rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 18px;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* Utilities */
.text-besquare-red {
    color: var(--besquare-red) !important;
}

.bg-besquare-red {
    background-color: var(--besquare-red) !important;
}

.text-besquare-gray {
    color: var(--besquare-gray) !important;
}

.bg-besquare-gray {
    background-color: var(--besquare-gray) !important;
}

/* Spacing utilities per iPad */
.p-ipad {
    padding: 1.5rem !important;
}

.m-ipad {
    margin: 1.5rem !important;
}

.mt-ipad {
    margin-top: 1.5rem !important;
}

.mb-ipad {
    margin-bottom: 1.5rem !important;
}

/* Touch-friendly interactive elements */
a, button, .clickable {
    min-height: 44px; /* iOS/iPad touch target recommendation */
    display: inline-flex;
    align-items: center;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--besquare-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--besquare-gray-light);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--besquare-red);
}

/* Loading spinner BESQUARE style */
.spinner-besquare {
    border: 4px solid var(--besquare-bg);
    border-top: 4px solid var(--besquare-red);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

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




