/* style.css - poprawiony, bez drgania kafelków */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header h1 i {
    margin-right: 10px;
}

.header-subtitle {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 300;
    padding-left: 15px;
    border-left: 2px solid rgba(255,255,255,0.3);
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.user-greeting i {
    font-size: 18px;
}

.user-role-badge {
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.role-admin {
    background: #ffd700;
    color: #333;
}

.role-moderator {
    background: #4CAF50;
    color: white;
}

.role-user {
    background: #2196F3;
    color: white;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-admin {
    background: #ffd700;
    color: #333;
}

.btn-admin:hover {
    background: #ffed4a;
}

.btn-login {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-login:hover {
    background: rgba(255,255,255,0.3);
}

.btn-logout {
    background: rgba(255,59,48,0.8);
    color: white;
}

.btn-logout:hover {
    background: #ff3b30;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    justify-content: center;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4292 100%);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
}

/* ===== STATS BANNER ===== */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ===== KAFELKI - BEZ DRGANIA ===== */
.stat-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex: 1;
    min-width: 0;
}

.stat-item i {
    font-size: 30px;
    color: #667eea;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2ff;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-item .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-item .stat-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.stat-item .stat-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    display: block;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.stat-item:hover .stat-hint {
    opacity: 1;
}

/* ===== KAFELKI KLIKALNE ===== */
.stat-item-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-item-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.stat-item-clickable .stat-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    display: block;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.stat-item-clickable:hover .stat-hint {
    opacity: 1;
}

.stat-item-clickable:active {
    transform: scale(0.98);
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert i {
    font-size: 20px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== FILTER INFO ===== */
.filter-info {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-info .filter-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1565c0;
}

.filter-info .filter-text i {
    font-size: 18px;
}

.filter-info .filter-text strong {
    color: #0d47a1;
}

.filter-info .filter-close {
    background: #1976d2;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.filter-info .filter-close:hover {
    background: #1565c0;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: #667eea;
}

/* ===== ENTRIES LIST ===== */
.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.entries-header h2 {
    margin-bottom: 0;
}

.entries-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.per-page select {
    padding: 6px 12px;
    border: 2px solid #e8ecf1;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.per-page select:focus {
    border-color: #667eea;
    outline: none;
}

.entry-count {
    font-size: 14px;
    color: #888;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 20px;
}

/* ===== TABLE ===== */
.table-responsive {
    overflow-x: auto;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.entries-table thead tr {
    background: #f8f9fa;
}

.entries-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e8ecf1;
}

.entries-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    word-wrap: break-word;
}

.entries-table tbody tr {
    transition: background 0.2s ease;
}

.entries-table tbody tr:hover {
    background: #f8f9ff;
}

/* Szerokości kolumn */
.col-id { width: 50px; text-align: center; }
.col-name { width: 15%; }
.col-callsign { width: 15%; text-align: center; }
.col-content { width: 40%; }
.col-date { width: 25%; text-align: right; white-space: nowrap; }

/* Tabela użytkowników */
.users-table .col-id { width: 50px; text-align: center; }
.users-table .col-name { width: 30%; }
.users-table .col-callsign { width: 30%; text-align: center; }
.users-table .col-count { width: 30%; text-align: right; }

.col-content .content-preview {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    display: inline-block;
}

.col-content .content-preview i {
    color: #999;
    margin-right: 4px;
}

/* ===== SORTOWANIE ===== */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sortable-header:hover {
    color: #667eea;
}

.sortable-header i {
    font-size: 12px;
    transition: transform 0.2s;
}

.sortable-header.active {
    color: #667eea;
}

/* ===== ROZWIJANA TREŚĆ ===== */
.entry-content-wrapper {
    position: relative;
    cursor: pointer;
}

.entry-content-wrapper .content-full {
    display: none;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
    border-left: 3px solid #667eea;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-wrap: break-word;
    white-space: normal;
}

.entry-content-wrapper .content-full.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.entry-content-wrapper .content-preview {
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
}

.entry-content-wrapper .content-preview:hover {
    color: #667eea;
}

.entry-content-wrapper .toggle-hint {
    font-size: 11px;
    color: #999;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.entry-content-wrapper:hover .toggle-hint {
    opacity: 1;
}

.user-entry-preview {
    cursor: pointer;
    transition: color 0.2s;
}

.user-entry-preview:hover {
    color: #667eea;
}

.user-entry-preview .entry-arrow {
    font-size: 10px;
    color: #999;
}

.user-entry-full {
    display: none;
    color: #333;
    font-size: 13px;
    margin-top: 5px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 2px solid #667eea;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-entry-full.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-callsign {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-nickname {
    background: #f3e5f5;
    color: #7b1fa2;
}

.clickable-badge {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.clickable-name {
    color: #667eea;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
}

.clickable-name:hover {
    text-decoration: underline;
}

/* ===== ENTRY DATE ===== */
.entry-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
}

.entry-date i {
    color: #999;
}

.entry-time {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

/* ===== USER ENTRIES ===== */
.users-table .user-entries-row {
    background: #f8f9fa;
}

.users-table .user-entries-row td {
    padding: 0 !important;
}

.users-table .user-entries-content {
    padding: 15px 20px;
    display: none;
}

.users-table .user-entries-content.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.users-table .user-entries-content .entry-item {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    color: #555;
}

.users-table .user-entries-content .entry-item:last-child {
    border-bottom: none;
}

.users-table .user-entries-content .entry-item .entry-date {
    color: #999;
    font-size: 12px;
}

.toggle-entries {
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.toggle-entries:hover {
    color: #667eea;
}

.toggle-entries .arrow {
    display: inline-block;
    transition: transform 0.3s;
}

.toggle-entries .arrow.open {
    transform: rotate(180deg);
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
}

.pagination li {
    display: inline;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 2px solid #e8ecf1;
    text-decoration: none;
    color: #555;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #f0f2ff;
    border-color: #667eea;
    color: #667eea;
}

.pagination li.active a {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* ===== NO ENTRIES ===== */
.no-entries {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-entries p {
    margin-top: 10px;
}

.no-entries .text-muted {
    font-size: 14px;
    color: #bbb;
}

.no-entries i {
    font-size: 48px;
    color: #ddd;
}

.no-entries-filter {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-entries-filter i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

/* ===== FOOTER ===== */
footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    border-top: 1px solid #e8ecf1;
}

.text-muted {
    color: #999;
}

/* ============================================ */
/* ===== PANEL ADMINISTRATORA ===== */
/* ============================================ */

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.tab.active {
    background: #667eea;
    color: white;
}

.tab-badge {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.admin-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Dashboard stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.stat-card-link:hover {
    transform: translateY(-5px);
}

.stat-card-link .stat-hover {
    display: none;
    font-size: 12px;
    color: #667eea;
    margin-top: 8px;
    font-weight: 500;
}

.stat-card-link:hover .stat-hover {
    display: block;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card-link:hover .stat-card::before {
    opacity: 1;
}

.stat-card .stat-icon {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-card .stat-number {
    font-size: 36px;
    font-weight: bold;
    display: block;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #666;
    display: block;
    margin-top: 4px;
}

.stat-card .stat-badge {
    display: inline-block;
    background: #ffc107;
    color: #333;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    animation: pulse 2s infinite;
}

.stat-pending .stat-icon { color: #ffc107; }
.stat-pending .stat-number { color: #ffc107; }
.stat-approved .stat-icon { color: #28a745; }
.stat-approved .stat-number { color: #28a745; }
.stat-rejected .stat-icon { color: #dc3545; }
.stat-rejected .stat-number { color: #dc3545; }
.stat-users .stat-icon { color: #17a2b8; }
.stat-users .stat-number { color: #17a2b8; }

.stat-card-link.has-items .stat-card {
    border: 2px solid #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.2);
}

/* Recent activity */
.recent-activity {
    margin-top: 30px;
}

.recent-activity h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

.recent-activity ul {
    list-style: none;
    padding: 0;
}

.recent-activity li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.recent-activity li:last-child {
    border-bottom: none;
}

.recent-activity li .log-time {
    color: #999;
    font-size: 13px;
}

.recent-activity li .log-action {
    font-weight: 500;
}

.recent-activity li .log-details {
    color: #666;
    font-size: 13px;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table tr.editing {
    background: #f0f4ff !important;
}

.admin-table tr.editing td:first-child {
    border-left: 3px solid #667eea;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.role-admin {
    background: #cce5ff;
    color: #004085;
}

.role-moderator {
    background: #d4edda;
    color: #155724;
}

.role-user {
    background: #e2e3e5;
    color: #383d41;
}

/* Action buttons in admin */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== FORMULARZ EDYCJI ===== */
.edit-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    animation: slideDown 0.3s ease;
}

.edit-form h3 {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-form h3 i {
    color: #667eea;
}

.edit-form .form-inline {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.edit-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.edit-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit-form .form-group input,
.edit-form .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e8ecf1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
    font-family: inherit;
}

.edit-form .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.edit-form .form-group input:focus,
.edit-form .form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-form .form-group:last-child {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.edit-form .form-group:last-child .btn {
    padding: 10px 20px;
}

/* Entries header admin */
.entries-header-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.entries-header-admin h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e8ecf1;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e8ecf1;
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.filter-btn.has-items {
    border-color: #ffc107;
    background: #fff3cd;
}

.filter-btn.active.has-items {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.filter-btn i {
    font-size: 14px;
}

/* Settings */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-bottom: 10px;
}

.settings-section .setting-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f2f5;
}

.settings-section .setting-item:last-child {
    border-bottom: none;
}

.settings-section .setting-label {
    flex: 1;
}

.settings-section .setting-label strong {
    display: block;
    font-size: 15px;
    color: #333;
}

.settings-section .setting-label span {
    font-size: 13px;
    color: #888;
}

.settings-section .setting-control {
    flex-shrink: 0;
}

.status-info {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.status-info.active {
    background: #d4edda;
    color: #155724;
}

.status-info.inactive {
    background: #f8d7da;
    color: #721c24;
}

.btn-save-settings {
    margin-top: 15px;
    padding: 10px 30px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 10px;
    vertical-align: middle;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: #28a745;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Banned words */
.banned-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.banned-word {
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e8ecf1;
    font-size: 14px;
}

.banned-word form {
    display: inline;
}

/* Add user form */
.add-user-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.add-user-form h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.form-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.form-inline input,
.form-inline select {
    padding: 10px 15px;
    border: 2px solid #e8ecf1;
    border-radius: 8px;
    font-size: 14px;
    flex: 1;
    min-width: 150px;
}

.form-inline input:focus,
.form-inline select:focus {
    border-color: #667eea;
    outline: none;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e8ecf1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.modal-header h3 i {
    color: #667eea;
}

.modal-close {
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
    background: none;
    border: none;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #666;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.modal-body .form-group input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e8ecf1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.modal-body .form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    max-width: 420px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin: 10px 0 5px;
}

.login-header p {
    color: #888;
    font-size: 14px;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-info {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
}

.login-info i {
    color: #667eea;
}

/* ============================================ */
/* ===== RESPONSIVE ===== */
/* ============================================ */

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .left-column { order: 2; }
    .right-column { order: 1; }
}

@media (max-width: 768px) {
    .container { padding: 10px; }
    
    header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .header-left {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
    }
    .header-subtitle {
        padding-left: 0;
        border-left: none;
    }
    .header-actions {
        justify-content: center;
        width: 100%;
    }
    
    .btn { font-size: 13px; padding: 8px 16px; }
    .stats-banner { grid-template-columns: 1fr; }
    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    
    .entries-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .entries-header-admin {
        flex-direction: column;
        align-items: stretch;
    }
    .entries-controls { justify-content: space-between; }
    
    .entries-table th,
    .entries-table td { padding: 8px 10px; font-size: 13px; }
    
    .col-content { width: 30%; }
    .col-content .content-preview { max-width: 120px; font-size: 12px; }
    .col-name { width: 12%; }
    .col-callsign { width: 12%; }
    .col-date { width: 20%; }
    
    .admin-tabs { justify-content: center; }
    .tab { font-size: 12px; padding: 8px 12px; }
    
    .form-inline {
        flex-direction: column;
    }
    .form-inline input,
    .form-inline select {
        width: 100%;
        min-width: unset;
    }
    .filter-buttons { justify-content: center; }
    
    .edit-form .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .edit-form .form-group { min-width: unset; }
    .edit-form .form-group:last-child {
        flex-direction: row;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .entries-table { font-size: 12px; }
    .entries-table th,
    .entries-table td { padding: 6px 8px; }
    
    .col-content { width: 25%; }
    .col-content .content-preview { max-width: 80px; font-size: 11px; }
    .col-name { width: 10%; }
    .col-callsign { width: 10%; }
    .col-date { width: 18%; font-size: 11px; }
    
    .badge { font-size: 10px; padding: 2px 8px; }
    .pagination a {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
    .qr-container img { max-width: 150px; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .login-box { padding: 25px; }
    .stat-item .stat-number { font-size: 22px; }
    .filter-buttons { flex-direction: column; }
    .filter-btn { justify-content: center; }
    .col-id { width: 30px; }
    .entry-date {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .entry-time { margin-left: 0; }
}