* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

/* Clean Banking Login Form - Complete & Self-Contained */

/* additional reset is harmless but we already have one above */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.login-header h1 {
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.025em;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: #94a3b8;
}

/* Password Field */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 6px;
    border-radius: 4px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #6366F1;
}

.eye-closed {
    display: none;
}

.password-toggle.show-password .eye-open {
    display: none;
}

.password-toggle.show-password .eye-closed {
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
    background: #ffffff;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #6366F1;
    border-color: #6366F1;
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.forgot-link {
    color: #6366F1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #4f46e5;
}

/* Login Button */
.login-btn {
    width: 100%;
    background: #6366F1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    overflow: hidden;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-text {
    transition: opacity 0.2s ease;
}

.btn-loader {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

/* Security Notice */
.security-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 16px;
}

.security-notice span {
    color: #166534;
    font-size: 12px;
    font-weight: 500;
}

/* Error States */
.error-message {
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error input {
    border-color: #dc2626;
    background: #fef2f2;
}

.form-group.error input:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 32px 20px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.3s ease;
}

.success-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.success-icon {
    margin: 0 auto 16px;
    animation: successScale 0.5s ease-out;
}

@keyframes successScale {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-message h3 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.success-message p {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body.login-page {
        padding: 16px;
    }
    
    .login-card {
        padding: 32px 24px 24px;
        border-radius: 12px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .security-notice {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}

.mode-switch {
    text-align: center;
    font-size: 13px;
    color: #374151;
    margin-top: 12px;
}

.mode-switch a {
    color: #6366F1;
    text-decoration: none;
    font-weight: 600;
}

.mode-switch a:hover {
    text-decoration: underline;
}

/* Dashboard */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}


.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px; /* mezera mezi ikonou a textem */
}

.user-info {
    font-size: 14px;
    color: #666;
}

.user-info strong {
    color: #333;
}

.btn-secondary {
    padding: 8px 16px;
    background: #e5e5e5;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #ddd;
}

.btn-danger {
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #ee5a52;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* Sites Grid */
.sites-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.site-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.site-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.site-card-left {
    flex: 1;
    min-width: 0;
}

.site-card-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 120px;
}

.site-card-right .code-block {
    margin: 0;
    font-size: 10px;
    padding: 8px 10px;
    text-align: center;
}

.site-card-right form {
    margin: 0;
    width: 100%;
}

.site-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.site-card-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    display: block;
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.btn-info {
    background: #667eea;
}

.btn-info:hover {
    background: #5568d3;
}

.btn-delete {
    background: #ff6b6b;
}

.btn-delete:hover {
    background: #ee5a52;
}

.site-card-url {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    word-break: break-all;
    display: block;
}

.site-card-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    white-space: nowrap;
}

.stat-number {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    display: block;
}

/* Form */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Stats Page */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stats-header h1 {
    font-size: 28px;
    color: #333;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.back-link:hover {
    text-decoration: underline;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.stat-card-change {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Charts */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

canvas {
    max-height: 300px;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

.code-block {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #333;
    overflow-x: auto;
    margin: 10px 0;
}

.copy-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

.copy-btn:hover {
    background: #5568d3;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.empty-state-text {
    color: #999;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .site-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-card-right {
        align-items: flex-start;
        width: 100%;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px;
    }
}

/* Utility */
.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #e5f5e5;
    color: #2d5a2d;
}

.badge-danger {
    background: #ffe5e5;
    color: #c41e3a;
}

.badge-info {
    background: #e5f1ff;
    color: #003366;
}
/* Table Styles */
.table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.sites-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.sites-table thead {
    background: #eaeaea;
    color: #333;
    font-weight: 600;
    text-transform: none;
    border-bottom: 2px solid #ddd;
}

.sites-table thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sites-table th,
.sites-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sites-table td:last-child {
    text-align: center;
}

.sites-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.sites-table tbody tr:hover {
    background-color: #f8f9fa;
}

.sites-table tbody tr:last-child {
    border-bottom: none;
}

.sites-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.sites-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    margin: 0;
}

.site-name-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.site-name-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.site-url {
    color: #666;
    font-size: 13px;
    word-break: break-all;
}

.track-id {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.stat-value-real {
    font-weight: 600;
    color: #2ecc71;
}

.stat-value-bot {
    font-weight: 600;
    color: #e74c3c;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.btn-action {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-details {
    background: #667eea;
    color: white;
}

.btn-details:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-delete-single {
    background: #ff6b6b;
    color: white;
}

.btn-delete-single:hover {
    background: #ee5a52;
    transform: translateY(-1px);
}

.table-actions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
}

.btn-bulk-delete {
    padding: 10px 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-bulk-delete:hover:not(:disabled) {
    background: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-bulk-delete:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Table */
@media (max-width: 1024px) {
    .sites-table {
        font-size: 13px;
    }
    
    .sites-table thead th,
    .sites-table tbody td {
        padding: 12px 8px;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .btn-action {
        padding: 5px 8px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .table-wrapper {
        border-radius: 8px;
    }
    
    .sites-table {
        font-size: 12px;
    }
    
    .sites-table thead th,
    .sites-table tbody td {
        padding: 10px 6px;
    }
    
    .site-url {
        font-size: 11px;
    }
    
    .track-id {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .btn-action {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
}