/* Global Base Styles - Common across all pages */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
}

.main-content {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

/* Header Styles */
header {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
}

.header-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.left-header {
    display: flex;
    align-items: center;
}

.left-header .logo {
    width: 60px;
    height: auto;
    margin-right: 10px;
}

.left-header .page-title {
    font-size: 1.5em;
    font-weight: bold;
}

.right-header {
    display: flex;
    align-items: center;
}

.right-header .user-info {
    margin-right: 15px;
    font-size: 1em;
    color: #333;
}

.right-header .logout-button {
    padding: 5px 10px;
    font-size: 1em;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

.right-header .logout-button:hover {
    background-color: #0056b3;
    color: #fff;
}

/* Common Button Styles */
.btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
}

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

.btn-danger {
    background-color: #dc3545;
}

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

.btn-info {
    background-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

/* Theme Toggle */
.theme-toggle {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 12px;
}

.theme-toggle:hover {
    background-color: #5a6268;
}

/* Dark Mode Base Styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode header {
    background-color: #1e1e1e;
    color: #fff;
}

body.dark-mode .user-info {
    color: #ccc;
}

/* ==========================================================================
   FLOATING BUTTONS
   ========================================================================== */

/* Floating Help Button */
.floating-help-btn {
    position: fixed;
    top: 80px; /* Position below the header */
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.floating-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, #138496, #0f6674);
}

.floating-help-btn a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.floating-help-btn a:hover {
    color: white;
    text-decoration: none;
}

/* Floating Back Button */
.floating-back-btn {
    position: fixed;
    top: 80px; /* Position below the header */
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d, #545b62);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.floating-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, #545b62, #495057);
}

.floating-back-btn a,
.floating-back-btn button {
    color: white;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
}

.floating-back-btn a:hover,
.floating-back-btn button:hover {
    color: white;
    text-decoration: none;
}

/* Dark mode styles for floating buttons */
body.dark-mode .floating-help-btn {
    background: linear-gradient(135deg, #0dcaf0, #0aa2c0);
}

body.dark-mode .floating-help-btn:hover {
    background: linear-gradient(135deg, #0aa2c0, #087990);
}

body.dark-mode .floating-back-btn {
    background: linear-gradient(135deg, #495057, #343a40);
}

body.dark-mode .floating-back-btn:hover {
    background: linear-gradient(135deg, #343a40, #212529);
}

/* ==========================================================================
   STICKY TABLE HEADERS - Keep first row fixed when scrolling
   ========================================================================== */

.report-table-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.report-table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.report-table-container thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 8px;
    font-weight: 600;
    text-align: left;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.report-table-container tbody td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
}

/* Dark mode support for sticky headers */
body.dark-mode .report-table-container {
    border-color: #495057;
}

body.dark-mode .report-table-container thead th {
    background-color: #343a40;
    border-bottom-color: #495057;
    color: #f8f9fa;
}

body.dark-mode .report-table-container tbody td {
    border-bottom-color: #495057;
}