/* Основные стили для CRM UI (единый стиль для docs, doc, scan, settings) */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Arial, sans-serif; }
body { background: #f5f7fa; color: #333; line-height: 1.6; }
.container { max-width: 100%; padding: 15px; }
header { background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); color: white; padding: 20px 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
h2, h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.card { background: white; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); padding: 18px; margin-bottom: 18px; }
.stats-bar { display: flex; justify-content: space-around; background: white; border-radius: 12px; padding: 12px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-value { font-size: 1.2rem; font-weight: 700; }
.stat-label { font-size: 0.7rem; color: #777; }
.new { color: #1565c0; }
.progress { color: #ff8f00; }
.completed { color: #2e7d32; }
.error { color: #c62828; }
.filter-section { display: flex; overflow-x: auto; padding: 10px 0; margin-bottom: 10px; scrollbar-width: none; }
.filter-section::-webkit-scrollbar { display: none; }
.filter-btn { background: white; border: none; border-radius: 20px; padding: 8px 15px; margin-right: 10px; font-size: 0.9rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1); white-space: nowrap; cursor: pointer; transition: all 0.3s ease; }
.filter-btn.active { background: #3498db; color: white; }
.documents-list { padding-bottom: 80px; }
.document-item { background: white; border-radius: 12px; padding: 15px; margin-bottom: 15px; display: flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.2s ease; position: relative; cursor: pointer; }
.document-item:active { transform: scale(0.98); }
.doc-icon { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 15px; font-size: 1.5rem; }
.status-new { background: #e3f2fd; color: #1565c0; }
.status-progress { background: #fff8e1; color: #ff8f00; }
.status-completed { background: #e8f5e9; color: #2e7d32; }
.status-error { background: #ffebee; color: #c62828; }
.status-badge { position: absolute; top: 15px; right: 15px; padding: 3px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; }
.status-new-badge { background: #bbdefb; color: #0d47a1; }
.status-progress-badge { background: #ffecb3; color: #e65100; }
.status-completed-badge { background: #c8e6c9; color: #1b5e20; }
.status-error-badge { background: #ffcdd2; color: #b71c1c; }
.doc-info { flex: 1; }
.doc-name { font-weight: 600; margin-bottom: 5px; padding-right: 70px; }
.doc-meta { display: flex; color: #777; font-size: 0.85rem; flex-wrap: wrap; }
.doc-meta span { margin-right: 15px; display: flex; align-items: center; margin-bottom: 3px; }
.doc-meta i { margin-right: 5px; }
.scan-label { font-size: 1.1rem; margin-bottom: 8px; display: block; }
.scan-input { font-size: 1.3rem; padding: 0.7rem 1.2rem; border-radius: 12px; border: 1px solid #e0e0e0; margin-bottom: 10px; width: 100%; }
.scan-btn { font-size: 1.1rem; padding: 0.7rem 1.5rem; border-radius: 12px; background: #3498db; color: #fff; border: none; margin-bottom: 10px; cursor: pointer; }
.table-responsive { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; box-shadow: 0 1px 8px rgba(0,0,0,0.05); margin-bottom: 1rem; }
th, td { padding: 1rem 0.5rem; text-align: left; border-bottom: 1px solid #e0e0e0; }
th { background: #f3f4f8; font-weight: 600; color: #1976d2; font-size: 1.1rem; }
tr:last-child td { border-bottom: none; }
.btn, .scan-btn { display: inline-block; border-radius: 14px; font-size: 1.1rem; padding: 0.7rem 1.5rem; font-weight: 500; background: #222; color: #fff; border: none; margin-top: 1rem; margin-right: 0.5rem; box-shadow: 0 2px 8px rgba(33,150,243,0.08); transition: background 0.2s; cursor: pointer; }
.btn-secondary { background: #fff; color: #222; border: 1px solid #e0e0e0; }
.btn-primary { background: linear-gradient(90deg,#1976d2 60%,#64b5f6 100%); color: #fff; }
.btn-primary:active, .btn-primary:focus { background: linear-gradient(90deg,#1565c0 60%,#42a5f5 100%); }
.btn-secondary:active, .btn-secondary:focus { background: #f3f4f8; }
.settings-list { background: white; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); padding: 18px; margin-bottom: 18px; }
.settings-item { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background 0.2s; }
.settings-item:last-child { border-bottom: none; }
.settings-item i { font-size: 1.3rem; margin-right: 18px; color: #3498db; }
.settings-item span { font-size: 1.1rem; color: #222; }
.settings-item:hover { background: #f5f7fa; }
.bottom-menu { display: flex; justify-content: space-around; position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); padding: 10px 0; }
.bottom-menu .menu-item { text-align: center; color: #1976d2; font-size: 0.9rem; }
.bottom-menu .menu-item i { display: block; font-size: 1.2rem; margin-bottom: 5px; }
@media (max-width: 480px) {
    h2, h3 { font-size: 1.1rem; }
    th, td { font-size: 0.95rem; padding: 0.7rem 0.2rem; }
    .btn, .scan-btn { font-size: 0.95rem; padding: 0.6rem 1rem; }
    .scan-input { font-size: 1.1rem; }
    .settings-item span { font-size: 1rem; }
    .document-item { padding: 12px; }
    .doc-icon { width: 45px; height: 45px; font-size: 1.3rem; }
    .doc-meta { flex-direction: column; }
    .doc-meta span { margin-bottom: 3px; }
    .stats-bar { padding: 10px 5px; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.65rem; }
}
.search-bar {
            display: flex;
            align-items: center;
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.07);
            padding: 10px 16px;
            margin-bottom: 18px;
            max-width: 420px;
            margin-left: auto;
            margin-right: auto;
        }
        .search-bar i {
            color: #1976d2;
            font-size: 1.2rem;
            margin-right: 10px;
        }
        .search-bar input {
            border: none;
            outline: none;
            font-size: 1.1rem;
            background: transparent;
            flex: 1;
            padding: 6px 0;
            color: #222;
        }
        @media (max-width: 480px) {
            .search-bar { padding: 7px 8px; font-size: 0.95rem; }
            .search-bar i { font-size: 1rem; }
            .search-bar input { font-size: 0.95rem; }
        }