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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* PAGE LOGIN */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2em;
}

.login-box > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.info-box {
    margin-top: 25px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
}

.info-box code {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* PAGE DASHBOARD */
.dashboard-container {
    min-height: 100vh;
    background: #f5f5f5;
}

header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
    font-size: 1.8em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    color: #555;
    font-weight: 600;
}

.btn-logout {
    padding: 8px 20px;
    background: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #d32f2f;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

.sandbox-control {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.sandbox-control h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.6em;
}

.no-sandbox {
    text-align: center;
    padding: 60px 20px;
}

.no-sandbox p {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
    width: auto;
}

.sandbox-active {
    padding: 20px;
}

.status-badge {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.sandbox-active p {
    margin: 10px 0;
    color: #555;
    font-size: 16px;
}

.sandbox-actions {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

.btn-danger {
    padding: 12px 25px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sandbox-iframe {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.sandbox-iframe iframe {
    width: 100%;
    height: 700px;
    border: none;
}

.url-input-container {
    max-width: 700px;
    margin: 30px auto;
}

.url-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: #667eea;
}

.sandbox-active code {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #d63384;
}

.timer-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.timer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.timer-label {
    font-size: 18px;
    font-weight: 600;
    color: #555;
}

.timer-value {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    font-family: monospace;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 1s linear;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f44336 0%, #e91e63 100%);
}

.warning-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: left;
}

.history-section {
    margin-top: 40px;
    text-align: left;
}

.history-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.history-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: white;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.history-url {
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-date {
    color: #666;
    font-size: 14px;
    margin-left: 15px;
}

.no-history, .loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.flag-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.flag-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.flag-section p {
    color: #666;
    margin-bottom: 20px;
}

.flag-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-benign {
    flex: 1;
    padding: 15px 25px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-benign:hover {
    background: #388e3c;
}

.btn-malicious {
    flex: 1;
    padding: 15px 25px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-malicious:hover {
    background: #f57c00;
}

.badge-malicious {
    display: inline-block;
    background: #ffebee;
    color: #d32f2f;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 10px;
}

.badge-benign {
    display: inline-block;
    background: #e8f5e9;
    color: #388e3c;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 10px;
}

.badge-unknown {
    display: inline-block;
    background: #e0e0e0;
    color: #666;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.history-info {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.history-info small {
    color: #999;
    font-size: 12px;
    width: 100%;
    margin-top: 5px;
}

/* Navigation principale */
.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 8px 20px;
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #e0e0e0;
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Page de redirection */
.subtitle {
    color: #666;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 30px;
}

.result-container {
    margin-top: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

.result-header {
    margin-bottom: 30px;
}

.result-header h3 {
    color: #333;
    margin-bottom: 15px;
}

.result-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    color: #666;
}

.stat-item strong {
    color: #667eea;
    font-size: 20px;
    margin-right: 5px;
}

.redirect-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.redirect-step {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    align-items: center;
}

.redirect-step.redirect {
    border-left: 5px solid #ff9800;
}

.redirect-step.final {
    border-left: 5px solid #4caf50;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-url {
    margin-bottom: 8px;
}

.step-url a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    font-weight: 500;
}

.step-url a:hover {
    text-decoration: underline;
}

.step-status {
    display: flex;
    gap: 10px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.status-2xx {
    background: #e8f5e9;
    color: #388e3c;
}

.status-3xx {
    background: #fff3e0;
    color: #f57c00;
}

.status-4xx {
    background: #ffebee;
    color: #d32f2f;
}

.status-5xx {
    background: #fce4ec;
    color: #c2185b;
}

.redirect-arrow {
    margin: 10px 0;
    text-align: center;
}

/* Scans externes */
.external-scans {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.external-scans h3 {
    color: #333;
    margin-bottom: 20px;
}

.scan-result {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #667eea;
}

.scan-result.disabled {
    opacity: 0.6;
    border-left-color: #ccc;
}

.scan-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.scan-content {
    margin-top: 10px;
}

.scan-warning {
    background: #ffebee;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 600;
}

.scan-ok {
    background: #e8f5e9;
    color: #388e3c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 600;
}

.scan-pending {
    background: #fff3e0;
    color: #f57c00;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.scan-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.scan-link {
    display: inline-block;
    margin-top: 10px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.scan-link:hover {
    text-decoration: underline;
}

.scan-error {
    color: #999;
    font-style: italic;
}

.btn-refresh {
    padding: 6px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    margin-left: auto;
}

.btn-refresh:hover {
    background: #5568d3;
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scan-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}




















/* Defang Tool */
.defang-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.defang-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.defang-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.defang-textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background: white;
}

.defang-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.defang-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 12px 25px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #388e3c;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-clear {
    padding: 12px 25px;
    background: #757575;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-clear:hover {
    background: #616161;
}

.defang-actions {
    margin-top: 15px;
}

.btn-copy {
    padding: 12px 25px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: #1976d2;
}

.defang-examples {
    margin-top: 15px;
}


@media (max-width: 768px) {
    .defang-container {
        grid-template-columns: 1fr;
    }
}





/* Page Settings */
.settings-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.settings-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.sandboxes-table {
    overflow-x: auto;
}

.sandboxes-table table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border-collapse: collapse;
}

.sandboxes-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.sandboxes-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.sandboxes-table tr:last-child td {
    border-bottom: none;
}

.sandboxes-table tr.highlight-mine {
    background: #e8f5e9;
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.text-warning {
    color: #f57c00;
    font-weight: 600;
}

.btn-destroy-small {
    padding: 6px 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-destroy-small:hover {
    background: #d32f2f;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-running {
    background: #e8f5e9;
    color: #388e3c;
}

.status-exited {
    background: #ffebee;
    color: #d32f2f;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.settings-actions {
    text-align: center;
    margin-top: 30px;
}