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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f5f5f5;
}

.admin-header {
    background: #2c3e50;
    color: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 20px;
    font-weight: 600;
    padding: 15px 0;
}

.admin-header nav {
    display: flex;
    gap: 5px;
}

.admin-header nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 15px 15px;
    transition: all 0.2s;
}

.admin-header nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-header nav a.logout {
    color: #e74c3c;
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

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

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Buttons */
.btn, .btn-small {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

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

.btn-primary {
    background: #27ae60;
}

.btn-primary:hover {
    background: #229954;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-link {
    color: #3498db;
    text-decoration: none;
}

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

/* Filters */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-form input,
.filter-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.filter-form input {
    flex: 1;
    max-width: 300px;
}

/* Tables */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table thead {
    background: #34495e;
    color: white;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-active, .badge-healthy {
    background: #d4edda;
    color: #155724;
}

.badge-trial, .badge-inactive {
    background: #fff3cd;
    color: #856404;
}

.badge-suspended, .badge-degraded {
    background: #f8d7da;
    color: #721c24;
}

.badge-cancelled, .badge-down {
    background: #d6d8d9;
    color: #383d41;
}

.badge-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.badge-plan, .badge-provider {
    background: #cce5ff;
    color: #004085;
}

/* Forms */
.form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form h3 {
    margin: 30px 0 20px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
    color: #34495e;
}

.form h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 13px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.provider-fields {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Info Box */
.info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-box h3 {
    margin-bottom: 15px;
    color: #004085;
}

.credential-field {
    margin-bottom: 15px;
}

.credential-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #004085;
}

.credential-field code {
    display: block;
    background: white;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
}

.info-box .note {
    margin-top: 15px;
    color: #004085;
    font-size: 13px;
    font-style: italic;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-header nav {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form input {
        max-width: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
