/* pages/login.css - estratto verbatim dal <style> inline di login.html.
   Componenti condivisi anche in oth-components.css (bridge); dedup dopo. */

body {
    background: var(--ds-color-bg-soft);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-container {
    width: 100%;
    max-width: 500px;
    background: var(--ds-color-bg);
    box-shadow: var(--ds-shadow-3, 0 6px 18px rgba(0,0,0,0.07));
    border-radius: var(--ds-radius-lg);
    padding: 3rem 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.oth-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.alert-message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #fee;
    border-left: 3px solid #b3261e;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border-left: 3px solid #1f7a3f;
    color: #155724;
}

.alert-info {
    background: #f0f0f1;
    border-left: 3px solid #1a1a1a;
    color: #1a1a1a;
}

.login-form {
    margin-bottom: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    border: 1.5px solid var(--ds-color-border);
    border-radius: var(--ds-radius);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--ds-color-bg-soft);
}

.form-control:focus {
    outline: none;
    border-color: #000;
    background: #fff;
}

.toggle-password {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
}

.toggle-password:hover {
    color: #000;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--ds-color-accent);
    border: none;
    border-radius: var(--ds-radius);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-login:hover {
    background: var(--ds-color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ldap-info {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ldap-info-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldap-info-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.ldap-info-text code {
    background: #e9ecef;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.user-list-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.user-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.user-list-header:hover {
    background: #e9ecef;
}

.list-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-count {
    background: #000;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.toggle-icon {
    color: #666;
    transition: transform 0.3s;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.user-list-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.user-list-content.expanded {
    max-height: 350px;
    overflow-y: auto;
}

.user-list {
    display: grid;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
}

.user-item:hover {
    border-color: #000;
    background: #f8f9fa;
    transform: translateX(3px);
}

.user-item.no-click {
    cursor: default;
}

.user-item.no-click:hover {
    border-color: #e0e0e0;
    background: #fff;
    transform: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #d0d0d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
}

.user-meta {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

.login-arrow {
    color: #999;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.user-item:hover .login-arrow {
    opacity: 1;
}

.user-item.no-click .login-arrow {
    display: none;
}

.user-list-content::-webkit-scrollbar {
    width: 6px;
}

.user-list-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.user-list-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.dev-note {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: #fff3cd;
    border-left: 3px solid #946400;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #856404;
}

@media (max-width: 576px) {
    .login-container {
        padding: 2rem 1.5rem;
    }
    .login-title {
        font-size: 1.5rem;
    }
}
