/* BrainDump - Responsive Design */
/* Same theme as Worklog for consistency */

:root {
    --bg-primary: #1a1412;
    --bg-secondary: #231c18;
    --bg-card: #2a2320;
    --bg-input: #1f1916;
    --border: #3d3330;
    --border-light: #4a3f3a;
    --accent: #d97706;
    --accent-hover: #f59e0b;
    --purple: #7c3aed;
    --purple-light: #a855f7;
    --text-primary: #f5f5f5;
    --text-secondary: #d4a574;
    --text-muted: #8a7a70;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --sidebar-width: 260px;
    --header-height: 60px;
    --bottom-nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ==================== LOGIN SCREEN ==================== */
.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-logo {
    font-size: 64px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.remember-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.login-btn {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: var(--error);
    font-size: 14px;
    margin-top: 16px;
    min-height: 20px;
}

/* ==================== MAIN APP LAYOUT ==================== */
.main-app {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ==================== SIDEBAR (Desktop) ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.status-dot.offline {
    background: var(--error);
}

.status-dot.pending {
    background: var(--warning);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    color: white;
}

.sidebar-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.logout-btn:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    padding-bottom: 24px;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ==================== MOBILE HEADER ==================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
}

.mobile-header h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pending-badge {
    background: var(--warning);
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ==================== BOTTOM NAV (Mobile) ==================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s;
    cursor: pointer;
}

.bottom-nav .nav-item .nav-icon {
    font-size: 22px;
}

.bottom-nav .nav-item.active {
    color: var(--accent);
}

/* ==================== VIEWS ==================== */
.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    margin-bottom: 24px;
}

.view-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.view-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* ==================== CONTENT GRID (New Entry) ==================== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.entry-card {
    padding: 24px;
}

/* ==================== ENTRY FORM ==================== */
.entry-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

/* ==================== TAG SELECTOR ==================== */
.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tag-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.tag-chip.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ==================== ATTACHMENT BUTTONS ==================== */
.attachment-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.attach-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-input);
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.attach-btn:hover {
    border-color: var(--accent);
    border-style: solid;
    color: var(--text-primary);
    background: var(--bg-card);
}

.attach-btn .attach-icon {
    font-size: 20px;
}

/* ==================== FILE LIST ==================== */
.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.file-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

.file-item .remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    line-height: 1;
}

.file-item .remove-file:hover {
    color: var(--error);
}

/* ==================== SUBMIT BUTTON ==================== */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 18px;
}

/* ==================== QUICK STATS PANEL ==================== */
.stats-panel {
    position: sticky;
    top: 24px;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-input);
    border-radius: 8px;
}

.mini-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.mini-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.mini-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.mini-entry {
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
}

.mini-entry-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mini-entry-content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== ENTRIES GRID ==================== */
.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.entry-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.entry-card-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.entry-type-badge {
    padding: 4px 10px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.entry-type-badge.photo {
    background: var(--purple);
}

.entry-type-badge.link {
    background: var(--info);
}

.entry-type-badge.thought {
    background: var(--success);
}

.entry-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.entry-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-content a {
    color: var(--accent);
    text-decoration: none;
}

.entry-content a:hover {
    text-decoration: underline;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.entry-tag {
    padding: 3px 8px;
    background: var(--bg-input);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.entry-attachment {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.entry-attachment img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

/* ==================== SEARCH ==================== */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-input-row {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
}

.search-btn {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    background: var(--accent-hover);
}

.search-filters {
    display: flex;
    gap: 12px;
}

.form-select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
}

#searchResults {
    margin-top: 24px;
}

/* ==================== STATISTICS ==================== */
#statsContent {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stats-breakdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    width: 100px;
    font-weight: 500;
    color: var(--text-primary);
}

.breakdown-bar {
    flex: 1;
    height: 24px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple) 0%, var(--purple-light) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.breakdown-count {
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==================== SETTINGS ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.vault-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 14px;
}

.vault-status .status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
}

.vault-status.disconnected .status-indicator {
    background: var(--error);
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 14px;
}

.settings-item.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.settings-item.clickable:hover {
    background: var(--bg-secondary);
}

.settings-item.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.settings-item .arrow {
    color: var(--text-muted);
}

.tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
}

.tag-item .remove-tag {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
}

.tag-item .remove-tag:hover {
    color: var(--error);
}

.add-row {
    display: flex;
    gap: 8px;
}

.add-row .form-input {
    flex: 1;
}

.add-btn {
    padding: 12px 20px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:hover {
    background: var(--accent-hover);
}

.offline-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.offline-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-secondary {
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
}

.btn-primary {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.3s;
    z-index: 150;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success);
    color: var(--success);
}

.toast.error {
    border-color: var(--error);
    color: var(--error);
}

.toast.info {
    border-color: var(--info);
    color: var(--info);
}

.toast.warning {
    border-color: var(--warning);
    color: var(--warning);
}

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted);
}

/* ==================== DESKTOP ONLY ==================== */
.desktop-only {
    display: block;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet - hide quick stats panel */
@media (max-width: 1100px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .desktop-only {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: calc(var(--header-height) + 16px);
        padding-bottom: calc(var(--bottom-nav-height) + 16px);
    }

    .mobile-header {
        display: flex;
    }

    .bottom-nav {
        display: flex;
    }

    .view-header {
        margin-bottom: 16px;
    }

    .view-title {
        font-size: 20px;
    }

    .card {
        padding: 16px;
    }

    .entry-card {
        padding: 16px;
    }

    .entries-grid {
        grid-template-columns: 1fr;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .toast {
        bottom: calc(var(--bottom-nav-height) + 16px);
    }

    .attachment-buttons {
        gap: 8px;
    }

    .attach-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .mini-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .mini-stat {
        padding: 10px 4px;
    }

    .mini-stat-value {
        font-size: 20px;
    }

    .tag-chip {
        padding: 6px 12px;
        font-size: 13px;
    }

    .attach-btn {
        flex-direction: column;
        gap: 4px;
        padding: 12px 8px;
    }

    .attach-btn span:not(.attach-icon) {
        font-size: 11px;
    }

    .stats-overview {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 28px;
    }
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
    .main-app {
        min-height: -webkit-fill-available;
    }

    .login-screen {
        min-height: -webkit-fill-available;
    }
}
