/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #D73128;
    --secondary-color: #B22222;
    --accent-color: #D35400;
    --success-color: #2e7d32;
    --warning-color: #f57c00;
    --danger-color: #d32f2f;
    --light-color: #f5f5f5;
    --dark-color: #212121;
    --border-radius: 6px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Header and Navigation */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main Content */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.data-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-open {
    background-color: #ffebee;
    color: var(--danger-color);
}

.status-closed {
    background-color: #e8f5e9;
    color: var(--success-color);
}

.status-progress {
    background-color: #fff3e0;
    color: var(--warning-color);
}

/* Level Indicators */
.level-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.level-upgraded {
    background-color: #e3f2fd;
    color: #1565c0;
}

.level-legacy {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.level-critical {
    background-color: #ffebee;
    color: #c62828;
}

/* Forms */
.form-container {
    max-width: 800px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-logo {
	text-align: center;
	margin-bottom: 2rem;
	color: #000000;
}

.login-logo h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-label {
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filters */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* for new landing page*/

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #1a237e;
    color: white;
}

.btn-primary:hover {
    background: #283593;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

.btn-outline-light {
    background: transparent;
    border-color: white;
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Spinner for loading */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Report Type Cards */
.report-type-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.report-type-card:hover {
    border-color: #D73128;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 90%;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    font-weight: bold;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* News & Handover Section */
.btn-outline-danger {
    color: #D73128;
    border: 1px solid #D73128;
    background: transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-danger:hover {
    background: #D73128;
    color: white;
}

/* News Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 90%;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.close-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    font-weight: bold;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Responsive design for the news section */
@media (max-width: 768px) {
    .card > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
	
	/* News Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 90%;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    font-weight: bold;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* News item styles */
.news-item {
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #f8f9fa !important;
}

/* Spinner for loading */
.spinner {
    border: 3px solid rgba(215, 49, 40, 0.3);
    border-radius: 50%;
    border-top: 3px solid #D73128;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button styles */
.btn-outline-danger {
    color: #D73128;
    border: 1px solid #D73128;
    background: transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-danger:hover {
    background: #D73128;
    color: white;
}

/* ===========================================
   NEWS MODAL STYLES
   =========================================== */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    font-weight: bold;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
    background: rgba(0,0,0,0.05);
}

/* News Item Styles */
.news-item {
    transition: var(--transition);
    cursor: pointer;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #f8f9fa !important;
}

.news-item-hover {
    background: #f8f9fa !important;
}

.news-title {
    flex: 1;
}

.priority-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unread-indicator {
    color: #ff9800;
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.news-meta {
    font-size: 0.75rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Unread News Alert */
#unreadNewsAlert {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #fff8e1;
    border-radius: var(--border-radius);
    border-left: 3px solid #ff9800;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner for loading */
.spinner {
    border: 3px solid rgba(215, 49, 40, 0.3);
    border-radius: 50%;
    border-top: 3px solid #D73128;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Outlines */
.btn-outline-danger {
    color: #D73128;
    border: 1px solid #D73128;
    background: transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-outline-danger:hover {
    background: #D73128;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(215, 49, 40, 0.2);
}

/* Responsive Design for News Section */
@media (max-width: 768px) {
    .card > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .modal-content {
        padding: 1rem;
        max-height: 85vh;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
    }
	
	
/* Additional CSS for better dashboard layout */
.grid-2-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mini-stat-card {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mini-stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.mini-stat-label {
    color: #666;
    font-size: 0.75rem;
}

.handover-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.handover-item:hover {
    background-color: #f8f9fa;
}

.handover-item:last-child {
    border-bottom: none;
}

.handover-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.handover-meta {
    font-size: 0.75rem;
    color: #666;
}

.unread-alert {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #fff8e1;
    border-radius: 8px;
    border-left: 3px solid #ff9800;
}

.news-dashboard-item {
    border-left: 4px solid #1976d2;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.news-dashboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.news-dashboard-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background-color: #f57c00;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.priority-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.5rem;
    color: white;
    border-radius: 10px;
}

.news-dashboard-meta {
    text-align: right;
    min-width: 120px;
}

.news-dashboard-meta small {
    display: block;
    color: #666;
    font-size: 0.7rem;
}

.news-dashboard-content {
    margin: 0;
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

.pagination-container {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-ellipsis {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.activity-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.activity-action {
    margin: 0;
    font-size: 0.875rem;
    color: #555;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.quick-action-btn span {
    font-size: 1.2rem;
}

@media (max-width: 1200px) {
    .grid-2-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

}