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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}

.hidden {
    display: none !important;
}

.card {
    background: #16213e;
    border-radius: 12px;
    padding: 40px;
    width: 440px;
    max-width: 95vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

h1 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.subtitle {
    color: #8892b0;
    font-size: 14px;
    margin-bottom: 24px;
}

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

input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #2a3560;
    border-radius: 8px;
    background: #0f1a30;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

input[type="password"]:focus,
input[type="number"]:focus {
    border-color: #5e8cee;
}

input[type="number"] {
    width: 70px;
    padding: 6px 8px;
    text-align: center;
}

.interval-input {
    width: 70px !important;
    padding: 6px 8px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

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

.btn-primary {
    background: #5e8cee;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: #4a7ad4;
}

.btn-secondary {
    background: #2a3560;
    color: #8892b0;
}

.btn-secondary:hover:not(:disabled) {
    background: #354070;
}

.btn-success {
    background: #2ecc71;
    color: #ffffff;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}

.btn-success:hover:not(:disabled) {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
    color: #ffffff;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-small {
    padding: 6px 16px;
    font-size: 13px;
    width: auto;
}

#login-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 6px;
}

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

.header-row h1 {
    margin-bottom: 0;
}

.status-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #0f1a30;
    border-radius: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-online {
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.dot-offline {
    background: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

.dot-checking {
    background: #f1c40f;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.5);
    animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-time {
    color: #8892b0;
    font-size: 12px;
    margin-left: auto;
}

.autorefresh-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #8892b0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #5e8cee;
    cursor: pointer;
}

.actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-result {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.result-success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.result-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}
