/* ══════════════════════════════════════════════════════════════════════
   SC-Field-Collector Dashboard — Dark Theme
   ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────────────── */
:root {
    --bg-primary: #0b0f1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --bg-sidebar: #0f1629;
    --bg-input: rgba(15, 23, 42, 0.8);

    --border: rgba(148, 163, 184, 0.08);
    --border-hover: rgba(148, 163, 184, 0.15);
    --border-focus: rgba(56, 189, 248, 0.4);

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.15);

    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --amber: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.1);
    --purple: #a78bfa;
    --purple-bg: rgba(167, 139, 250, 0.1);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);

    --sidebar-width: 260px;
    --topbar-height: 64px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── Login Page ─────────────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.06), transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.05), transparent 50%),
        var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    animation: fadeSlideUp 0.5s ease;
}

.login-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 2rem;
}

.login-card .error-msg {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--red);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ─── Forms ──────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.93rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-transform: none;
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #0284c7);
    color: #fff;
    width: 100%;
    padding: 0.85rem;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #0369a1);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.15);
    border-color: var(--border-hover);
}

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
}

/* ─── Layout: Sidebar + Content ──────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header .app-version {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.8rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 400;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 500;
}

.nav-link .nav-icon {
    font-size: 1.1rem;
    width: 1.2rem;
    text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.user-meta .user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-meta .user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ─── Main Content ───────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Top bar */
.topbar {
    height: var(--topbar-height);
    padding: 0 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(11, 15, 26, 0.6);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    margin: 0 0.2rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
}

/* Page content */
.page-content {
    padding: 2rem;
}

/* ─── Stats Cards Grid ───────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.blue::before {
    background: linear-gradient(90deg, var(--accent), #0284c7);
}

.stat-card.green::before {
    background: linear-gradient(90deg, var(--green), #16a34a);
}

.stat-card.amber::before {
    background: linear-gradient(90deg, var(--amber), #d97706);
}

.stat-card.purple::before {
    background: linear-gradient(90deg, var(--purple), #7c3aed);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.stat-card .stat-icon {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Section Headers ────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* ─── Tables ─────────────────────────────────────────────────────────── */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.table-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    flex: 1;
    max-width: 350px;
}

.table-search input {
    border: none;
    background: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    flex: 1;
}

.table-search .search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.table-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-filters select {
    padding: 0.5rem 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    cursor: default;
}

thead th.sortable {
    cursor: pointer;
}

thead th.sortable:hover {
    color: var(--accent);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(148, 163, 184, 0.03);
}

tbody td {
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

tbody td:first-child {
    color: var(--text-primary);
}

.table-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.table-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.5;
}

.table-empty p {
    font-size: 0.9rem;
}

/* ─── Pagination ─────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pagination-info {}

.pagination-links {
    display: flex;
    gap: 0.3rem;
}

.pagination-links a,
.pagination-links span {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    transition: var(--transition);
}

.pagination-links a:hover {
    background: rgba(148, 163, 184, 0.06);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pagination-links .current {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 500;
}

/* ─── Badges / Tags ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-none {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

.badge-admin {
    background: var(--purple-bg);
    color: var(--purple);
}

.badge-editor {
    background: var(--amber-bg);
    color: var(--amber);
}

.badge-viewer {
    background: var(--green-bg);
    color: var(--green);
}

.badge-type {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.78rem;
}

/* ─── Event Detail ───────────────────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.detail-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 1rem;
}

.detail-value {
    font-size: 0.88rem;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

.detail-text {
    padding: 0.8rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ─── Action Bar ─────────────────────────────────────────────────────── */
.action-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

/* ─── Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow);
    animation: fadeSlideUp 0.3s ease;
}

.modal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ─── Alerts ─────────────────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: var(--green-bg);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--green);
}

.alert-error {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red);
}

.alert-warning {
    background: var(--amber-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--amber);
}

/* ─── Animations ─────────────────────────────────────────────────────── */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-in {
    animation: fadeSlideUp 0.4s ease both;
}

/* Staggered card animation */
.stats-grid .stat-card:nth-child(1) {
    animation: fadeSlideUp 0.4s ease 0.0s both;
}

.stats-grid .stat-card:nth-child(2) {
    animation: fadeSlideUp 0.4s ease 0.08s both;
}

.stats-grid .stat-card:nth-child(3) {
    animation: fadeSlideUp 0.4s ease 0.16s both;
}

.stats-grid .stat-card:nth-child(4) {
    animation: fadeSlideUp 0.4s ease 0.24s both;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .page-content {
        padding: 1.2rem;
    }

    .topbar {
        padding: 0 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search {
        max-width: 100%;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        padding: 0.8rem;
        margin-bottom: 0.5rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border) !important;
    }

    tbody td {
        padding: 0.3rem 0;
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
    }

    tbody td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        font-size: 0.78rem;
        text-transform: uppercase;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Utility ────────────────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.gap-1 {
    gap: 0.5rem;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.rtl {
    direction: rtl;
    text-align: right;
}

/* ─── Edit History Timeline ──────────────────────────────────────────── */
.edit-history-timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.edit-history-timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 0;
    left: 7px;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}

.edit-history-entry {
    position: relative;
    margin-bottom: 2rem;
}

.edit-history-entry:last-child {
    margin-bottom: 0;
}

.edit-history-entry::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -1.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--bg-card);
    z-index: 2;
}

.edit-history-entry .entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.edit-history-entry .entry-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.edit-history-entry .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}

.edit-history-entry .user-meta {
    display: flex;
    flex-direction: column;
}

.edit-history-entry .user-meta strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.edit-history-entry .user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.edit-history-entry .entry-time {
    font-size: 0.75rem;
    background: rgba(148, 163, 184, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    color: var(--text-secondary);
}

.edit-history-entry .entry-changes {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.changes-table {
    width: 100%;
    border-collapse: collapse;
}

.changes-table th, 
.changes-table td {
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.changes-table th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.changes-table tr:last-child th,
.changes-table tr:last-child td {
    border-bottom: none;
}

.changes-table .field-name {
    width: 25%;
    font-weight: 500;
    color: var(--text-secondary);
}

.changes-table .old-value {
    width: 37.5%;
    color: var(--red);
    background: rgba(239, 68, 68, 0.03);
    text-decoration: line-through;
    opacity: 0.8;
}

.changes-table .new-value {
    width: 37.5%;
    color: var(--green);
    background: rgba(34, 197, 94, 0.03);
}

@media (max-width: 768px) {
    .edit-history-entry .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .changes-table, 
    .changes-table tbody, 
    .changes-table tr, 
    .changes-table th, 
    .changes-table td {
        display: block;
    }
    
    .changes-table thead {
        display: none;
    }
    
    .changes-table tr {
        border-bottom: 1px solid var(--border);
        padding: 0.5rem;
    }
    
    .changes-table .field-name,
    .changes-table .old-value,
    .changes-table .new-value {
        width: 100%;
        padding: 0.3rem;
        border: none;
    }
    
    .changes-table .field-name {
        font-weight: 600;
        color: var(--accent);
        margin-bottom: 0.2rem;
    }
    
    .changes-table .old-value::before {
        content: "Old: ";
        color: var(--text-muted);
        text-decoration: none;
        display: inline-block;
        width: 35px;
    }
    
    .changes-table .new-value::before {
        content: "New: ";
        color: var(--text-muted);
        display: inline-block;
        width: 35px;
    }
}