* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-size: 16px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: #f5f5f5;
    color: #333;
    font-size: var(--font-size);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.app-version {
    font-size: 0.75rem;
    font-weight: normal;
    color: #888;
    margin-left: 8px;
    vertical-align: middle;
}

.email-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

.email-status-badge.enabled {
    color: #1e8449;
    background: #eafaf1;
    border: 1px solid #27ae60;
}

.email-status-badge.simulation {
    color: #b9770e;
    background: #fff9e6;
    border: 1px solid #f1c40f;
}

.header-link {
    text-decoration: none;
    color: inherit;
}

.header-link:hover h1 {
    color: #3498db;
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    align-items: center;
    position: relative;
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: #f0f0f0;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #666;
    margin: 5px 0;
    transition: all 0.2s;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1000;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-header h3 {
    font-size: 1.2rem;
    color: #2c3e50;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.mobile-nav-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    margin-bottom: 5px;
}

.mobile-nav-link:hover {
    background: #f0f0f0;
    color: #333;
}

.mobile-nav-link.active {
    background: #3498db;
    color: white;
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: #f0f0f0;
    color: #333;
}

.nav-link.active {
    background: #3498db;
    color: white;
}

/* Page Content */
.page-content {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    color: #2c3e50;
    margin: 0;
}

/* Tools Section */
.tools-section {
    max-width: 600px;
}

.tools-section h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    display: block;
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    text-align: center;
}

.tool-card:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.tool-card h3 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1rem;
}

.tool-card p {
    color: #666;
    font-size: 12px;
    margin: 0;
    display: none;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #d68910;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar input {
    flex: 0 0 100%;
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: #3498db;
}

/* Search Input Container - wraps search input and icon */
.search-input-container {
    position: relative;
    flex: 0 0 40%;
    width: 40%;
}

.search-input-container .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
    pointer-events: none;
}

/* Email Type Filter Dropdown */
.email-type-filter {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.email-type-filter:focus {
    outline: none;
    border-color: #3498db;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
    pointer-events: none;
}

.search-bar .btn-primary {
    flex-shrink: 0;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

#memberCount {
    font-size: 14px;
    color: #666;
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.members-table th,
.members-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: var(--font-size);
    font-family: var(--font-family);
    border-bottom: 1px solid #eee;
}

.members-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.members-table th:hover {
    background: #e9ecef;
}

.members-table tr:hover {
    background: #f8f9fa;
}

.members-table tr {
    cursor: pointer;
    transition: background 0.2s;
}

.members-table tr:hover .member-actions {
    opacity: 1;
}

.member-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.tag-link {
    color: #8e44ad;
    text-decoration: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #e8daef;
    text-decoration: underline;
}

/* Tag filter */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tag-filter-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.tag-filter-btn:hover {
    background: #f0f0f0;
}

.tag-filter-btn.active {
    background: #8e44ad;
    color: white;
    border-color: #8e44ad;
}

/* Sort controls */
.sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.sort-controls label {
    font-size: 12px;
    color: #666;
}

.sort-controls select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
}

.sort-controls .btn-primary {
    margin-left: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 700px;
}

/* Template Modal - Wider and taller */
#templateFormModal {
    width: 90%;
    height: 90%;
    max-width: none;
    margin: auto;
}

#templateFormModal .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    resize: none;
}

#templateFormModal form,
#templateFormModal .modal-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
}

#templateFormModal .form-group {
    overflow: hidden;
}

#templateFormModal .quill-editor-container {
    min-height: 350px !important;
    overflow: hidden;
}

#templateFormModal .ql-editor {
    min-height: 350px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Quill Editor Styles */
.quill-editor-container {
    background: white;
    border-radius: 6px;
}

.quill-editor-container .ql-toolbar {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-color: #ddd !important;
}

.quill-editor-container .ql-container {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border-color: #ddd !important;
}

/* Editor height */
.ql-editor {
    min-height: 150px;
    font-family: inherit;
    font-size: 14px;
}

/* Template preview styles */
.template-preview {
    display: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 20px 60px 20px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-header h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0;
}

.modal-header-actions {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.modal-header-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

/* Forms */
form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form warning message */
.form-warning {
    margin-top: 5px;
    font-size: 12px;
    color: #e74c3c;
    background: #fdf0ed;
    padding: 8px 10px;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

/* Input warning state */
.input-warning {
    border-color: #e74c3c !important;
    background-color: #fdf0ed;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Member Details */
#memberDetails {
    padding: 20px;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-label {
    width: 120px;
    font-weight: 500;
    color: #666;
    flex-shrink: 0;
}

.detail-value {
    color: #333;
}

.info-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Email Preview */
.email-preview {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
    white-space: pre-wrap;
    font-size: 13px;
    max-height: 200px;
    overflow-y: auto;
}

/* Email Log */
.email-log-list {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.email-log-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.email-log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.email-log-to {
    font-weight: 500;
    color: #2c3e50;
}

.email-log-date {
    font-size: 12px;
    color: #999;
}

.email-log-subject {
    margin-bottom: 5px;
    color: #333;
}

.email-log-template {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.email-log-body {
    font-size: 13px;
    color: #444;
    white-space: pre-wrap;
}

/* Email Type Badge */
.email-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.email-type-badge.real {
    color: #1e8449;
    background: #eafaf1;
    border: 1px solid #27ae60;
}

.email-type-badge.sim {
    color: #b9770e;
    background: #fff9e6;
    border: 1px solid #f1c40f;
}

/* Templates List */
#templatesList {
    padding: 20px;
}

.template-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.template-item h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.template-item p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.template-item .template-actions {
    display: flex;
    gap: 5px;
}

/* Template Preview Modal */
.preview-content {
    padding: 20px;
}

.email-preview-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.email-preview-header {
    background: #f0f0f0;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.email-field {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.email-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.email-value {
    color: #333;
    font-size: 15px;
}

.email-preview-body {
    background: white;
    padding: 20px;
}

.email-body-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.email-body-content p {
    margin-bottom: 10px;
}

.email-body-content p:last-child {
    margin-bottom: 0;
}

.email-body-content ul, .email-body-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.email-body-content h1, .email-body-content h2, .email-body-content h3 {
    margin: 15px 0 10px;
    color: #2c3e50;
}

.email-body-content a {
    color: #3498db;
}

.preview-note {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #333;
    color: white;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #666;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Checkbox Grid for Settings */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-item label {
    font-size: 13px;
    cursor: pointer;
    margin: 0;
}

/* Bulk Email Styles */
#bulkEmailSection {
    max-width: 100%;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.selection-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.selection-controls .btn-link {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
}

.selection-controls .btn-link:hover {
    text-decoration: underline;
}

#bulkSelectedCount {
    font-size: 13px;
    color: #666;
    margin-left: auto;
}

.recipient-list-container {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.recipient-list-container table {
    width: 100%;
    border-collapse: collapse;
}

.recipient-list-container th,
.recipient-list-container td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.recipient-list-container th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    position: sticky;
    top: 0;
}

.recipient-list-container tr:hover {
    background: #f8f9fa;
}

.recipient-list-container .bulk-recipient-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bulk-email-compose {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.bulk-email-compose h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.bulk-email-compose textarea {
    min-height: 150px;
}

.bulk-email-compose .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.preview-body {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    white-space: pre-wrap;
    line-height: 1.6;
    margin-top: 10px;
}

/* Modal Close Button */
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* Quill Editor Styles */
.quill-editor-container {
    background: white;
    border-radius: 6px;
}

.quill-editor-container .ql-toolbar {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-color: #ddd !important;
}

.quill-editor-container .ql-container {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border-color: #ddd !important;
}

/* Editor height */
.ql-editor {
    min-height: 150px;
    font-family: inherit;
    font-size: 14px;
}

/* Template preview styles */
.template-preview {
    display: none;
}

/* Modal body for email preview */
.modal-body {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.modal-body .preview-section {
    margin-bottom: 20px;
}

.modal-body .preview-section:last-child {
    margin-bottom: 0;
}

.modal-body .preview-section h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-body .preview-section .preview-body {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .members-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .header h1 {
        font-size: 1.4rem;
        text-align: center;
    }
    
    /* Hide regular nav on mobile */
    .main-nav {
        display: none;
    }
    
    /* Show hamburger button */
    .hamburger-btn {
        display: block;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Map container - stats above map on mobile */
    .map-container {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .map-stats {
        width: 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .sort-controls {
        flex-wrap: wrap;
    }
    
    .tag-filter {
        max-height: 100px;
        overflow-y: auto;
    }
    
    .member-actions {
        opacity: 1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        width: auto;
        margin-bottom: 3px;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .template-item .template-actions {
        flex-wrap: wrap;
    }
    
    .template-item .btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.2rem;
    }
    
    .members-table th,
    .members-table td {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .tag-link {
        padding: 1px 3px;
        font-size: 10px;
    }
}
