/* Shared CSS - Common styles used across all pages */

/* RESET & BASE STYLES */

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

/* Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* LAYOUT */

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* HEADER */

/* Header Styles */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* BUTTONS */

/* Base Button Styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

/* Button Variants - Primary */
.btn-primary {
    background: #4facfe;
    color: white;
}

.btn-primary:hover {
    background: #3a8bfd;
}

/* Button Variants - Success */
.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Button Variants - Danger */
.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Button Variants - Warning */
.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Button Variants - Secondary */
.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Button States - Disabled */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* FORMS */

/* Form Group Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Form Labels */
.form-group label {
    font-weight: 600;
    color: #495057;
}

/* Form Inputs & Selects */
.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
}

/* UI ELEMENTS */

/* Spinner / Loading Indicator */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(79, 172, 254, 0.3);
    border-radius: 50%;
    border-top-color: #4facfe;
    animation: spin 1s ease-in-out infinite;
}

/* ANIMATIONS */

/* Spin Animation - Used for loading spinners */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse Animation - Used for connecting states */
@keyframes pulse-connecting {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* RESPONSIVE DESIGN - Mobile & Tablet (max-width: 768px) */
@media (max-width: 768px) {
    /* Common responsive styles */
    .form-row {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

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