/* Forms, inputs, and buttons */

/* Form Elements */
input, select, button {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
}

input[type="text"] { flex: 1; }
input[type="number"] { width: 70px; }
input[type="checkbox"] { width: auto; }
.cpc-input { width: 80px !important; }
select { 
    width: auto;
}

/* Specific select widths */
#scheduleFrequency {
    min-width: 180px;
}

#scheduleTimezone {
    min-width: 200px;
}

/* Search form selects */
select[name="limit"] {
    min-width: 80px;
}

select[name="sort_by"] {
    min-width: 130px;
}

select[name="sort_order"] {
    min-width: 120px;
}

/* Default form selects */
#defaultSortBy {
    min-width: 130px;
}

#defaultSortOrder {
    min-width: 120px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

button:hover { background: #2980b9; }
button:disabled { background: #95a5a6; cursor: not-allowed; }

/* Defaults Form */
.defaults-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.defaults-form label {
    font-size: 11px;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.defaults-form input,
.defaults-form select {
    font-size: 12px;
    padding: 4px 6px;
}

.defaults-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.defaults-actions button {
    font-size: 12px;
    padding: 4px 10px;
}

.settings-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.login-box h1 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-box p {
    color: #6c757d;
    margin-bottom: 30px;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#loginForm input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: border-color 0.2s;
}

#loginForm input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
}

#loginForm button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

#loginForm button:hover {
    background: #2980b9;
}

.login-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.login-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Logout button styles */
.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 2px 7px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* API Debug Toggle */
.api-debug-toggle {
    margin-left: auto;
    font-size: 10px;
    color: #999;
    cursor: pointer;
    text-decoration: underline;
}

.api-debug-toggle:hover {
    color: #3498db;
}

/* Action buttons */
.action-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.action-btn:hover {
    background: #2980b9;
}

.action-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

.action-btn.small {
    padding: 4px 10px;
    font-size: 12px;
}

.action-btn.small i {
    margin-right: 4px;
}