/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: #334155;
    --sidebar-width: 260px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.login-container h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-container .subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-message {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Main App Layout */
#main-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.logo-small {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-item.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    border-right: 3px solid var(--accent);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    background: var(--bg-primary);
}

.page {
    max-width: 1200px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.signups {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

.stat-icon.downloads {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.stat-icon.version {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Recent Section */
.recent-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.recent-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.recent-item-email {
    font-weight: 500;
}

.recent-item-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Table */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr {
    border-bottom: 1px solid var(--border);
}

.data-table tr:last-child {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

/* Releases */
.releases-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.release-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.release-header:hover {
    background: var(--bg-tertiary);
}

.release-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.release-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.release-card.expanded .release-toggle-icon {
    transform: rotate(90deg);
}

.release-version {
    font-size: 1.125rem;
    font-weight: 600;
}

.release-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.release-summary {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0 1.5rem 1rem 3rem;
}

.release-details {
    display: none;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
}

.release-card.expanded .release-details {
    display: block;
}

.release-notes {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.release-notes h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
}

.release-notes h4:first-child {
    margin-top: 0;
}

.release-notes ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.release-notes li {
    margin: 0.25rem 0;
}

.release-notes p {
    margin: 0.5rem 0;
}

.no-notes {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem 0;
}

.release-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Loading */
.loading {
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
}

/* Danger/Delete Button */
.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    padding: 0.5rem;
    min-width: auto;
}

/* Actions column */
.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.actions-cell.actions-horizontal {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 1rem;
}

/* Lock body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

.modal h3 {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-shrink: 0;
    padding-top: 1rem;
}

/* Chart Container */
.chart-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

.badge-info {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    cursor: help;
}

/* Log Notes */
.log-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(168, 85, 247, 0.1);
    border-left: 3px solid #a855f7;
    border-radius: 4px;
    font-size: 0.875rem;
    width: 100%;
}

.log-notes strong {
    color: #a855f7;
}

/* Spinning animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Log Viewer */
.log-viewer-modal {
    max-width: 90vw;
    width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.log-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.log-viewer-header h3 {
    margin: 0;
}

.log-viewer-actions {
    display: flex;
    gap: 0.5rem;
}

.log-viewer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.log-viewer-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.log-viewer-notes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.log-viewer-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.log-viewer-filters label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.log-viewer-filters input[type="checkbox"] {
    cursor: pointer;
}

.log-viewer-content {
    flex: 1;
    overflow-y: auto;
    background: #0d1117;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    max-height: 60vh;
}

.log-line {
    display: flex;
    gap: 0.75rem;
    padding: 0.125rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.log-line:hover {
    background: rgba(255,255,255,0.05);
}

.log-timestamp {
    color: #7d8590;
    white-space: nowrap;
    min-width: 180px;
}

.log-level {
    min-width: 50px;
    font-weight: 600;
}

.log-level-debug { color: #8b949e; }
.log-level-info { color: #58a6ff; }
.log-level-warn { color: #d29922; }
.log-level-error { color: #f85149; }
.log-level-fatal { color: #ff7b72; background: rgba(248, 81, 73, 0.2); padding: 0 0.25rem; border-radius: 2px; }

.log-message {
    color: #e6edf3;
    word-break: break-word;
}

.log-line.hidden {
    display: none;
}

/* Log viewer flex layout helpers */
.log-viewer-header,
.log-viewer-meta,
.log-viewer-notes,
.log-viewer-filters {
    flex-shrink: 0;
}

.logs-filters {
    display: flex;
    gap: 0.75rem;
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

/* Form Check */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.form-check label {
    cursor: pointer;
}

/* Badge Variants */
.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Success Button */
.btn-success {
    background: #22c55e;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #16a34a;
}

/* Feedback Detail */
.feedback-detail {
    padding: 1rem;
}

.feedback-meta {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.feedback-meta p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feedback-message {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
}

.feedback-message strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feedback-message p {
    margin: 0;
    white-space: pre-wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Feedback Screenshot */
.feedback-screenshot {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.feedback-screenshot strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.screenshot-container {
    margin: 0.5rem 0;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.screenshot-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.screenshot-preview:hover {
    opacity: 0.85;
}

.screenshot-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Feedback Actions Bar */
.feedback-actions-bar {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.feedback-actions-bar .btn svg {
    vertical-align: middle;
    margin-right: 4px;
}

/* Small spinner for button loading states */
.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fullscreen Image Viewer */
.image-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-fullscreen-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
}

.image-fullscreen-container img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.image-fullscreen-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.image-fullscreen-close:hover {
    opacity: 1;
}

/* Actions Horizontal */
.actions-horizontal {
    display: flex;
    gap: 0.25rem;
}

/* Version Pills (Heartbeat tracking) */
.version-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.version-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 999px;
    font-size: 0.875rem;
}

.version-name {
    color: var(--text-primary);
    font-weight: 500;
}

.version-count {
    background: var(--accent);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Section Description */
.section-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Text Muted */
.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Header Actions (replaces inline styles) */
.page-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Filter Input (replaces inline width styles) */
.filter-input {
    width: 200px;
}

/* Mobile Header Bar */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--bg-tertiary);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 299;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }

    .stats-grid {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile header visible */
    .mobile-header {
        display: flex;
    }

    /* Off-canvas sidebar */
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 300;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    #main-app {
        flex-direction: column;
    }

    /* Stats grid 2-col */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Compact stat cards */
    .stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Recent signups stack on mobile */
    .recent-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .recent-item-date {
        font-size: 0.75rem;
    }

    /* Page header stacks */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn {
        flex: 1;
    }

    /* Standalone buttons in page-header full-width */
    .page-header > .btn {
        width: 100%;
    }

    /* Data tables scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        white-space: nowrap;
        padding: 0.75rem 1rem;
    }

    /* Chart height reduced */
    .chart-container {
        height: 220px;
    }

    /* Filters full-width */
    .filter-input {
        width: 100%;
    }

    .logs-filters {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    /* Log viewer overlay - no padding for true fullscreen */
    #log-viewer-modal {
        padding: 0;
    }

    /* Log viewer fullscreen - use 100% not 100vh to avoid mobile browser chrome overflow */
    .log-viewer-modal {
        max-width: 100%;
        width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
        padding: 0.75rem;
    }

    /* Log viewer header stacks on mobile */
    .log-viewer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .log-viewer-actions {
        width: 100%;
    }

    /* Compact meta on mobile */
    .log-viewer-meta {
        gap: 0.5rem 1rem;
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .log-viewer-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .log-viewer-filters input[type="text"] {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Log viewer content fills remaining space on mobile */
    .log-viewer-content {
        max-height: none;
        min-height: 0;
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    /* Hide timestamps on mobile - too wide for small screens */
    .log-timestamp {
        display: none;
    }

    .log-line {
        gap: 0.5rem;
    }

    .log-level {
        min-width: 40px;
        font-size: 0.75rem;
    }

    /* Modals wider */
    .modal {
        width: 95%;
    }

    /* Release cards */
    .release-summary {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .release-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    /* Ultra-compact stat cards: hide icons, fit 2-3 per row */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .stat-icon {
        display: none;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .page-header-actions {
        flex-direction: column;
    }

    .page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .release-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .release-header-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Log viewer tighter on small phones */
    .log-viewer-modal {
        padding: 0.5rem;
    }

    .log-viewer-header h3 {
        font-size: 1rem;
    }
}
