/* Base Styles */
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: white;
    background-color: black;
}

/* Layout Containers */
.hub_header,
.elements_list,
.display {
    width: 90%;
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 10px;
    border: 2px white solid;
    border-radius: 10px;
    padding: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Make the work area display its items vertically */
.work_area {
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    border: 2px white solid;
    border-radius: 10px;
    padding: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hub Header */
.hub_header .logo,
.hub_header .description {
    border: 2px white solid;
    border-radius: 10px;
    padding: 10px;
}
.hub_header .logo { width: 25%; }
.hub_header .description { width: 70%; }
.hub_header .logo img {
    width: 100px;
    height: 100px;
    vertical-align: middle;
}

/* Hub Admin */
.hub_admin .messages,
.hub_admin .hub_teams {
    width: 50%;
    border-radius: 10px;
    padding: 10px;
}

.work_area .hubs_list {
    display: block;
    width: 90%;
    align-items: left;
    border: 2px white solid;
    border-radius: 10px;
    padding: 10px;
}

.work_area .hubs_list h3,
.work_area .elements_list h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.work_area .hubs_list p {
    margin: 0;
    font-size: 1rem;
    color: #ccc;
}

.work_area .hubs_list a {
    color: #007bff;
    text-decoration: none;
}

/* Elements List */
.elements_list a,
.elements_list button {
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border: #ddd 2px solid;
    border-radius: 10px;
    background-color: black;
    padding: 5px;
    display: block;
    margin: 5px 0;
}
.elements_list a:hover,
.elements_list a:active,
.elements_list button:hover {
    background-color: #ddd;
    color: black;
}

/* Make top-level nav (h3 a) match the management toggle look */
.elements_list h3 a {
    padding: 10px;
    transition: all 0.2s ease;
}
.elements_list h3 a:hover {
    border-color: #ddd;
}

/* Info Section */
.hub_admin_info { width: 90%; }

/* Table Styles */
.display table {
    width: 50%;
    border-collapse: collapse;
}
.display table, th, td {
    border: white 1px solid;
}
.display th, td {
    padding: 15px;
    text-align: left;
}

/* Info Card */
.display .info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 2px white solid;
    border-radius: 10px;
    background-color: black;
}
.display .info h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}
.display .info p {
    margin: 0;
    font-size: 1rem;
    color: #ccc;
}
.display .info a {
    color: #007bff;
    text-decoration: none;
}

/* Form Styles */
.display form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.display form label { font-weight: bold; }
.display form input[type="text"],
.display form input[type="email"],
.display form input[type="password"],
.display form input[type="number"],
.display form select,
.display form textarea {
    width: 90%;
    padding: 10px;
    border: white 1px solid;
    border-radius: 5px;
    background-color: black;
    color: white;
}
.display button {
    width: 50%;
    padding: 10px;
    border: white 1px solid;
    border-radius: 5px;
    background-color: black;
    color: white;
}

/* Dashboard Styles */
.programs-dashboard,
.team-members-dashboard,
.messages-dashboard,
.membership-requests-dashboard,
.publications-dashboard,
.datasets-dashboard,
.meetups-dashboard,
.events-dashboard {
    width: 90%;
    padding: 20px;
    border: white 2px solid;
    border-radius: 10px;
    background-color: black;
    color: white;
    margin: 20px auto;
}

.dashboard-header,
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.dashboard-header h2 {
    color: #007bff;
    font-size: 1.8em;
    margin: 0;
    font-weight: bold;
}

.section-header { 
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.section-header h3 {
    color: white;
    font-size: 1.4em;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #007bff;
}

.stat-number {
    font-size: 2.2em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 5px;
}

/* Grid Layouts for Content */
.programs-grid,
.members-grid,
.messages-grid,
.publications-grid,
.datasets-grid,
.meetups-grid,
.events-grid,
.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Card Styles */
.program-card,
.member-card,
.message-card,
.publication-card,
.dataset-card,
.meetup-card,
.event-card,
.request-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.program-card:hover,
.member-card:hover,
.message-card:hover,
.publication-card:hover,
.dataset-card:hover,
.meetup-card:hover,
.event-card:hover,
.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,255,255,0.15);
    border-color: #666;
}

/* Card Headers */
.program-header,
.member-header,
.message-header,
.publication-header,
.dataset-header,
.meetup-header,
.event-header,
.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.program-header h3,
.member-header h3,
.message-header h3,
.publication-header h3,
.dataset-header h3,
.meetup-header h3,
.event-header h3,
.request-header h3 {
    color: #007bff;
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

/* Content Areas */
.program-content,
.member-content,
.message-content,
.publication-content,
.dataset-content,
.meetup-content,
.event-content,
.request-content {
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Specific Content Styles */
.publication-authors,
.publication-journal,
.publication-description,
.publication-abstract {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.publication-authors strong,
.publication-journal strong,
.dataset-description strong,
.meetup-location strong,
.event-location strong {
    color: #007bff;
}

.dataset-description,
.meetup-description,
.event-description {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 0.9em;
    line-height: 1.4;
}

.dataset-file,
.meetup-file,
.event-file,
.publication-file {
    margin-top: 10px;
    padding: 8px 0;
    border-top: 1px solid #333;
}

.file-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.file-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Date and Time Styling */
.publication-date,
.meetup-date,
.event-date,
.request-date {
    font-size: 0.8em;
    color: #999;
    font-weight: normal;
}

.meetup-date .date,
.event-date .date {
    display: block;
    font-weight: bold;
    color: #007bff;
}

.meetup-date .time,
.event-date .time {
    display: block;
    color: #ccc;
    margin-top: 2px;
}

/* Location and URL Styling */
.meetup-location,
.event-location {
    margin-bottom: 10px;
    color: #ccc;
}

.meetup-url,
.event-url {
    margin: 10px 0;
}

/* Action Buttons */
.program-actions,
.member-actions,
.message-actions,
.publication-actions,
.dataset-actions,
.meetup-actions,
.event-actions,
.request-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}

/* Button Styles */
.btn,
.messages-dashboard .btn,
.form-actions .btn,
.message-detail-actions .btn {
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9em;
    background-color: #1a1a1a;
    color: white;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #bd2130;
    border-color: #bd2130;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #117a8b;
    border-color: #117a8b;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #d39e00;
    border-color: #d39e00;
}

.btn-small {
    padding: 6px 12px !important;
    font-size: 0.8em !important;
    min-width: 60px !important;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-active {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===================== */
/* Forms (hubs_form.html) */
/* ===================== */
.form-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.form-card {
    width: 100%;
    max-width: 900px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
}

.form-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.form-header h2 {
    color: #007bff;
    font-size: 1.6em;
    margin: 0;
    font-weight: bold;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: #fff;
}

.form-description {
    color: #ccc;
    font-size: 0.9em;
    margin-top: -4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #0f0f0f;
    color: #fff;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.multiple-field .label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multiple-inputs .input-group {
    display: flex;
    gap: 8px;
    margin: 6px 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

@media (max-width: 768px) {
    .form-card { padding: 16px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
}

.status-admin {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-member {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b3d4fc;
}

/* Membership Request Specific Styles */
.pending-requests-section {
    margin-bottom: 40px;
}

.request-card.pending {
    border-left: 4px solid #ffc107;
}

.request-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    border: 2px solid #333;
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8em;
    border: 2px solid #333;
    margin-right: 10px;
}

.user-info h4 {
    margin: 0;
    color: white;
    font-size: 1em;
}

.user-info p {
    margin: 2px 0;
    color: #ccc;
    font-size: 0.9em;
}

.request-message {
    background: #262626;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
}

.request-message p {
    margin: 5px 0;
    color: #ccc;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Table Styles for Requests */
.requests-table {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.requests-table table {
    width: 100%;
    border-collapse: collapse;
}

.requests-table th,
.requests-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.requests-table th {
    background: #262626;
    color: #007bff;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requests-table td {
    color: white;
    font-size: 0.9em;
}

.requests-table tbody tr:hover {
    background: #262626;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.empty-state h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.empty-state p {
    margin-bottom: 25px;
    color: #ccc;
    font-size: 1.1em;
    line-height: 1.5;
}

/* Sub-menu Styles for Navigation */
.sub-menu {
    display: none;
    position: absolute;
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-left: 2px solid #333;
    padding-left: 15px;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
    z-index: 50;
}

.sub-menu.show {
    display: block;
    opacity: 1;
    max-height: 300px;
}

.sub-menu h4 {
    margin: 5px 0;
    font-size: 1rem;
}

.sub-menu h4 a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    font-weight: normal;
    border: #555 2px solid;
    border-radius: 8px;
    background-color: #1a1a1a;
    padding: 8px 12px;
    display: inline-block;
    transition: all 0.3s ease;
}

.sub-menu h4 a:hover {
    background-color: #333;
    color: white;
    border-color: #007bff;
}

/* Style for management button - override the general button styles */
.management-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: black !important;
    border: #ddd 2px solid !important;
    color: white !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    font-family: inherit !important;
    padding: 10px !important;
    margin: 5px 0 !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    display: block !important;
    width: auto !important;
    text-align: left !important;
}

.management-toggle:hover {
    background-color: #ddd !important;
    color: black !important;
    border-color: #ddd !important;
}

/* Wrapper for management section */
.management-section {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .programs-grid,
    .members-grid,
    .messages-grid,
    .publications-grid,
    .datasets-grid,
    .meetups-grid,
    .events-grid,
    .requests-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-header,
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .dashboard-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .dashboard-actions .btn {
        width: 100%;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .program-header,
    .member-header,
    .message-header,
    .publication-header,
    .dataset-header,
    .meetup-header,
    .event-header,
    .request-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .program-actions,
    .member-actions,
    .message-actions,
    .publication-actions,
    .dataset-actions,
    .meetup-actions,
    .event-actions,
    .request-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .program-actions .btn,
    .member-actions .btn,
    .message-actions .btn,
    .publication-actions .btn,
    .dataset-actions .btn,
    .meetup-actions .btn,
    .event-actions .btn,
    .request-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .requests-table {
        overflow-x: auto;
    }
    
    .requests-table table {
        min-width: 600px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .table-actions .btn {
        width: 100%;
        font-size: 0.8em;
        padding: 6px 8px;
    }
}

/* Animation for cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-card,
.member-card,
.message-card,
.publication-card,
.dataset-card,
.meetup-card,
.event-card,
.request-card {
    animation: slideInUp 0.3s ease-out forwards;
}

/* Stagger animation for multiple cards */
.program-card:nth-child(1) { animation-delay: 0.1s; }
.program-card:nth-child(2) { animation-delay: 0.2s; }
.program-card:nth-child(3) { animation-delay: 0.3s; }
.program-card:nth-child(4) { animation-delay: 0.4s; }
.program-card:nth-child(5) { animation-delay: 0.5s; }
.program-card:nth-child(6) { animation-delay: 0.6s; }

.member-card:nth-child(1) { animation-delay: 0.1s; }
.member-card:nth-child(2) { animation-delay: 0.2s; }
.member-card:nth-child(3) { animation-delay: 0.3s; }
.member-card:nth-child(4) { animation-delay: 0.4s; }
.member-card:nth-child(5) { animation-delay: 0.5s; }
.member-card:nth-child(6) { animation-delay: 0.6s; }

.publication-card:nth-child(1) { animation-delay: 0.1s; }
.publication-card:nth-child(2) { animation-delay: 0.2s; }
.publication-card:nth-child(3) { animation-delay: 0.3s; }
.publication-card:nth-child(4) { animation-delay: 0.4s; }
.publication-card:nth-child(5) { animation-delay: 0.5s; }
.publication-card:nth-child(6) { animation-delay: 0.6s; }

.dataset-card:nth-child(1) { animation-delay: 0.1s; }
.dataset-card:nth-child(2) { animation-delay: 0.2s; }
.dataset-card:nth-child(3) { animation-delay: 0.3s; }
.dataset-card:nth-child(4) { animation-delay: 0.4s; }
.dataset-card:nth-child(5) { animation-delay: 0.5s; }
.dataset-card:nth-child(6) { animation-delay: 0.6s; }

.meetup-card:nth-child(1) { animation-delay: 0.1s; }
.meetup-card:nth-child(2) { animation-delay: 0.2s; }
.meetup-card:nth-child(3) { animation-delay: 0.3s; }
.meetup-card:nth-child(4) { animation-delay: 0.4s; }
.meetup-card:nth-child(5) { animation-delay: 0.5s; }
.meetup-card:nth-child(6) { animation-delay: 0.6s; }

.request-card:nth-child(1) { animation-delay: 0.1s; }
.request-card:nth-child(2) { animation-delay: 0.2s; }
.request-card:nth-child(3) { animation-delay: 0.3s; }
.request-card:nth-child(4) { animation-delay: 0.4s; }
.request-card:nth-child(5) { animation-delay: 0.5s; }
.request-card:nth-child(6) { animation-delay: 0.6s; }

