/* ===================================
   Minimal Login Page Styles
   =================================== */

/* Body - sfondo neutro */
body {
    min-height: 100vh;
}

/* Container principale */
.login-container {
    padding: 20px;
    position: relative;
    min-width: 0;
    max-height: 95vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    box-sizing: border-box;
}

/* Wrapper */
.login-wrapper {
    width: 100%;
    flex: 0 0 auto;
}

/* Card principale - minimal */
.modern-login-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

/* Header - minimal */
.login-header {
    background: #ffffff;
    padding: 20px 30px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #e1e4e8;
}

.lock-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f5f7fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.lock-icon {
    width: 24px;
    height: 24px;
    stroke: #24292e;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #24292e;
}

.login-subtitle {
    font-size: 14px;
    margin: 0;
    color: #586069;
    font-weight: 400;
}

/* Tool icons in header */
.header-tools {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f5f7fa;
    border: 1px solid #e1e4e8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #24292e;
    text-decoration: none;
}

.tool-icon svg {
    width: 16px;
    height: 16px;
    stroke: #586069;
}

.tool-icon:hover {
    background: #ffffff;
    border-color: #d1d5da;
}

/* Body del form */
.login-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Error/Success message container */
.login_result {
    min-height: 0;
}

.login_result .error {
    background: #fff5f5;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #feb2b2;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: none;
}

.login_result .error:not(:empty) {
    display: block;
}

/* Forza hide se contiene solo whitespace */
.login_result:has(.error:empty) {
    display: none;
}

.login_result .success {
    background: #f0f9ff;
    color: #0c4a6e;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: none;
}

.login_result .success:not(:empty) {
    display: block;
}

/* Modern Form */
.modern-form {
    width: 100%;
}

.form-field {
    margin-bottom: 10px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 8px;
}

.field-icon {
    width: 16px;
    height: 16px;
    stroke: #586069;
}

.field-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #24292e;
}

.field-input:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.field-input::placeholder {
    color: #959da5;
}

/* Select styling */
select.field-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23586069' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

/* Submit button - minimal */
.btn-submit {
    width: 100%;
    padding: 12px 20px;
    background: #24292e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.btn-submit:hover {
    background: #1b1f23;
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.btn-submit:hover .btn-icon {
    transform: translateX(3px);
}

/* Success login section */
.nv_successfulLogin {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.divMessageInputID {
    background: #f0f9ff;
    color: #0c4a6e;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: center;
}

/* Footer */
.login-footer {
    background: #f5f7fa;
    padding: 16px 24px;
    border-top: 1px solid #e1e4e8;
    flex-shrink: 0;
}

.quote-wrapper {
    text-align: center;
    font-size: 12px;
    color: #586069;
    font-style: italic;
    line-height: 1.5;
}

/* Extra Info Panel - Minimal Style */
#extraInfo {
    min-width: 0;
    max-height: 95vh;
}

#extraInfo .panel {
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

#extraInfo .panel-heading {
    background: #ffffff;
    color: #24292e;
    padding: 16px 20px;
    border-bottom: 1px solid #e1e4e8;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

#extraInfo .panel-heading .glyphicon {
    margin-right: 8px;
    font-size: 16px;
    color: #586069;
}

#extraInfo .panel-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

#extraInfo .nav-tabs {
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 16px;
}

#extraInfo .nav-tabs > li > a {
    border: none;
    border-radius: 0;
    color: #586069;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

#extraInfo .nav-tabs > li > a:hover {
    background: #f5f7fa;
    color: #24292e;
}

#extraInfo .nav-tabs > li.active > a,
#extraInfo .nav-tabs > li.active > a:hover,
#extraInfo .nav-tabs > li.active > a:focus {
    color: #24292e;
    background: white;
    border: none;
    border-bottom: 2px solid #24292e;
}

#extraInfo .tab-content {
    padding: 16px 0;
}

/* Booking Panel - Minimal Style */
#panel-booking {
    margin-top: 20px;
}

#panel-booking .panel {
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#panel-booking .panel-heading {
    background: #ffffff;
    color: #24292e;
    padding: 16px 20px;
    border-bottom: 1px solid #e1e4e8;
    font-size: 16px;
    font-weight: 600;
}

#panel-booking .panel-heading .glyphicon {
    margin-right: 8px;
    font-size: 16px;
    color: #586069;
}

#panel-booking .panel-body {
    padding: 20px;
}

#panel-booking .table {
    border-radius: 6px;
    overflow: hidden;
}

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

/* Layout adjustments */
#panel-login {
    flex: 0 0 auto;
    width: 100%;
    max-width: 460px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

#panel-login .login-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#panel-login .modern-login-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#extraInfo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#extraInfo .panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#panel-booking.col-md-12 {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 10px;
}

/* Mobile layout adjustments */
.login-container.mobile-layout {
    flex-direction: column;
}

.login-container.mobile-layout #panel-login,
.login-container.mobile-layout #extraInfo {
    max-width: 100%;
}

/* Responsive */
@media (max-width: 1200px) {
    .login-container {
        flex-direction: column;
        align-items: stretch;
    }

    #panel-login,
    #extraInfo {
        max-width: 100%;
        width: 100%;
    }
}@media (max-width: 768px) {
    .login-container {
        padding: 20px 15px;
    }

    .modern-login-card {
        border-radius: 6px;
    }

    .login-header {
        padding: 10px 20px 16px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-body {
        padding: 10px;
    }

    .header-tools {
        top: 12px;
        right: 12px;
    }

    .tool-icon {
        width: 28px;
        height: 28px;
    }
}

/* Loading state */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn-submit.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Focus visible for accessibility */
.field-input:focus-visible,
.btn-submit:focus-visible,
.tool-icon:focus-visible {
    outline: 2px solid #0366d6;
    outline-offset: 2px;
}

/* DataTables styling compatibility */
#extraInfo .dataTables_wrapper,
#panel-booking .dataTables_wrapper {
    padding: 0;
}

#extraInfo .dataTables_wrapper .dataTables_filter input,
#panel-booking .dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d1d5da;
    border-radius: 6px;
    padding: 6px 10px;
    transition: all 0.2s ease;
    font-size: 13px;
}

#extraInfo .dataTables_wrapper .dataTables_filter input:focus,
#panel-booking .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

/* Button styling in extraInfo */
#extraInfo .btn,
#panel-booking .btn {
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

#extraInfo .btn-primary,
#panel-booking .btn-primary {
    background: #24292e;
    border: 1px solid #24292e;
}

#extraInfo .btn-primary:hover,
#panel-booking .btn-primary:hover {
    background: #1b1f23;
    border-color: #1b1f23;
}

/* Scrollbar styling - minimal */
#extraInfo .panel-body::-webkit-scrollbar,
#panel-booking .panel-body::-webkit-scrollbar {
    width: 6px;
}

#extraInfo .panel-body::-webkit-scrollbar-track,
#panel-booking .panel-body::-webkit-scrollbar-track {
    background: #f5f7fa;
}

#extraInfo .panel-body::-webkit-scrollbar-thumb,
#panel-booking .panel-body::-webkit-scrollbar-thumb {
    background: #d1d5da;
    border-radius: 3px;
}

#extraInfo .panel-body::-webkit-scrollbar-thumb:hover,
#panel-booking .panel-body::-webkit-scrollbar-thumb:hover {
    background: #959da5;
}
