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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.hidden {
    display: none !important;
}

.page {
    min-height: 100vh;
}

.login-box {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #357abd;
}

.error {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
}

header {
    background: #2c3e50;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#lang-select {
    padding: 6px 10px;
    border-radius: 4px;
    border: none;
    background: #34495e;
    color: white;
}

#stats-display {
    font-size: 14px;
    color: #bdc3c7;
}

#logout-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

nav {
    background: #34495e;
    padding: 0 30px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: white;
}

.tab-btn.active {
    color: white;
    border-bottom-color: #4a90d9;
}

main {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.toolbar {
    margin-bottom: 20px;
}

.toolbar button {
    padding: 10px 20px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.toolbar button:hover {
    background: #357abd;
}

.toolbar button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

tr:hover {
    background: #f8f9fa;
}

.status-available {
    color: #27ae60;
}

.status-unavailable {
    color: #e74c3c;
}

.status-unknown {
    color: #95a5a6;
}

.action-btn {
    padding: 6px 12px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-check {
    background: #27ae60;
    color: white;
}

.btn-models {
    background: #9b59b6;
    color: white;
}

.btn-toggle {
    background: #f39c12;
    color: white;
}

.action-btn:hover {
    opacity: 0.8;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-actions button[type="submit"],
.modal-actions button:first-child {
    background: #4a90d9;
    color: white;
}

.modal-actions button[type="button"] {
    background: #bdc3c7;
    color: #333;
}

.models-toolbar {
    margin-bottom: 15px;
}

.models-toolbar button {
    padding: 8px 16px;
    margin-right: 10px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.settings-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
}

.settings-form h3 {
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.form-group label {
    white-space: nowrap;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 150px;
}

.form-group button {
    padding: 10px 20px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.hint {
    color: #95a5a6;
    font-size: 13px;
    margin-top: 10px;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-bar button {
    padding: 8px 16px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-bar button:last-child {
    background: #95a5a6;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 10px;
}

.pagination button {
    padding: 8px 16px;
    background: #4a90d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pagination select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#last-check-info {
    margin-top: 15px;
    color: #666;
}

#log-detail-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

.log-row {
    cursor: pointer;
}

.log-row:hover {
    background: #e8f4fc;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #95a5a6;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
    }
    
    nav {
        padding: 0;
        display: flex;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 15px;
        white-space: nowrap;
    }
    
    main {
        padding: 15px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 8px 10px;
    }
}
