#ktt-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ktt-controls {
    text-align: center;
    margin-bottom: 30px;
}

.ktt-children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ktt-child-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: border-color 0.3s;
}

.ktt-child-card[data-child-status="running"] {
    border-color: #00a32a;
    background: #f7fcf0;
}

.ktt-child-card[data-child-status="stopped"] {
    border-color: #ddd;
    background: #fff;
}

.ktt-child-card h3.child-name {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.status-container, .time-container {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.status-label, .time-label {
    font-weight: bold;
    color: #555;
}

.status-value {
    font-weight: bold;
    text-transform: uppercase;
}

.status-value[data-status="running"] {
    color: #00a32a;
}

.status-value[data-status="stopped"] {
    color: #666;
}

.time-value {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

.controls {
    margin-top: 20px;
}

.controls .button {
    margin: 0 5px;
    padding: 10px 20px;
    font-size: 16px;
}

.ktt-start-btn:not(:disabled) {
    background-color: #00a32a;
    border-color: #00a32a;
    color: #fff;
}

.ktt-stop-btn:not(:disabled) {
    background-color: #d63638;
    border-color: #d63638;
    color: #fff;
}

.loading {
    padding: 10px;
    color: #0073aa;
    font-style: italic;
}

.ktt-message {
    position: fixed;
    top: 50px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    z-index: 1000;
    max-width: 300px;
}

.ktt-message.success {
    background-color: #00a32a;
}

.ktt-message.error {
    background-color: #d63638;
}

.ktt-success, .ktt-error {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

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

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

/* Alert styles */
.ktt-alerts {
    margin: 20px 0;
}

.ktt-exceeded-alert {
    background-color: #f8d7da;
    border: 2px solid #d63638;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(214, 54, 56, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(214, 54, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(214, 54, 56, 0); }
}

/* Enhanced child card styles */
.ktt-child-card.exceeded-limit {
    border-color: #d63638;
    background: #fef2f2;
    box-shadow: 0 2px 8px rgba(214, 54, 56, 0.2);
}

.exceeded-warning {
    background: #d63638;
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    margin: 10px 0;
    font-weight: bold;
}

.remaining-time {
    margin: 10px 0;
    padding: 8px;
    background: #e8f5e8;
    border-radius: 4px;
    text-align: center;
}

.remaining-label {
    font-weight: bold;
    color: #155724;
}

.remaining-value {
    font-size: 16px;
    font-weight: bold;
    color: #28a745;
}

.remaining-value.no-time {
    color: #d63638;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 70%, #d63638 90%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .ktt-children-grid {
        grid-template-columns: 1fr;
    }
    
    .controls .button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}