/* ====================================================================
   Стили оформления PMS для Ext JS 3.4.0
   ==================================================================== */

body, .x-panel, .x-window, .x-grid3, .x-form-item, .x-btn, .x-btn button, .x-btn-text, .x-toolbar {
    font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif !important;
}

/* Верхняя панель системы */
.pms-top-bar {
    background: #007790;
    color: #ffffff;
    height: 42px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.pms-logo {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pms-user-badge {
    font-size: 12px;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 12px;
    color: #ffffff;
}

/* Статусы задач и проектов */
.badge-status-new {
    background-color: #0288d1;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-status-progress {
    background-color: #f57c00;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-status-done {
    background-color: #388e3c;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-priority-high {
    background-color: #d32f2f;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-priority-medium {
    background-color: #fbc02d;
    color: #333333;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-priority-low {
    background-color: #78909c;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    display: inline-block;
}

/* Карточки KPI на дашборде */
.kpi-container {
    display: flex;
    gap: 16px;
    padding: 14px;
    background: #f8fafc;
    border-bottom: 1px solid #d0d7de;
}

.kpi-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kpi-icon-blue { background: #e0f2fe; color: #0288d1; }
.kpi-icon-orange { background: #fff7ed; color: #ea580c; }
.kpi-icon-green { background: #f0fdf4; color: #16a34a; }
.kpi-icon-purple { background: #faf5ff; color: #9333ea; }

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}

.kpi-label {
    font-size: 12px;
    color: #64748b;
}

/* Фон рабочего стола входа */
.auth-bg-desktop {
    background: #1e293b radial-gradient(circle at center, #334155 0%, #0f172a 100%);
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
}

/* Оформление модальных окон Ext JS 3.4 */
.x-window {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2) !important;
    border-radius: 6px !important;
}

.x-window-tl, .x-window-tr, .x-window-tc,
.x-window-bl, .x-window-br, .x-window-bc,
.x-window-ml, .x-window-mr {
    /* плавные рамки */
}

.x-window-header-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.x-window-plain .x-window-body {
    background: #ffffff !important;
}

.x-form-item {
    margin-bottom: 10px !important;
}

.x-form-item label.x-form-item-label {
    font-size: 12px !important;
    color: #334155 !important;
    font-weight: 500 !important;
    padding-top: 3px !important;
}

.x-form-text, textarea.x-form-field {
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 3px 6px !important;
    font-size: 12px !important;
    background: #ffffff !important;
}

.x-form-focus {
    border-color: #0288d1 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(2, 136, 209, 0.15) !important;
}

.x-panel-btns {
    padding: 8px 12px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Пузыри сообщений командного чата */
.chat-bubble {
    padding: 8px 12px;
    margin: 6px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    max-width: 80%;
    clear: both;
    float: left;
}

.chat-bubble.mine {
    background: #e0f2fe;
    border-color: #bae6fd;
    float: right;
    margin-right: 14px;
}

.chat-header-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}

.chat-author-name {
    font-weight: 700;
    color: #0369a1;
}


