/* General Body Styling */
body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #e1f7fa; /* Lighter blue background */
    margin: 0;
    padding: 0;
    color: #333;
}

/* Admin Header */
.adminber {
    background-color: #4b3c4b; /* Subtle dark tone */
    padding: 15px 25px;
    border-radius: 25px 25px 0 0;
    color: #f4f7f7;
    text-align: center;
    font-size: 18px;
}

/* Links Styling */
a:link,
a:visited {
    color: #0065bd; /* Soft blue for links */
    text-decoration: none; /* Remove underline */
}

a:hover {
    color: #003359; /* Dark blue on hover */
    text-decoration: underline;
}

a:active {
    color: #98c6ea;
    text-decoration: underline;
}

/* Paragraph, Table, List Styling */
p, td, th, li {
    font-size: 14px;
    line-height: 1.0;
}

/* Table Styling */
table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

/* Table Header Styling */
th {
    background-color: #98c6ea;
    padding: 5px;  /* Reduced padding */
    text-align: left;
    font-size: 14px;
    font-weight: bold;
}

/* Table Row Styling */
tr.ergebnisa {
    background-color: #f1ede4; /* Light beige for alternating rows */
}

tr.ergebnisb {
    background-color: #dad7cb; /* Slightly darker beige for alternating rows */
}

/* Table Cell Styling */
td {
    padding: 5px;  /* Reduced padding */
    border: 1px solid #ddd; /* Light gray border */
    text-align: left;
}

/* Header Styling */
h1 {
    font-size: 24px;
    text-align: center;
    margin: 20px 0;
}

h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

h3 {
    font-size: 16px;
    padding: 10px;
    background-color: #0065bd;
    color: white;
    border-radius: 5px;
    margin-bottom: 10px;
    height: 10px; /* Set to a meaningful value for visibility */
    display: flex;
    align-items: center; /* Vertical centering */
    justify-content: center; /* Optional: Horizontal centering */
}


/* Blockquote Styling */
blockquote {
    font-size: 14px;
    font-weight: bold;
    color: #003359;
    background-color: #f4f7f7;
    padding: 10px 15px;
    border-left: 5px solid #0065bd;
    margin: 20px 0;
    font-style: italic;
}

/* Large Text (wasay class) */
.wasay {
    font-size: 36px;
    color: #003359;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
}

/* Main Table Styling */
.main td {
    background-color: #f4f7f7;
    border-radius: 10px;
}

/* Specific Table Styling for wasay class */
.wasay td {
    background-color: #00a9cc; /* More vibrant background for specific class */
    color: white;
}

/* Border Radius for Tables */
table, td, th {
    border-radius: 10px;
}

/* Empty Cells Visibility */
table.ergebnis {
    empty-cells: show;
    border-spacing: 2px;
    padding: 2px;
}

/* Form Styling */
form {
    margin: 10px 0;
}

form input[type="text"],
form select {
    width: 200px;  /* Reduced width */
    padding: 6px;  /* Reduced padding */
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Ensure option elements are visible in all browsers */
form select option {
    display: block;
    visibility: visible;
    color: #333;
    background-color: white;
    padding: 2px 4px;
}

/* Fix for Edge browser compatibility */
select option {
    display: block !important;
    visibility: visible !important;
    color: #333 !important;
    background-color: white !important;
}

form input[type="submit"] {
    background-color: #007BFF;
    color: white;
    padding: 8px 16px;  /* Reduced padding */
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

form input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Blockquote for Forms */
blockquote {
    margin: 10px 0;
    padding: 10px;
    background-color: #f4f4f4;
    border-left: 5px solid #007BFF;
    font-style: italic;
}

/* Admin Section Styling */
.adminber {
    background-color: #fff;
    padding: 15px;  /* Reduced padding */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;  /* Reduced margin */
}

.adminber h3 {
    color: #333;
    font-size: 22px;  /* Reduced font size */
    font-weight: bold;
}

.adminber blockquote {
    margin-left: 15px;  /* Reduced left margin */
    font-size: 14px;  /* Reduced font size */
}

.adminber blockquote p {
    margin: 10px 0;
    color: #555;
}

/* Statistics Dashboard Styles */
.stats-section {
    background: white !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px !important;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 10px !important;
    text-align: center !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    text-decoration: none !important;
    display: block !important;
}

.stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

.stat-number {
    font-size: 2.5em !important;
    font-weight: bold !important;
    margin-bottom: 5px !important;
}

.stat-label {
    font-size: 0.9em !important;
    opacity: 0.9 !important;
}

.chart-container {
    margin-top: 20px !important;
}

.category-chart {
    margin-top: 15px !important;
    max-height: 600px !important;
    overflow-y: auto !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 15px !important;
}

.category-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    transition: background-color 0.2s ease !important;
}

.category-item:hover {
    background: #e9ecef !important;
}

.category-info {
    flex: 1 !important;
    min-width: 0 !important;
    margin-right: 15px !important;
}

.category-name {
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.category-count {
    font-size: 0.85em !important;
    color: #6c757d !important;
}

.category-bar-wrapper {
    flex: 1 !important;
    background: #e9ecef !important;
    border-radius: 4px !important;
    height: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 150px !important;
}

.category-bar {
    background: linear-gradient(90deg, #28a745, #20c997) !important;
    height: 100% !important;
    border-radius: 4px !important;
    transition: width 0.3s ease !important;
}

.category-percentage {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.8em !important;
    font-weight: bold !important;
    color: #0065bd !important;
    text-shadow: 0 0 2px rgba(255,255,255,0.8) !important;
}

.bar-chart {
    margin-top: 15px !important;
}

.bar-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    gap: 15px !important;
}

.bar-label {
    min-width: 150px !important;
    font-weight: bold !important;
}

.bar-wrapper {
    flex: 1 !important;
    background: #f0f0f0 !important;
    border-radius: 5px !important;
    height: 25px !important;
    position: relative !important;
    overflow: hidden !important;
}

.bar {
    background: linear-gradient(90deg, #4CAF50, #45a049) !important;
    height: 100% !important;
    border-radius: 5px !important;
    transition: width 0.3s ease !important;
}

.bar-value {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-weight: bold !important;
    color: #333 !important;
}

.activity-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px !important;
}

.activity-card {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 10px !important;
    padding: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    text-decoration: none !important;
    color: inherit !important;
}

.activity-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.activity-icon {
    font-size: 2em !important;
}

.activity-number {
    font-size: 1.8em !important;
    font-weight: bold !important;
    color: #007bff !important;
}

.activity-label {
    font-size: 0.9em !important;
    color: #6c757d !important;
}

.pie-chart-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 15px !important;
    margin-top: 15px !important;
}

.pie-item {
    background: #f8f9fa !important;
    padding: 15px !important;
    border-radius: 8px !important;
    text-align: center !important;
    border: 1px solid #e9ecef !important;
}

.pie-label {
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 5px !important;
}

.pie-value {
    font-size: 0.9em !important;
    color: #6c757d !important;
}

.user-list {
    margin-top: 15px !important;
}

.user-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    margin-bottom: 8px !important;
    border: 1px solid #e9ecef !important;
}

.user-name {
    font-weight: bold !important;
    color: #333 !important;
}

.user-count {
    color: #0065bd !important;
    font-size: 0.9em !important;
}

.popular-categories-chart {
    margin-top: 15px !important;
    max-height: 600px !important;
    overflow-y: auto !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 15px !important;
}

.popular-category-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    transition: background-color 0.2s ease !important;
}

.popular-category-item:hover {
    background: #e9ecef !important;
}

.popular-category-info {
    flex: 1 !important;
    min-width: 0 !important;
    margin-right: 15px !important;
}

.popular-category-name {
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.popular-category-borrows {
    font-size: 0.85em !important;
    color: #6c757d !important;
}

.popular-category-bar-wrapper {
    flex: 1 !important;
    background: #e9ecef !important;
    border-radius: 4px !important;
    height: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 150px !important;
}

.popular-category-bar {
    background: linear-gradient(90deg, #ff8c42, #ff6b35) !important;
    height: 100% !important;
    border-radius: 4px !important;
    transition: width 0.3s ease !important;
}

.popular-category-percentage {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.8em !important;
    font-weight: bold !important;
    color: #0065bd !important;
    text-shadow: 0 0 2px rgba(255,255,255,0.8) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .activity-grid {
        grid-template-columns: 1fr !important;
    }
    
    .pie-chart-container {
        grid-template-columns: 1fr !important;
    }
}

/* Advanced Search Link Styles */
.advanced-search-link {
    background: linear-gradient(135deg, #0065bd, #004a8c);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,102,189,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.advanced-search-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,189,0.4);
}

.btn-advanced-search {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.btn-advanced-search:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.advanced-search-link p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
}
