/**
 * ZETA Werkplek Whitelist - inloggen.werkplek.it
 * Standalone ZETA huisstijl
 */

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
    --brand-primary: #3a648b;
    --brand-secondary: #d68e2a;
    --brand-dark: #1a3143;
    --brand-danger: #D9252E;
    --brand-warning: #F6BB42;
    --brand-success: #28a745;
    --text-primary: #373a3c;
    --text-muted: #6c757d;
    --border-color: #EBECF0;
    --bg-light: #f8f9fa;
    --radius: 0.43rem;
    --radius-lg: 0.75rem;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.2);
    --font-family: "Rubik", Arial, sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BACKGROUND PATTERN
   ============================================ */

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(255,255,255,0.08) 0%, transparent 25%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,0.08) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(214,142,42,0.03) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.main-container {
    width: 100%;
    max-width: 460px;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.main-container.wide {
    max-width: 700px;
}

/* ============================================
   LOGO
   ============================================ */

.logo-container {
    text-align: center;
    margin-bottom: 28px;
}

.logo-container img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

/* ============================================
   CARD
   ============================================ */

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(235, 236, 240, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--brand-primary), var(--brand-secondary));
    z-index: 1;
}

.card-body {
    padding: 32px;
}

.card-title {
    color: var(--brand-primary);
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ============================================
   STEPS INDICATOR
   ============================================ */

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 0 10px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
    color: var(--text-muted);
    white-space: nowrap;
}

.step.active {
    color: var(--brand-secondary);
    font-weight: 600;
}

.step.completed {
    color: var(--brand-success);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
    background: var(--border-color);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #c17d24 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(214, 142, 42, 0.3);
}

.step.completed .step-number {
    background: var(--brand-success);
    color: white;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    flex-shrink: 0;
}

.step-connector.active {
    background: var(--brand-secondary);
}

.step-connector.completed {
    background: var(--brand-success);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--brand-primary);
    font-weight: 500;
    font-size: 0.9em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(214, 142, 42, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-control:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #c17d24 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(214, 142, 42, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #c17d24 0%, var(--brand-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214, 142, 42, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-1px);
}

.btn-rdp {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #2a4a6b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(58, 100, 139, 0.3);
    padding: 12px 20px;
    font-size: 13px;
}

.btn-rdp:hover:not(:disabled) {
    background: linear-gradient(135deg, #2a4a6b 0%, var(--brand-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(58, 100, 139, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9em;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

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

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    color: #004085;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.success-hero {
    text-align: center;
    padding: 24px 0;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-success) 0%, #218838 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--brand-success);
    margin-bottom: 8px;
}

.success-subtitle {
    color: var(--text-muted);
    font-size: 0.9em;
}

.ip-badge {
    display: inline-block;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: "Courier New", monospace;
    font-weight: 600;
    color: var(--brand-primary);
    margin-top: 8px;
    font-size: 0.95em;
}

.ttl-badge {
    display: inline-block;
    background: rgba(214, 142, 42, 0.1);
    color: var(--brand-secondary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-top: 8px;
}

/* ============================================
   WERKPLEK CARDS
   ============================================ */

.werkplekken-section {
    margin-top: 24px;
}

.section-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.werkplek-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.werkplek-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(58, 100, 139, 0.1);
}

.werkplek-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.werkplek-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1em;
}

.werkplek-label {
    font-size: 0.8em;
    color: var(--text-muted);
}

.werkplek-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85em;
}

.werkplek-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.werkplek-detail strong {
    color: var(--text-primary);
    font-family: "Courier New", monospace;
}

.werkplek-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   RDP OPTIONS MODAL
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

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

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1em;
    color: var(--brand-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s;
    font-size: 20px;
    line-height: 1;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--brand-danger);
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ============================================
   RDP OPTIONS GRID
   ============================================ */

.rdp-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.rdp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.rdp-option:hover {
    border-color: var(--brand-primary);
    background: #f0f7ff;
}

.rdp-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.rdp-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rdp-option-text strong {
    font-size: 0.9em;
    color: var(--text-primary);
}

.rdp-option-text small {
    font-size: 0.75em;
    color: var(--text-muted);
}

/* ============================================
   ERROR STATE
   ============================================ */

.error-hero {
    text-align: center;
    padding: 24px 0;
}

.error-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-danger) 0%, #c82333 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(217, 37, 46, 0.3);
}

.error-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--brand-danger);
    margin-bottom: 8px;
}

.error-subtitle {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

/* ============================================
   EMAIL SENT STATE
   ============================================ */

.email-sent-hero {
    text-align: center;
    padding: 24px 0;
}

.email-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #2a4a6b 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(58, 100, 139, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   TURNSTILE
   ============================================ */

.turnstile-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 65px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: white;
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--brand-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--brand-primary);
}

/* ============================================
   UTILITY
   ============================================ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .main-container {
        padding: 20px 16px;
    }
    
    .card-body {
        padding: 24px 20px;
    }
    
    .logo-container img {
        height: 45px;
    }
    
    .steps {
        gap: 0;
    }
    
    .step span {
        display: none;
    }
    
    .step-connector {
        width: 24px;
    }
    
    .rdp-options-grid {
        grid-template-columns: 1fr;
    }
    
    .werkplek-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .werkplek-actions {
        flex-direction: column;
    }
    
    .werkplek-actions .btn {
        width: 100%;
    }
    
    .modal {
        max-height: 95vh;
    }
}
