/*
Theme Name: Zakaz
Theme URI: 
Author: 
Description: Тема для производственного портала
Version: 1.0
*/

/* ========================================== */
/* БАЗОВЫЕ СТИЛИ ТЕМЫ                         */
/* ========================================== */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
}

.site-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.site-header .container {
    max-width: none;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    color: #0073aa;
    text-decoration: none;
}

.site-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
}

.site-nav a:hover {
    color: #0073aa;
}

.container {
    max-width: none;
    margin: 0 auto;
    padding: 0 20px;
}

.site-footer {
    background: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-top: 1px solid #ddd;
    color: #666;
}

/* ========================================== */
/* СТИЛИ ДЛЯ БЛОКА ЗАКАЗОВ НА ГЛАВНОЙ         */
/* ========================================== */

.pd-frontpage-orders {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-frontpage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.pd-frontpage-header h2 {
    margin: 0;
    font-size: 28px;
    color: #2c3e50;
}

.pd-frontpage-auth {
    display: flex;
    gap: 15px;
    align-items: center;
}

.pd-user-greeting {
    color: #6c757d;
    font-size: 16px;
}

.pd-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.pd-button-primary {
    background: #0073aa;
    color: #fff;
}

.pd-button-primary:hover {
    background: #005a87;
    color: #fff;
}

.pd-button-secondary {
    background: #6c757d;
    color: #fff;
}

.pd-button-secondary:hover {
    background: #5a6268;
    color: #fff;
}

.pd-button-danger {
    background: #dc3545;
    color: #fff;
}

.pd-button-danger:hover {
    background: #c82333;
    color: #fff;
}

.pd-frontpage-table-wrapper {
    overflow-x: auto;
}

.pd-frontpage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.pd-frontpage-table th,
.pd-frontpage-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.pd-frontpage-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    font-size: 16px;
}

.pd-frontpage-table tbody tr:hover {
    background: #f8f9fa;
}

.pd-counter {
    width: 50px;
    text-align: center;
    font-weight: 600;
    color: #6c757d;
    font-size: 16px;
}

.pd-urgent {
    font-weight: 600;
    font-size: 16px;
}

.pd-overdue {
    font-weight: 700;
    text-decoration: line-through;
    font-size: 16px;
}

.pd-days-left {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    background: #ffe5e5;
    padding: 2px 8px;
    border-radius: 10px;
}

.pd-overdue-label {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    color: #fff;
    background: #dc3545;
    padding: 2px 8px;
    border-radius: 10px;
}

.pd-priority-high {
    background: #dc3545;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    display: inline-block;
}

.pd-priority-medium {
    background: #ffc107;
    color: #212529;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    display: inline-block;
}

.pd-priority-low {
    background: #28a745;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    display: inline-block;
}

.pd-frontpage-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.pd-total-count {
    font-size: 15px;
    color: #6c757d;
}

.pd-empty-orders {
    text-align: center;
    padding: 50px;
    color: #6c757d;
    font-size: 18px;
}

/* ========================================== */
/* СТИЛИ ДЛЯ ЛИЧНОГО КАБИНЕТА                */
/* ========================================== */

.pd-dashboard-wrapper {
    max-width: none;
    margin: 0 auto;
    padding: 20px;
}

.pd-dashboard-header {
    background: #fff;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-header-left h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #343a40;
}

.pd-user-info {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.pd-user-name {
    color: #0073aa;
    font-weight: 500;
}

.pd-user-role {
    color: #6c757d;
}

.pd-header-right {
    display: flex;
    gap: 10px;
}

.pd-action-bar {
    background: #fff;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-action-info {
    display: flex;
    gap: 20px;
}

.pd-badge-info {
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #343a40;
}

.pd-filters-panel {
    background: #fff;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-filters-panel h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #343a40;
}

.pd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.pd-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pd-filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
}

.pd-filter-group input,
.pd-filter-group select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.pd-orders-container {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.pd-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pd-orders-table th,
.pd-orders-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.pd-orders-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #343a40;
    white-space: nowrap;
}

.pd-orders-table tbody tr:hover {
    background: #f1f3f5;
}

.pd-row-success {
    background: #d4edda;
}

.pd-row-urgent {
    background: #f8d7da;
}

.pd-status-done {
    color: #28a745;
}

.pd-status-pending {
    color: #6c757d;
}

.pd-status-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-badge-success {
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.pd-badge-danger {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.pd-badge-warning {
    background: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.pd-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

/* ========================================== */
/* СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА                 */
/* ========================================== */

.pd-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.pd-modal-content {
    background-color: #fff;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.pd-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #343a40;
}

.pd-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.pd-modal-close:hover {
    color: #dc3545;
}

.pd-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.pd-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-modal-buttons-right {
    display: flex;
    gap: 10px;
}

.pd-form-group {
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.pd-form-group h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #343a40;
    border-left: 3px solid #0073aa;
    padding-left: 12px;
}

.pd-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.pd-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pd-form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #343a40;
}

.pd-form-field input,
.pd-form-field textarea,
.pd-form-field select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.pd-form-field input:focus,
.pd-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.pd-form-field input[readonly],
.pd-form-field textarea[readonly] {
    background: #e9ecef;
    cursor: not-allowed;
}

.pd-checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.pd-checkbox-field label {
    cursor: pointer;
    font-weight: normal;
}

.pd-checkbox-field input {
    width: auto;
}

.pd-info-panel {
    background: #e7f3ff;
}

.pd-status-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.pd-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.pd-status-item.done {
    background: #d4edda;
    border-color: #28a745;
}

.pd-status-item.pending {
    background: #fff3cd;
    border-color: #ffc107;
}

.pd-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* ========================================== */
/* СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ ПЛАГИНА             */
/* ========================================== */

.pd-settings-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.pd-settings-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pd-permissions-table {
    overflow-x: auto;
    margin: 15px 0;
}

.pd-permissions-table table {
    min-width: 800px;
}

.pd-permissions-table td,
.pd-permissions-table th {
    vertical-align: middle;
    text-align: center;
}

.pd-permissions-table td:first-child,
.pd-permissions-table th:first-child {
    text-align: left;
}

.pd-note-info {
    display: inline-block;
    background: #f0f6fc;
    padding: 5px 10px;
    border-radius: 3px;
    margin-top: 10px;
}

input[type="color"] {
    width: 60px;
    height: 40px;
    cursor: pointer;
}

code {
    font-size: 11px;
}

/* ========================================== */
/* АДАПТИВНАЯ ВЕРСТКА                         */
/* ========================================== */

@media (max-width: 768px) {
    .pd-frontpage-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pd-frontpage-table th,
    .pd-frontpage-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .pd-button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .pd-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pd-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pd-filter-group {
        width: 100%;
    }
    
    .pd-form-row {
        grid-template-columns: 1fr;
    }
    
    .pd-modal-content {
        width: 95%;
        margin: 20px auto;
    }
}
        .pd-settings-section {
            background: #fff;
            border: 1px solid #ccd0d4;
            border-radius: 4px;
            padding: 20px;
            margin: 20px 0;
        }
        .pd-settings-section h2 {
            margin-top: 0;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }
        .pd-permissions-table {
            overflow-x: auto;
            margin: 15px 0;
        }
        .pd-permissions-table table {
            min-width: 800px;
        }
        .pd-permissions-table td, 
        .pd-permissions-table th {
            vertical-align: middle;
            text-align: center;
        }
        .pd-permissions-table td:first-child,
        .pd-permissions-table th:first-child {
            text-align: left;
        }
        .pd-note-info {
            display: inline-block;
            background: #f0f6fc;
            padding: 5px 10px;
            border-radius: 3px;
            margin-top: 10px;
        }
        input[type="color"] {
            width: 60px;
            height: 40px;
            cursor: pointer;
        }
        code {
            font-size: 11px;
        }
        /**
 * Стили для админ-панели плагина Production Dashboard
 * Файл: assets/css/admin-style.css
 */

.pd-settings-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.pd-settings-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pd-permissions-table {
    overflow-x: auto;
    margin: 15px 0;
}

.pd-permissions-table table {
    min-width: 800px;
}

.pd-permissions-table td, 
.pd-permissions-table th {
    vertical-align: middle;
    text-align: center;
}

.pd-permissions-table td:first-child,
.pd-permissions-table th:first-child {
    text-align: left;
}

.pd-note-info {
    display: inline-block;
    background: #f0f6fc;
    padding: 5px 10px;
    border-radius: 3px;
    margin-top: 10px;
}

input[type="color"] {
    width: 60px;
    height: 40px;
    cursor: pointer;
}

code {
    font-size: 11px;
}

.pd-order-input {
    width: 60px;
    text-align: center;
}
.pd-field-readonly {
    padding: 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #666;
}