:root {
    --bg-dark: #070a13; --panel-bg: rgba(13, 18, 30, 0.7); --border: rgba(255, 255, 255, 0.08);
    --primary: #4f46e5; --primary-light: #818cf8; --secondary: #0ea5e9;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glow-primary: 0 8px 25px rgba(79, 70, 229, 0.4);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; position: relative; font-size: 16px; }

.aurora-bg { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; z-index: 1; background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.07), transparent 50%), radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.06), transparent 40%); animation: rotateAurora 40s linear infinite; }
@keyframes rotateAurora { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spin { 100% { transform: rotate(360deg); } } .spin { animation: spin 1s linear infinite; }

#login-layout { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(25px); transition: opacity 0.5s ease, transform 0.5s ease; }
.login-wrapper { position: relative; padding: 2px; border-radius: 28px; background: linear-gradient(135deg, rgba(79,70,229,0.5), transparent 50%, rgba(14,165,233,0.5)); overflow: hidden; animation: floatUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; box-shadow: 0 0 40px rgba(79,70,229,0.2); }
@keyframes floatUp { 0% { transform: translateY(30px) scale(0.95); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.login-box { background: rgba(10, 15, 24, 0.98); padding: 50px 45px; border-radius: 26px; width: 100%; min-width: 420px; text-align: center; position: relative; z-index: 2; box-shadow: inset 0 0 20px rgba(0,0,0,0.8); }

.premium-logo-container { margin: 0 auto 20px auto; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; position: relative; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 20px; box-shadow: 0 10px 30px rgba(79, 70, 229, 0.5); }
.premium-logo-svg { color: white; width: 44px; height: 44px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)); }

.login-title { font-size: 28px; font-weight: 700; margin-bottom: 6px; color: white; letter-spacing: -0.5px; }
.login-subtitle { font-size: 14px; color: var(--primary-light); margin-bottom: 35px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }

.input-group { margin-bottom: 24px; text-align: left; position: relative; }
.input-group label { display: block; margin-bottom: 8px; font-size: 15px; color: var(--text-muted); font-weight: 600; }
.modern-input { width: 100%; padding: 18px 20px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; color: #fff; font-size: 16px; outline: none; transition: 0.3s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); }
.modern-input:focus { border-color: var(--primary); background: rgba(0,0,0,0.6); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2), inset 0 2px 4px rgba(0,0,0,0.2); }

/* YENİ: BENİ HATIRLA KUTUCUĞU TASARIMI */
.remember-me-container { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; justify-content: flex-start; }
.remember-me-container input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.remember-me-container label { color: var(--text-muted); font-size: 15px; cursor: pointer; user-select: none; margin: 0; font-weight: 500; }

.btn-primary { width: 100%; padding: 18px; margin-top: 5px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none; border-radius: 14px; color: white; font-weight: 600; font-size: 17px; letter-spacing: 0.5px; cursor: pointer; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: var(--glow-primary); text-transform: uppercase; }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 30px rgba(79, 70, 229, 0.4); }

#dashboard-layout { display: none; width: 100%; height: 100%; position: relative; z-index: 10; opacity: 0; transition: opacity 0.6s ease; flex-direction: row; }
.sidebar { width: 290px; height: 100%; background: var(--panel-bg); backdrop-filter: blur(24px); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.logo-area { padding: 30px 24px; display: flex; align-items: center; gap: 14px; }
.logo-circle { width: 44px; height: 44px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 14px; display: flex; align-items: center; justify-content: center; box-shadow: var(--glow-primary); }
.logo-text { font-weight: 700; font-size: 22px; color: var(--text-main); letter-spacing: -0.5px; }

.nav-list { padding: 0 16px; list-style: none; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item { padding: 16px 18px; border-radius: 12px; display: flex; align-items: center; gap: 14px; color: var(--text-muted); cursor: pointer; transition: var(--transition); font-weight: 500; font-size: 17px; border: 1px solid transparent; }
.nav-item:hover { background: var(--glass-hover); color: var(--text-main); transform: translateX(4px); }
.nav-item.active { background: rgba(79, 70, 229, 0.15); color: var(--text-main); border-color: rgba(79, 70, 229, 0.3); font-weight: 600; text-shadow: 0 1px 5px rgba(79, 70, 229, 0.5); }

.main-content { flex: 1; height: 100%; display: flex; flex-direction: column; position: relative; min-width: 0; overflow: hidden; }
.tab-content { display: none; height: 100%; width: 100%; animation: slideUpFade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; overflow-y: auto; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.tab-content.active { display: flex; flex-direction: column; }

.chat-container { display: flex !important; width: 100%; height: 100%; flex-direction: row !important; padding: 0 !important; overflow: hidden; }
.friends-list { width: 330px; height: 100%; border-right: 1px solid var(--border); background: rgba(10, 15, 24, 0.4); display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; position: static; transform: none !important; opacity: 1 !important; pointer-events: auto !important; }
.chat-view { flex: 1; height: 100%; display: flex; flex-direction: column; background: rgba(0,0,0,0.15); min-width: 0; position: static; transform: none !important; box-shadow: none !important; }

.friend-item { padding: 18px 24px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: var(--transition); border-left: 3px solid transparent; position: relative; }
.friend-item:hover { background: rgba(255,255,255,0.02); }
.friend-item.active { background: linear-gradient(90deg, rgba(79, 70, 229, 0.15), transparent); border-left-color: var(--primary); }
.avatar { width: 48px; height: 48px; border-radius: 14px; background: var(--glass-hover); display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid var(--border); flex-shrink: 0;}
.status-dot { position: absolute; bottom: -2px; right: -2px; width: 13px; height: 13px; background: #10b981; border: 2px solid var(--bg-dark); border-radius: 50%; }

.unread-badge { background: #ef4444; color: white; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 12px; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4); animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.chat-header { padding: 20px 30px; border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; background: rgba(13, 18, 30, 0.6); flex-shrink: 0; }
.messages-area { flex: 1; overflow-y: auto; padding: 30px; display: flex; flex-direction: column; gap: 20px; scroll-behavior: smooth; }

.message-bubble { max-width: 65%; padding: 16px 22px; font-size: 17px !important; font-weight: 500; line-height: 1.5; position: relative; animation: slideUpFade 0.3s ease-out; word-wrap: break-word; color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.message-received { align-self: flex-start; background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 20px 20px 20px 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.message-sent { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--secondary)); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px 20px 4px 20px; box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4); }
.message-time { font-size: 12.5px; opacity: 0.8; margin-top: 8px; text-align: right; font-weight: 400; text-shadow: none; }

.file-attachment { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.15); padding: 12px; border-radius: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: var(--transition); }
.file-attachment:hover { background: rgba(0,0,0,0.4); border-color: #ffffff; transform: translateY(-1px); }
.download-btn-quick { position: absolute; top: 12px; right: 42px; background: rgba(0,0,0,0.7); border-radius: 8px; padding: 4px; color: #fff; cursor: pointer; transition: 0.2s; z-index: 5; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.download-btn-quick:hover { background: #10b981; transform: scale(1.1); }
.chat-download-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); border-radius: 10px; color: white; transition: 0.2s; text-decoration: none; margin-bottom: 8px; flex-shrink: 0; }
.chat-download-btn:hover { background: #10b981; transform: scale(1.05); }

.input-bar { padding: 20px 30px; display: flex; align-items: center; gap: 16px; background: rgba(13, 18, 30, 0.8); backdrop-filter: blur(10px); border-top: 1px solid var(--border); flex-shrink: 0; }
.action-btn { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--border); background: var(--glass-hover); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); color: #fff; flex-shrink:0; }
.action-btn:hover { border-color: var(--primary); background: rgba(79, 70, 229, 0.2); }
.message-input { flex: 1; height: 54px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 16px; padding: 0 20px; color: white; outline: none; transition: var(--transition); font-size: 16.5px; min-width: 0; }
.message-input:focus { border-color: var(--primary); background: rgba(0,0,0,0.5); }

.menu-trigger { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.7); border-radius: 8px; padding: 4px; color: #fff; cursor: pointer; transition: 0.2s; z-index: 5; }
.menu-trigger:hover { background: var(--primary); }
.action-menu { display: none !important; position: absolute; top: 44px; right: 12px; background: rgba(18, 24, 38, 0.95); backdrop-filter: blur(15px); border: 1px solid var(--border); border-radius: 10px; flex-direction: column; z-index: 20; box-shadow: 0 15px 35px rgba(0,0,0,0.6); min-width: 170px; overflow: hidden; }
.action-menu.show { display: flex !important; animation: slideDownFast 0.2s ease; }
.action-menu-item { padding: 12px 16px; font-size: 15px; display: flex; align-items: center; gap: 10px; color: var(--text-main); transition: 0.2s; cursor: pointer; border-left: 2px solid transparent; }
.action-menu-item:hover { background: rgba(255,255,255,0.08); border-left-color: var(--primary); }
.action-menu-item.danger:hover { background: rgba(239, 68, 68, 0.1); border-left-color: #ef4444; color: #ef4444; }

.item-checkbox { position: absolute; top: 16px; left: 14px; z-index: 5; width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); display: none; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.folder-item:hover .item-checkbox, .item-checkbox:checked { display: block; }
.folder-item.selected { border-color: var(--primary); background: rgba(79, 70, 229, 0.15); box-shadow: 0 0 0 3px rgba(79,70,229,0.3); }

.bulk-bar { display: none; justify-content: space-between; align-items: center; background: rgba(79, 70, 229, 0.1); border: 1px solid var(--primary); border-radius: 12px; padding: 12px 20px; margin-bottom: 15px; animation: slideDownFast 0.3s ease; flex-wrap: wrap; gap: 10px; }
.bulk-bar.active { display: flex; }

.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; margin-top: 20px; padding-bottom: 40px; }
.folder-item { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 16px; padding: 25px 15px; text-align: center; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; }
.folder-item:hover { background: rgba(79, 70, 229, 0.1); border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.folder-icon { width: 52px; height: 52px; color: var(--secondary); margin-bottom: 15px; transition: var(--transition); }
.folder-item:hover .folder-icon { transform: scale(1.1); color: var(--primary-light); }
.folder-name { font-weight: 600; font-size: 16px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search-box { display: flex; align-items: center; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; width: 100%; max-width: 320px; transition: var(--transition); }
.search-box:focus-within { border-color: var(--primary); background: rgba(0,0,0,0.5); }
.search-box input { background: transparent; border: none; color: white; outline: none; margin-left: 10px; width: 100%; font-size: 15px; font-family: 'Outfit', sans-serif; }
.breadcrumb-nav { display: flex; align-items: center; gap: 8px; font-size: 16.5px; color: var(--text-muted); cursor: pointer; transition: 0.2s; flex-wrap: wrap;}
.breadcrumb-nav span:hover { color: white; text-decoration: underline; }
.breadcrumb-nav .active { color: white; font-weight: 600; text-decoration: none; cursor: default; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.gallery-item { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: var(--transition); position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s ease; border-radius: 11px; }
.gallery-item:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.gallery-item.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4); }
.gallery-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px 12px 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.95)); font-size: 14.5px; font-weight: 500; color: #fff; border-bottom-left-radius: 11px; border-bottom-right-radius: 11px; pointer-events: none; }
.gallery-item:hover .item-checkbox, .gallery-item .item-checkbox:checked { display: block; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 20px; }
.settings-card { background: rgba(18, 24, 38, 0.4); border: 1px solid var(--border); border-radius: 16px; padding: 30px; transition: var(--transition); position: relative; overflow: hidden; }
.settings-card:hover { border-color: rgba(255,255,255,0.1); background: rgba(18, 24, 38, 0.7); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

.permission-list { max-height: 250px; overflow-y: auto; background: rgba(0,0,0,0.3); border-radius: 12px; border: 1px solid var(--border); padding: 10px; margin-top: 10px; }
.perm-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.perm-item:last-child { border-bottom: none; }
.perm-item label { flex: 1; cursor: pointer; font-size: 15px; color: var(--text-main); }
.perm-item input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); display: none; align-items: center; justify-content: center; z-index: 2000; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-box { background: rgba(13,18,30, 0.95); border: 1px solid var(--border); border-radius: 20px; padding: 35px; width: 100%; max-width: 440px; box-shadow: 0 25px 50px rgba(0,0,0,0.6); transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal-overlay.active .modal-box { transform: translateY(0); }

#viewer-container { position: absolute; top: 20px; right: 20px; width: 650px; height: 600px; background: rgba(10, 15, 24, 0.85); border-radius: 20px; border: 1px solid var(--border); backdrop-filter: blur(25px); overflow: hidden; z-index: 500; box-shadow: 0 30px 60px rgba(0,0,0,0.7); opacity: 0; transform: scale(0.95) translateY(10px); pointer-events: none; transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
#viewer-container.active { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
#viewer-container.fullscreen { width: calc(100% - 40px) !important; height: calc(100% - 40px) !important; top: 20px !important; right: 20px !important; border-radius: 16px; }
#viewer-container.minimized { height: 55px !important; width: 300px !important; transform: scale(1) translateY(0); }
#viewer-container.minimized #three-canvas, #viewer-container.minimized .viewer-model-panel { display: none !important; }
.viewer-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600; }
.viewer-controls { display: flex; gap: 14px; align-items: center; }
.viewer-controls i { width: 18px; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.viewer-controls i:hover { color: white; }
#three-canvas { width: 100%; height: calc(100% - 52px); }
.viewer-model-panel { position: absolute; bottom: 20px; left: 20px; width: 240px; max-height: 200px; background: rgba(18, 24, 38, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 12px; padding: 12px; overflow-y: auto; display: none; flex-direction: column; gap: 8px; z-index: 510; }
.viewer-model-item { display: flex; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, 0.04); padding: 10px 14px; border-radius: 8px; font-size: 13px; transition: var(--transition); border: 1px solid transparent; }

.image-viewer-container { display: flex; flex-direction: column; width: 100%; height: 100%; }
.image-viewer-header { padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; background: rgba(10, 15, 24, 0.9); border-bottom: 1px solid var(--border); }
.image-viewer-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; padding: 20px; background: #0a0f18; }
.image-viewer-controls { padding: 20px; display: flex; gap: 15px; justify-content: center; background: rgba(10, 15, 24, 0.9); border-top: 1px solid var(--border); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }

/* MOBİL TASARIM (KESİNLİKLE DOKUNMA) */
.mobile-top-bar { display: none !important; }
.mobile-back-btn { display: none !important; }
#sidebar-overlay { display: none !important; }

@media (max-width: 768px) {
    body, html { overflow: hidden; height: 100%; width: 100%; position: fixed; }
    #dashboard-layout { display: flex !important; flex-direction: column !important; width: 100%; height: 100%; }
    .mobile-top-bar { display: flex !important; justify-content: space-between; align-items: center; padding: 0 20px; height: 65px; background: rgba(10, 15, 24, 0.95); border-bottom: 1px solid var(--border); z-index: 1000; flex-shrink: 0; backdrop-filter: blur(10px); }
    .sidebar { position: fixed; left: -100%; top: 0; bottom: 0; width: 290px; z-index: 2000; transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 10px 0 30px rgba(0,0,0,0.8); }
    .sidebar.active { left: 0; }
    #sidebar-overlay.active { display: block !important; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1999; backdrop-filter: blur(3px); animation: fadeIn 0.3s forwards; }
    @keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
    .main-content { flex: 1; height: calc(100% - 65px); padding: 0 !important; position: relative; overflow: hidden; }
    .tab-content { padding: 15px !important; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; display: none; }
    .tab-content.active { display: block; }
    .chat-container.active { display: block !important; position: relative; width: 100%; height: 100%; overflow: hidden; padding: 0 !important; }
    .friends-list { width: 100%; height: 100%; border: none; z-index: 10; transition: transform 0.3s ease; background: var(--bg-dark); position: absolute !important; top: 0; left: 0; opacity: 1 !important; pointer-events: auto !important; }
    .chat-view { width: 100%; height: 100%; position: absolute !important; top: 0; left: 0; transform: translateX(100%) !important; transition: transform 0.3s ease; z-index: 11; background: var(--bg-dark); box-shadow: -5px 0 25px rgba(0,0,0,0.5) !important; }
    .chat-container.chat-open .friends-list { transform: translateX(-30%) !important; opacity: 0 !important; pointer-events: none !important; }
    .chat-container.chat-open .chat-view { transform: translateX(0) !important; }
    .mobile-back-btn { display: flex !important; align-items: center; justify-content: center; width: 40px; height: 40px; color: white; cursor: pointer; margin-right: 10px; margin-left: -10px; background: rgba(255,255,255,0.1); border-radius: 12px; }
    .chat-header { padding: 15px; }
    .messages-area { padding: 15px; }
    .message-bubble { max-width: 88%; }
    .input-bar { padding: 10px 15px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: rgba(13, 18, 30, 0.95); }
    .action-btn { width: 44px; height: 44px; flex-shrink: 0; }
    .message-input { height: 48px; font-size: 16px; padding: 0 15px; border-radius: 20px; }
    #send-msg-btn { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
    .archive-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .folder-item { padding: 15px 10px; }
    .folder-icon { width: 40px; height: 40px; margin-bottom: 10px; }
    .folder-name { font-size: 14px; }
    #archive-main-view > div:first-child, #gallery-tab > div:first-child { flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 20px; }
    .search-box { max-width: 100%; }
    #patient-detail-view > div:first-child { flex-direction: column; align-items: flex-start; gap: 15px; }
    #patient-detail-view > div:first-child > div:last-child { width: 100%; flex-wrap: wrap; }
    #patient-detail-view button { flex: 1; min-width: calc(50% - 5px); text-align: center; justify-content: center; padding: 12px 0;}
    .bulk-bar { flex-direction: column; text-align: center; }
    .bulk-bar > div { flex-wrap: wrap; justify-content: center; width: 100%; }
    .bulk-bar button { flex: 1; min-width: 45%; }
    .modal-box { width: 95%; padding: 25px 20px; max-height: 90vh; overflow-y: auto; }
    #viewer-container { width: 100% !important; height: 100% !important; top: 0 !important; right: 0 !important; border-radius: 0; z-index: 9999; }
    .login-box { min-width: 90%; width: 90%; padding: 40px 25px; }
}