/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 25px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Login Section */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

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

.login-card h2 {
    margin-bottom: 24px;
    color: #667eea;
}

.login-card input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 16px;
}

.login-card input:focus {
    outline: none;
    border-color: #667eea;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-card button:hover {
    background: #5568d3;
}

.error-message {
    color: #e53e3e;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* Dashboard Section */
.dashboard-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.stat-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #e2e8f0;
}

.stat-card.success {
    border-color: #48bb78;
    background: #f0fff4;
}

.stat-card.danger {
    border-color: #f56565;
    background: #fff5f5;
}

.stat-card.warning {
    border-color: #ed8936;
    background: #fffaf0;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content h3 {
    font-size: 1.6rem;
    color: #2d3748;
    margin-bottom: 3px;
}

.stat-content p {
    color: #718096;
    font-size: 0.8rem;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 18px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

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

/* Progress Section */
.progress-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2d3748;
}

.progress-bar {
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 12px;
    transition: width 0.3s;
    width: 0%;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: #f7fafc;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.85rem;
}

td {
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
}

tbody tr:hover {
    background: #f7fafc;
}

.loading {
    text-align: center;
    color: #718096;
    padding: 30px !important;
}

.service-name {
    font-weight: 600;
    color: #2d3748;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.success {
    background: #c6f6d5;
    color: #22543d;
}

.badge.danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge.warning {
    background: #feebc8;
    color: #7c2d12;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-small:hover {
    background: #5568d3;
}

/* Modal */
.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;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    color: #2d3748;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #718096;
    line-height: 1;
}

.close-btn:hover {
    color: #2d3748;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions-bar {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
