/* ========================================
   Responsive Design - Mobile First
   ======================================== */

/* Force input area to always display */
.input-area {
    display: flex !important;
    visibility: visible !important;
    position: relative !important;
}

.input-field {
    display: block !important;
    visibility: visible !important;
}

.send-btn {
    display: flex !important;
    visibility: visible !important;
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Sidebar Toggle Button (floating) */
.sidebar-toggle-btn {
    display: none !important;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4CAF50;
    color: white;
    border: none;
    font-size: 24px;
    cursor: move;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 900;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.sidebar-toggle-btn:active {
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.6);
}

.sidebar-toggle-btn[data-is-dragging="true"] {
    transition: none;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
}

/* Show toggle button ONLY when explicitly set to flex by JavaScript */
.sidebar-toggle-btn[style*="display: flex"] {
    display: flex !important;
}

@media (max-width: 768px) {
    /* Mobile: don't force display here, let JS control it */
    .sidebar-toggle-btn {
        position: fixed !important;
        /* bottom and right are set by JavaScript, don't force default values */
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Sidebar Sliding Animation */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 72px;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.active {
        left: 0;
    }
}

/* ========================================
   Tablet & Mobile Breakpoints
   ======================================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .nav {
        padding: 0 20px;
        height: 64px;
    }
    
    .nav-title {
        font-size: 18px;
        padding: 6px 16px;
    }
    
    .nav-menu {
        gap: 6px;
        padding: 4px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    html {
        height: 100%;
        overflow: hidden;
    }
    
    body {
        font-size: 14px;
        height: 100vh;
        overflow: hidden;
        position: relative;
        width: 100%;
    }
    
    /* Navigation */
    .nav {
        padding: 0 16px;
        height: 72px;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
    }

    .nav-logo {
        display: none;
    }

    .nav-logo-link {
        display: none;
    }
    
    .nav-title {
        font-size: 18px;
        padding: 6px 14px;
        flex: 0 0 auto;
        justify-content: center;
        max-width: 200px;
    }
    
    /* Hide desktop menu, show hamburger */
    .nav-menu {
        display: none !important;
        position: fixed !important;
        top: 72px !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        flex-direction: column;
        background: white;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 8px;
        gap: 4px;
        z-index: 997;
        backdrop-filter: none;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu .nav-btn {
        width: 100%;
        text-align: left;
        padding: 14px 16px;
        border-radius: 8px;
        color: var(--text-primary);
        font-size: 15px;
    }
    
    .nav-menu .nav-btn:hover {
        background: var(--bg-secondary);
        transform: none;
        color: var(--text-primary);
    }
    
    .nav-menu .nav-btn.active {
        background: var(--primary-light);
        color: var(--primary);
        box-shadow: none;
    }
    
    .nav-menu .nav-btn.active::before {
        left: 8px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        font-size: 28px;
        width: 48px;
        height: 48px;
    }
    
    .mobile-menu-toggle span {
        line-height: 1;
    }
    
    /* User Avatar */
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar span {
        font-size: 14px;
    }
    
    /* Main Container */
    .main-container {
        height: calc(100vh - 72px);
        padding: 0;
        overflow: hidden;
        display: flex;
        margin-top: 72px !important;
    }
    
    /* Content Area */
    .content {
        width: 100%;
        padding: 0;
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    /* Screen */
    .screen {
        display: none;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .screen.active {
        display: flex;
        flex-direction: column;
    }
    
    /* Chat Window */
    .chat-window {
        height: 100%;
        width: 100%;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        background: white;
    }
    
    /* Chat Tabs */
    .chat-tabs {
        flex-shrink: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 4px !important;
        min-height: 44px !important;
        background: white !important;
        border-bottom: 1px solid var(--border) !important;
    }
    
    .chat-tab-content {
        display: none !important;
        width: 100% !important;
        flex: 1 !important;
        flex-direction: column !important;
        overflow: hidden !important;
        min-height: 0 !important;
        padding-bottom: 80px !important;
        /* Space for fixed input-area */
        position: relative !important;
    }
    
    .chat-tab-content.active {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Messages Area */
    .messages {
        padding: 12px !important;
        padding-bottom: 0 !important;
        /* No bottom padding when example-questions is visible */
        gap: 12px !important;
        flex: 0 0 auto !important;
        /* Don't grow, use auto height when example-questions is visible */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 0 !important;
        background: var(--bg-secondary) !important;
    }
    
    /* When messages has content, allow it to grow */
    .messages:not(:empty) {
        flex: 1 !important;
        padding-bottom: 100px !important;
        /* Extra padding for input area + browser toolbar when messages exist */
    }
    
    /* Example Questions - Mobile */
    .example-questions {
        padding: 16px 12px !important;
        padding-bottom: 100px !important;
        /* Extra padding for input area + browser toolbar */
        background: var(--bg-tertiary) !important;
        border-top: 1px solid var(--border) !important;
        flex: 0 0 auto !important;
        /* Don't grow or shrink, use auto height */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: calc(100vh - 200px) !important;
        /* Increased height (doubled from 50vh to 100vh, minus space for input area and nav) */
        position: relative !important;
        z-index: 1 !important;
        min-height: 0 !important;
        /* Important for flex children to allow scrolling */
    }
    
    .example-questions-title {
        font-size: 13px !important;
        margin-bottom: 12px !important;
        padding: 0 4px !important;
        flex-shrink: 0 !important;
    }
    
    .example-questions-list {
        max-width: 100% !important;
        gap: 10px !important;
        min-height: 0 !important;
        /* Important for scrolling */
    }
    
    .example-question-item {
        padding: 14px 16px !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
        padding-left: 44px !important;
        flex-shrink: 0 !important;
        /* Prevent items from shrinking */
    }
    
    .example-question-item::before {
        left: 12px !important;
        font-size: 16px !important;
    }
    
    .message {
        margin-bottom: 12px;
        padding: 0 4px;
        gap: 8px;
    }
    
    .message-wrapper {
        max-width: 100%;
    }

    .message-content {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .message-time {
        font-size: 12px;
        padding: 0 4px;
    }
    
    /* Input Area */
    .input-area {
        padding: 12px !important;
        gap: 8px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        flex-shrink: 0 !important;
        background: white !important;
        border-top: 1px solid var(--border) !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05) !important;
        width: 100% !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99 !important;
        visibility: visible !important;
        margin: 0 !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .input-field {
        flex: 1 !important;
        font-size: 16px !important;
        padding: 12px 14px !important;
        min-height: 44px !important;
        max-height: 120px !important;
        border: 1px solid var(--border) !important;
        border-radius: var(--radius-md) !important;
        visibility: visible !important;
        display: block !important;
        background: white !important;
    }
    
    .input-field::placeholder {
        font-size: 12px !important;
        color: var(--text-primary) !important;
    }
    
    .send-btn {
        padding: 12px 20px !important;
        min-width: 70px !important;
        height: 44px !important;
        font-size: 14px !important;
        flex-shrink: 0 !important;
        visibility: visible !important;
        display: flex !important;
    }
    
    .chat-tab {
        padding: 10px 14px;
        min-width: 100px;
        font-size: 13px;
    }
    
    .chat-tab-title {
        font-size: 13px;
    }
    
    /* Message Images - Mobile Optimization */
    .message-images {
        margin-top: 10px !important;
        margin-bottom: 6px !important;
    }
    
    .images-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .image-item {
        border-radius: 8px !important;
    }
    
    .image-wrapper {
        min-height: 80px !important;
        overflow: visible !important; /* 모바일에서 이미지가 완전히 표시되도록 허용 */
    }
    
    .image-wrapper img {
        max-height: none !important; /* 모바일에서 높이 제한 없음 */
    }
    
    .image-caption {
        padding: 8px 10px !important;
        font-size: 11px !important;
        min-height: 36px !important;
    }
    
    .image-view-icon {
        font-size: 20px !important;
    }
    
    /* Sidebar */
    .sidebar-header h3 {
        font-size: 18px;
    }
    
    .new-chat-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .sidebar-search {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .chat-item {
        padding: 12px;
    }
    
    .chat-item-title {
        font-size: 14px;
    }
    
    .chat-item-preview {
        font-size: 12px;
    }
    
    /* Documents Screen */
    .screen {
        padding: 0 !important;
    }
    
    .screen-header {
        padding: 16px 12px;
        background: white;
        border-bottom: 1px solid var(--border);
    }
    
    .screen-header h2 {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .screen-header p {
        font-size: 13px;
        color: var(--text-secondary);
    }
    
    .doc-management-container {
        padding: 0;
        overflow-y: auto;
        height: calc(100vh - 72px - 90px);
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        /* Add padding for browser bottom toolbar */
    }
    
    .doc-header-actions {
        padding: 12px 12px 0 12px;
    }
    
    .doc-upload-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .doc-toolbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        background: white;
        border-bottom: 1px solid var(--border);
    }
    
    .doc-toolbar-left {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .doc-search, .doc-filter {
        width: 100%;
        font-size: 14px;
        padding: 10px 12px;
        height: 40px;
    }
    
    .doc-toolbar-right {
        width: 100%;
        justify-content: space-between;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }
    
    .doc-stats {
        font-size: 12px;
        gap: 8px;
    }
    
    /* Documents Table - Convert to Cards */
    .doc-table-wrapper {
        display: none; /* Hide table on mobile */
    }
    
    /* Document Cards for Mobile */
    .doc-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        padding-bottom: 80px;
        /* Extra padding for browser toolbar */
    }
    
    .doc-card {
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 14px;
        box-shadow: var(--shadow-sm);
        transition: all 0.2s;
    }
    
    .doc-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-md);
    }
    
    .doc-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        gap: 8px;
    }
    
    .doc-card-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary);
        flex: 1;
        word-break: break-word;
    }
    
    .doc-card-status {
        flex-shrink: 0;
    }
    
    .doc-card-meta {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 columns for mobile */
        gap: 8px 10px;
        margin-bottom: 12px;
        font-size: 12px;
    }
    
    /* Mobile: 2 columns for 7 items (will wrap to 4 rows) */
    .doc-card-meta-item {
        min-width: 0; /* Allow text truncation */
    }
    
    .doc-card-meta-item {
        display: flex;
        flex-direction: column;
    }
    
    .doc-card-meta-label {
        color: var(--text-secondary);
        font-size: 11px;
        margin-bottom: 2px;
        font-weight: 500;
    }
    
    .doc-card-meta-value {
        color: var(--text-primary);
        font-weight: 600;
    }
    
    .doc-card-actions {
        display: flex;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    
    .doc-card-actions .action-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
        justify-content: center;
        height: 40px;
        min-height: 40px;
    }
    
    /* Document Pagination */
    .doc-pagination {
        padding: 16px 12px;
        padding-bottom: 80px;
        /* Extra padding for browser toolbar */
        gap: 6px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
        padding: 0 8px;
    }
    
    .page-btn:first-child,
    .page-btn:last-child {
        padding: 0 12px;
    }
    
    /* Settings Screen */
    #settingsScreen {
        overflow: visible !important;
    }

    #settingsScreen .settings-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: visible;
        position: relative;
    }
    

    #settingsScreen .settings-sidebar {
        display: none;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 250;
        padding: 12px;
        overflow: auto;
    }

    #settingsScreen .settings-sidebar.mobile-open {
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
    }

    #settingsScreen .settings-sidebar-header {
        display: none;
    }

    #settingsScreen .settings-toggle-icon {
        font-size: 16px;
        color: var(--text-primary);
        transition: transform 0.3s ease;
        flex-shrink: 0;
        margin-left: 12px;
        line-height: 1;
    }

    #settingsScreen .settings-nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px 12px 8px 12px;
        width: 100%;
        background: white;
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.2);
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #settingsScreen .settings-nav-item {
        width: 100%;
        text-align: left;
        padding: 12px 14px;
        font-size: 14px;
        border: 1px solid var(--border);
        background: white;
        border-radius: var(--radius-md);
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
    }
    
    /* #settingsScreen .settings-nav-item:active {
        transform: scale(0.98);
        background: var(--bg-secondary);
    } */
    
    #settingsScreen .settings-nav-item.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    
    #settingsScreen .nav-item-label {
        display: block;
        font-size: 14px;
    }
    
    #settingsScreen .settings-sidebar-footer {
        display: block;
        padding: 0 12px 12px 12px;
        background: transparent;
        width: 100%;
    }

    /* Show save button inside dropdown footer */
    #settingsScreen .settings-sidebar-footer .settings-save-all {
        display: block !important;
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        background: orangered;
        color: white;
        border: none;
        border-radius: var(--radius-md);
        box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    }
    
    #settingsScreen .settings-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        padding-top: 0;
        padding-bottom: 140px;
        order: 0;
    }

    /* Floating settings button */
    #settingsScreen .settings-fab {
        position: fixed;
        top: 100px;
        right: 16px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: green;
        color: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 24px rgba(0,0,0,0.25);
        font-size: 14px;
        z-index: 300;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    #settingsScreen .settings-fab:active {
        transform: scale(0.95);
        box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    }
    
    #settingsScreen .settings-content-section {
        padding: 16px 12px;
        margin-bottom: 0;
        display: none;
    }
    
    #settingsScreen .settings-content-section.active {
        display: block;
    }
    
    #settingsScreen .settings-content-header {
        margin-bottom: 20px;
    }
    
    #settingsScreen .settings-content-header h3 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    #settingsScreen .settings-content-header p {
        font-size: 13px;
        color: var(--text-secondary);
    }
    
    #settingsScreen .settings-content-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    #settingsScreen .form-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    #settingsScreen .form-group {
        width: 100%;
    }
    
    #settingsScreen .form-label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 6px;
        color: var(--text-primary);
    }
    
    #settingsScreen .form-input,
    #settingsScreen .form-select,
    #settingsScreen .form-textarea {
        width: 100%;
        font-size: 14px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: white;
        color: var(--text-primary);
    }
    
    #settingsScreen .form-textarea {
        resize: vertical;
        min-height: 100px;
    }
    
    #settingsScreen .form-hint {
        display: block;
        font-size: 12px;
        color: var(--text-secondary);
        margin-top: 4px;
        line-height: 1.3;
    }
    
    /* Save button fixed at bottom - only in settings screen */
    #settingsScreen .settings-save-all {
        display: none !important;
        /* Hide on mobile - use sidebar footer button instead */
    }
    
    /* Modal */
    .modal-overlay {
        padding: 0 !important;
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        /* Account for notch and browser toolbar */
    }
    
    .modal-content {
        width: 100%;
        height: calc(100vh - 200px);
        /* Reduce to fit safely in viewport */
        max-width: 100%;
        max-height: calc(100vh - 200px);
        border-radius: 0;
        margin: 0;
        margin-top: 60px;
        /* Smaller top margin */
        margin-bottom: 20px;
        /* Add bottom margin for safety */
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 12px 16px;
        padding-top: 12px;
        /* Reduce top padding */
        flex-shrink: 0;
        border-bottom: 1px solid var(--border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: white;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .modal-header h3 {
        font-size: 18px;
        flex: 1;
    }
    
    .modal-close {
        font-size: 28px;
        width: 44px;
        height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: transparent;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        border-radius: 50%;
        transition: all 0.2s;
    }
    
    .modal-close:hover {
        background: var(--bg-secondary);
    }
    
    .modal-close:active {
        transform: scale(0.95);
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        max-height: calc(100vh - 200px);
        /* Limit height on mobile, allow scrolling */
    }
    
    /* Viewer Modal - Stack Vertically */
    .comparative-viewer {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .viewer-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
        flex-shrink: 0;
        border-bottom: 1px solid var(--border);
    }
    
    .viewer-title h3 {
        font-size: 16px;
        display: none;
    }
    
    .viewer-meta {
        font-size: 12px;
        display: none;
        /* Hide meta info on mobile */
    }
    
    .viewer-actions {
        gap: 6px;
        display: none;
        /* Hide all action buttons (download, print, rotate, etc.) on mobile */
    }
    
    .viewer-actions .icon-btn {
        padding: 8px 12px;
        font-size: 12px;
        width: auto;
        min-width: 40px;
    }
    
    .viewer-panels {
        flex-direction: column;
        flex: 1;
        overflow: hidden;
    }
    
    .viewer-panel {
        width: 100%;
        flex: 1;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .viewer-panel:last-child {
        border-bottom: none;
        display: none;
        /* Hide OCR panel on mobile */
    }
    
    /* Show only PDF viewer on mobile */
    .viewer-panel:first-child {
        display: flex;
    }
    
    .panel-title {
        font-size: 14px;
        padding: 12px 16px;
        flex-shrink: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        display: none !important;
        /* Hide panel title on mobile - already shown in modal header */
    }
    
    .pdf-toolbar {
        padding: 8px 12px;
        flex-wrap: wrap;
        flex-shrink: 0;
        gap: 6px;
        display: none !important;
        /* Hide entire PDF toolbar on mobile */
    }
    
    .pdf-toolbar-left {
        gap: 6px;
        display: none !important;
    }
    
    .pdf-toolbar-right {
        display: none !important;
        /* Hide right toolbar (like rotation, download buttons) on mobile */
    }
    
    .pdf-toolbar * {
        display: none !important;
        /* Hide all children in toolbar */
    }
    
    .zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .zoom-percentage {
        font-size: 13px;
        min-width: 50px;
    }
    
    .thumbnail-rail {
        width: 60px;
        padding: 8px 4px;
        overflow-y: auto;
    }
    
    .thumbnail-item {
        width: 52px;
        height: 65px;
        margin-bottom: 6px;
    }
    
    .thumbnail-page-num {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .pdf-viewer {
        flex: 1;
        overflow: auto;
        padding: 12px;
        background: var(--bg-secondary);
    }
    
    /* Hide download buttons on mobile */
    .footer-actions {
        display: none !important;
    }
    
    .download-btn {
        display: none !important;
    }
    
    .ocr-toolbar {
        gap: 8px;
        flex-wrap: wrap;
        flex-shrink: 0;
        padding: 12px;
        background: white;
        border-bottom: 1px solid var(--border);
        display: none;
        /* Hide OCR toolbar on mobile */
    }
    
    .ocr-search {
        flex: 1;
        min-width: 120px;
        font-size: 13px;
        padding: 8px 10px;
        height: 36px;
        display: none;
        /* Hide OCR toolbar on mobile */
    }
    
    .ocr-tabs {
        gap: 4px;
        flex-shrink: 0;
        display: none;
        /* Hide OCR toolbar on mobile */
    }
    
    .ocr-tab-btn {
        padding: 6px 12px;
        font-size: 12px;
        height: 36px;
    }
    
    .ocr-text, .ocr-json {
        flex: 1;
        font-size: 13px;
        padding: 12px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: none;
        /* Hide OCR text and JSON on mobile */
    }
    
    /* Simplify PDF toolbar on mobile */
    .thumbnail-rail {
        width: 60px;
        padding: 8px 4px;
        overflow-y: auto;
        display: none;
        /* Hide thumbnails on mobile */
    }
    
    /* Guide Screen */
    .guide-container {
        padding: 16px;
    }
    
    .guide-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .guide-section h3 {
        font-size: 18px;
    }
    
    .guide-section h4 {
        font-size: 16px;
    }
    
    .guide-section p, .guide-section li {
        font-size: 14px;
    }

    /* Guide mobile: floating 목차 and overlay sidebar - SCOPED TO GUIDE SCREEN ONLY */
    
    #guideScreen {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        height: 100% !important;
    }

    #guideScreen .guide-container {
        display: block !important;
        flex: none !important;
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
        padding: 14px !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #guideScreen .guide-content {
        display: block !important;
        flex: none !important;
        overflow-y: visible !important;
        height: auto !important;
        padding: 0 !important;
        width: 100% !important;
    }

    #guideScreen .guide-sidebar {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 900;
        padding: 0;
        overflow: hidden;
    }

    #guideScreen .guide-sidebar.mobile-open {
        display: block;
    }

    #guideScreen .guide-toc {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 80%;
        max-width: 320px;
        background: white;
        border-right: 1px solid var(--border);
        box-shadow: 4px 0 20px rgba(0,0,0,0.25);
        padding: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: left 0.3s ease;
    }

    #guideScreen .guide-sidebar.mobile-open .guide-toc {
        left: 0;
    }

    #guideScreen .guide-toc h2 {
        font-size: 18px;
        font-weight: 600;
        margin: 0 0 16px 0;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--primary);
        color: var(--text-primary);
    }

    #guideScreen .toc-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    #guideScreen .toc-section a,
    #guideScreen .toc-subsection a {
        display: block;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text-primary);
        text-decoration: none;
        background: white;
    }

    #guideScreen .toc-subsections {
        margin-left: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Simplify guide content for mobile - REMOVE DUPLICATE */
    #guideScreen .guide-section {
        margin-bottom: 32px;
    }

    #guideScreen .guide-section h1 {
        font-size: 20px !important;
        margin-bottom: 14px !important;
        padding-bottom: 8px !important;
        border-bottom: 2px solid var(--primary) !important;
    }

    #guideScreen .guide-subsection {
        margin-bottom: 20px !important;
    }

    #guideScreen .guide-subsection h2 {
        font-size: 17px !important;
        margin-top: 16px !important;
        margin-bottom: 10px !important;
    }

    #guideScreen .guide-subsection h3 {
        font-size: 15px !important;
        margin-top: 12px !important;
        margin-bottom: 8px !important;
    }

    #guideScreen .guide-subsection h4 {
        font-size: 14px !important;
        margin-top: 10px !important;
        margin-bottom: 6px !important;
    }

    #guideScreen .subsection-content {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    #guideScreen .subsection-content p {
        margin-bottom: 10px !important;
    }

    #guideScreen .subsection-content ul,
    #guideScreen .subsection-content ol {
        margin-bottom: 10px !important;
        padding-left: 18px !important;
        list-style: none !important;
    }

    #guideScreen .subsection-content li {
        margin-bottom: 5px !important;
        font-size: 14px !important;
        position: relative !important;
        padding-left: 0 !important;
    }

    #guideScreen .subsection-content li::before {
        content: "• " !important;
        margin-right: 6px !important;
    }

    #guideScreen .subsection-content code {
        font-size: 12px !important;
        padding: 2px 4px !important;
        word-break: break-word !important;
    }

    #guideScreen .subsection-content pre {
        padding: 10px !important;
        margin-bottom: 10px !important;
        font-size: 11px !important;
        overflow-x: auto !important;
        white-space: pre-wrap !important;
        word-break: break-all !important;
    }

    #guideScreen .subsection-content table,
    #guideScreen table,
    #guideScreen .info-table,
    #guideScreen .control-table,
    #guideScreen .engine-selection-table {
        display: block !important;
        width: 100% !important;
        border-collapse: collapse !important;
        border: none !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #guideScreen table thead,
    #guideScreen .info-table thead,
    #guideScreen .control-table thead,
    #guideScreen .engine-selection-table thead {
        display: none !important;
    }

    #guideScreen table tbody,
    #guideScreen .info-table tbody,
    #guideScreen .control-table tbody,
    #guideScreen .engine-selection-table tbody {
        display: block !important;
        width: 100% !important;
    }

    #guideScreen table tr,
    #guideScreen .info-table tr,
    #guideScreen .control-table tr,
    #guideScreen .engine-selection-table tr {
        display: block !important;
        border: none !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    #guideScreen table td,
    #guideScreen .info-table td,
    #guideScreen .control-table td,
    #guideScreen .engine-selection-table td {
        display: inline !important;
        padding: 0 !important;
        text-align: left !important;
        border: none !important;
        background: transparent !important;
    }

    #guideScreen table td::before,
    #guideScreen .info-table td::before,
    #guideScreen .control-table td::before,
    #guideScreen .engine-selection-table td::before {
        content: "" !important;
        display: none !important;
    }

    #guideScreen table th,
    #guideScreen .info-table th,
    #guideScreen .control-table th,
    #guideScreen .engine-selection-table th {
        display: none !important;
    }

    #guideScreen .subsection-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Hide complex desktop elements - but show content as simple list */
    #guideScreen .step-box,
    #guideScreen .info-box,
    #guideScreen .warning-box,
    #guideScreen .note-box,
    #guideScreen .badge,
    #guideScreen .tag,
    #guideScreen .label,
    #guideScreen .diagram,
    #guideScreen .flowchart,
    #guideScreen .step-container,
    #guideScreen .steps,
    #guideScreen [class*="step"],
    #guideScreen [class*="box"],
    #guideScreen [class*="card"] {
        display: block !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 8px 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    #guideScreen .step-box::before,
    #guideScreen .info-box::before,
    #guideScreen .warning-box::before,
    #guideScreen .note-box::before,
    #guideScreen [class*="step"]::before,
    #guideScreen [class*="box"]::before {
        content: "" !important;
        display: none !important;
    }

    /* Remove icons and badges styling */
    #guideScreen .badge,
    #guideScreen .tag,
    #guideScreen .icon,
    #guideScreen [class*="icon"] {
        display: none !important;
    }

    /* Floating 목차 button */
    #guideScreen .guide-fab {
        position: fixed;
        top: 100px;
        right: 16px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: green;
        color: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 24px rgba(0,0,0,0.25);
        font-size: 14px;
        z-index: 1000;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        pointer-events: auto;
    }

    #guideScreen .guide-fab:active {
        transform: scale(0.95);
        box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    }

    #guideScreen .guide-fab.active {
        background: #2d8659;
        transform: rotate(45deg);
    }

    /* System Info (mobile) */
    #settingsSection-system-info .settings-content-header h3 {
        font-size: 20px;
    }

    #settingsSection-system-info .settings-content-header p {
        font-size: 13px;
    }

    /* Stack two-column grids into single column */
    #settingsSection-system-info [style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* Card padding adjustments */
    #settingsSection-system-info #systemInfo,
    #settingsSection-system-info [style*="padding: 24px"] {
        padding: 16px !important;
    }

    /* Reduce inline label widths for small screens */
    #settingsSection-system-info span[style*="inline-block;"][style*="width:"] {
        width: auto !important;
        display: inline-block;
        min-width: 120px;
    }

    /* Text sizing inside feature lists */
    #settingsSection-system-info div[style*="margin-bottom: 4px"] {
        font-size: 14px;
    }

    /* Admin Panel Mobile Optimization - Portrait Mode */
    #adminScreen {
        overflow-y: auto !important;
        height: auto !important;
        max-height: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 12px !important;
    }
    
    /* Hide Admin Panel header on mobile */
    #adminScreen .screen-header {
        display: none !important;
    }
    
    /* Tenant Section Wrapper */
    #adminScreen .settings-content-body {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px !important;
    }
    
    /* Tenant Info Section - Mobile */
    #adminScreen > div:first-of-type {
        margin-bottom: 24px !important;
    }
    
    /* Tenant header gradient - reduce padding */
    #adminScreen > div:first-of-type > div:first-child {
        padding: 16px !important;
        border-radius: 10px !important;
        margin-bottom: 16px !important;
    }
    
    #adminScreen > div:first-of-type > div:first-child h3 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
        white-space: normal !important;
        word-break: keep-all !important;
        line-height: 1.4 !important;
    }
    
    #adminScreen > div:first-of-type > div:first-child p {
        font-size: 12px !important;
        white-space: normal !important;
        line-height: 1.5 !important;
    }
    
    /* Tenant Profile Card - Stack columns */
    #adminScreen > div:first-of-type > div:nth-child(2) {
        padding: 16px !important;
        border-radius: 10px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) h4 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
    }
    
    /* Convert 2-column grid to 1 column on mobile */
    /* Target the grid container using class selector */
    #adminScreen .tenant-profile-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    /* Fallback: Target by structure if class not found */
    #adminScreen > div:first-of-type > div:nth-child(2) > div:nth-child(2) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:nth-child(2) > div {
        margin-bottom: 0 !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:nth-child(2) > div > div {
        margin-bottom: 14px !important;
    }
    
    /* Tenant form inputs */
    #adminScreen input.form-input,
    #adminScreen textarea.form-input {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }
    
    #adminScreen label.form-label {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }
    
    /* Tenant buttons - full width and stack */
    #adminScreen > div:first-of-type > div:nth-child(2) > div:last-child {
        flex-direction: column-reverse !important;
        gap: 8px !important;
        margin-top: 16px !important;
        padding-top: 16px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:last-child button {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    /* System Info Card */
    #adminScreen > div:first-of-type > div:nth-child(3) {
        padding: 16px !important;
        border-radius: 10px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) h4 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
    }
    
    /* Tenant info cards - Stack vertically on mobile */
    .tenant-info-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    
    .tenant-info-card {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        padding: 12px 16px !important;
    }
    
    .tenant-info-card > div:first-child {
        text-align: left !important;
        flex-shrink: 0 !important;
    }
    
    .tenant-info-card > div:last-child {
        text-align: right !important;
        margin-left: auto !important;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .nav-title {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .message {
        padding: 10px;
        font-size: 13px;
    }
    
    .input-field {
        font-size: 14px;
    }
    
    .send-btn {
        padding: 10px 16px;
        min-width: 60px;
        font-size: 13px;
    }
    
    .doc-card {
        padding: 12px;
    }
    
    .doc-card-title {
        font-size: 14px;
    }
    
    .doc-card-meta {
        grid-template-columns: 1fr 1fr; /* 2 columns even on very small screens */
        gap: 8px;
    }
}

/* Landscape Mobile - Optimize for horizontal space */
@media (max-height: 500px) and (orientation: landscape) {
    .nav {
        height: 56px;
    }
    
    .main-container {
        height: calc(100vh - 56px);
    }
    
    .messages {
        padding: 8px;
    }
    
    .input-area {
        padding: 8px;
    }
    
    .viewer-panel {
        min-height: 40vh;
    }
    
    /* Admin Panel Mobile Optimization */
    #adminScreen {
        overflow-y: auto !important;
        height: auto !important;
        max-height: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 12px !important;
    }
    
    /* Hide Admin Panel header on mobile landscape */
    #adminScreen .screen-header {
        display: none !important;
    }
    
    /* Tenant Section Wrapper */
    #adminScreen .settings-content-body {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px !important;
    }
    
    /* Hide tenant info on very small screens */
    #userTenantInfo {
        display: none !important;
    }
    
    /* Tenant Info Section - Mobile */
    #adminScreen > div:first-of-type {
        margin-bottom: 24px !important;
    }
    
    /* Tenant header gradient - reduce padding */
    #adminScreen > div:first-of-type > div:first-child {
        padding: 16px !important;
        border-radius: 10px !important;
        margin-bottom: 16px !important;
    }
    
    #adminScreen > div:first-of-type > div:first-child h3 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
        white-space: normal !important;
        word-break: keep-all !important;
        line-height: 1.4 !important;
    }
    
    #adminScreen > div:first-of-type > div:first-child p {
        font-size: 12px !important;
        white-space: normal !important;
        line-height: 1.5 !important;
    }
    
    /* Tenant Profile Card - Stack columns */
    #adminScreen > div:first-of-type > div:nth-child(2) {
        padding: 16px !important;
        border-radius: 10px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) h4 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:nth-child(2) {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:nth-child(2) > div {
        margin-bottom: 0 !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:nth-child(2) > div > div {
        margin-bottom: 14px !important;
    }
    
    /* Tenant form inputs */
    #adminScreen input.form-input,
    #adminScreen textarea.form-input {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }
    
    #adminScreen label.form-label {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }
    
    /* Tenant buttons - full width and stack */
    #adminScreen > div:first-of-type > div:nth-child(2) > div:last-child {
        flex-direction: column-reverse !important;
        gap: 8px !important;
        margin-top: 16px !important;
        padding-top: 16px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(2) > div:last-child button {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    /* System Info Card */
    #adminScreen > div:first-of-type > div:nth-child(3) {
        padding: 16px !important;
        border-radius: 10px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) h4 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
    }
    
    /* Tenant info cards - Stack vertically on mobile */
    .tenant-info-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    
    .tenant-info-card {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        padding: 12px 16px !important;
    }
    
    .tenant-info-card > div:first-child {
        text-align: left !important;
        flex-shrink: 0 !important;
    }
    
    .tenant-info-card > div:last-child {
        text-align: right !important;
        margin-left: auto !important;
    }
    
    /* System info grid - Force vertical stack on mobile */
    #adminScreen > div:first-of-type > div:nth-child(3) > div:nth-child(2) {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
        grid-template-columns: none !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:nth-child(2) > div {
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
        border: 1.5px solid #93c5fd !important;
        border-radius: 8px !important;
        padding: 14px 16px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1) !important;
        text-align: left !important;
        width: 100% !important;
        min-height: 50px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:nth-child(2) > div > div {
        text-align: left !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:nth-child(2) > div > div:first-child {
        font-size: 10px !important;
        margin-bottom: 0 !important;
        white-space: nowrap !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        color: #1e40af !important;
        text-align: left !important;
        flex-shrink: 0 !important;
        margin-right: 12px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:nth-child(2) > div > div:last-child {
        font-size: 20px !important;
        font-weight: 700 !important;
        color: #1e3a8a !important;
        word-break: break-word !important;
        line-height: 1.2 !important;
        text-align: right !important;
        margin-left: auto !important;
    }
    
    /* Usage bars - stack labels */
    #adminScreen > div:first-of-type > div:nth-child(3) > div:last-child {
        gap: 12px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:last-child > div {
        padding: 12px !important;
        border-radius: 8px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:last-child > div > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        margin-bottom: 8px !important;
    }
    
    #adminScreen > div:first-of-type > div:nth-child(3) > div:last-child > div > div:first-child span {
        font-size: 12px !important;
    }
    
    /* Divider */
    #adminScreen > div:nth-child(2) {
        margin: 24px 0 !important;
    }
    
    /* User Management Section */
    #adminScreen .form-group {
        margin-bottom: 0 !important;
    }
    
    #adminScreen .form-group > div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    
    #adminScreen .form-group > div:first-child label {
        font-size: 16px !important;
        margin: 0 !important;
    }
    
    #adminScreen .form-group > div:first-child > div {
        width: 100% !important;
        justify-content: stretch !important;
        gap: 8px !important;
    }
    
    #adminScreen .form-group > div:first-child button {
        width: 100% !important;
        flex: 1 !important;
        font-size: 13px !important;
        padding: 10px 16px !important;
    }
    
    /* Search and filter */
    #adminScreen .form-group > div:nth-child(2) {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
    }
    
    #adminScreen #adminUserSearch {
        width: 100% !important;
    }
    
    #adminScreen #adminUserFilter {
        width: 100% !important;
    }
    
    /* REMOVE - Don't hide table, let JavaScript handle mobile vs desktop */
    /* Hide table completely on mobile - REMOVED */
    /* #adminUsersList table {
        display: none !important;
    } */
    
    /* REMOVE - These card styles are now created by JavaScript */
    /* Create card-based layout */
    /* #adminUsersList::after {
        content: '';
        display: block;
    } */
    
    /* User cards - will be created by JavaScript or CSS */
    .mobile-user-card {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        padding: 16px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }
    
    .mobile-user-card-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 12px !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    
    .mobile-user-card-username {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
    }
    
    .mobile-user-card-role {
        font-size: 10px !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
    }
    
    .mobile-user-card-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .mobile-user-card-info-row {
        display: flex !important;
        justify-content: space-between !important;
        font-size: 13px !important;
    }
    
    .mobile-user-card-label {
        color: #6b7280 !important;
        font-weight: 500 !important;
        min-width: 60px !important;
    }
    
    .mobile-user-card-value {
        color: #1f2937 !important;
        text-align: right !important;
        word-break: break-word !important;
        flex: 1 !important;
    }
    
    .mobile-user-card-actions {
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .mobile-user-card-actions button {
        flex: 1 !important;
        min-width: calc(50% - 4px) !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
    }
}
