:root {
    --primary-color: #2c3e50;
    --accent-color: #f1c40f;
    /* PowerBI yellow-ish tone */
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--primary-color);
}

/* Report Card Styling */
.report-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-info h3 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
}

.report-info p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #666;
}

.report-actions button {
    margin-left: 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.send-btn {
    background-color: #27ae60;
    color: white;
}

.send-btn:hover {
    background-color: #219150;
}

.preview-btn {
    background-color: #3498db;
    color: white;
}

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

.edit-btn {
    background-color: #95a5a6;
    color: white;
}

.edit-btn:hover {
    background-color: #7f8c8d;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.primary-btn:hover {
    background-color: #1a252f;
}

.secondary-btn {
    background-color: #ecf0f1;
    color: var(--primary-color);
    padding: 10px 20px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
}

.secondary-btn:hover {
    background-color: #bdc3c7;
}

/* Modal Styling */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    position: relative;
}

.modal-content.large {
    width: 900px;
    height: 80%;
}

#iframe-container {
    width: 100%;
    height: 90%;
}

#iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-btn,
.close-btn-preview {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover,
.close-btn-preview:hover {
    color: black;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    transition: transform 0.3s ease-out;
}

.notification.show {
    transform: translateY(0);
}

/* History Modal Specific Styles */

.history-content {
    background-color: #fcfcfc;
}

.history-table-container {
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.history-table th {
    background-color: #ecf0f1;
    color: var(--primary-color);
    text-align: left;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.history-table tr:hover {
    background-color: #f9f9f9;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.error-cell {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e74c3c;
    cursor: help;
}