/* Basic form styles */
#vdp-material-form input, #vdp-material-form select, #vdp-material-form textarea {
    width: 100%;
    max-width: 500px;
    padding: 6px;
    margin-bottom: 8px;
}
#vdp-material-form button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 12px;
}
#vdp-response {
    margin-top: 8px;
}

/* Dashboard Styles */
#vdp-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f1f1f1;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#vdp-dashboard h2 {
    color: #23282d;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 300;
}

.vdp-dashboard-menu {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vdp-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-align: center;
    position: relative;
}

.vdp-tab:hover {
    background: #f8f9fa;
    color: #2271b1;
}

.vdp-tab.active {
    background: #2271b1;
    color: white;
}

.vdp-dashboard-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 400px;
}

.vdp-section-title {
    color: #23282d;
    font-size: 24px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vdp-section-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

.vdp-btn-large {
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Modal Styles */
.vdp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.vdp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.vdp-modal-body {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalShow 0.3s ease-out;
}

@keyframes modalShow {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.vdp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #e1e1e1;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: white;
}

.vdp-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vdp-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s;
}

.vdp-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.vdp-modal-content {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Form Groups */
.vdp-form-group {
    margin-bottom: 25px;
}

.vdp-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vdp-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.vdp-form-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,0.1);
}

/* Materials Section */
.vdp-materials-section {
    margin-bottom: 30px;
}

.vdp-search-section {
    margin-bottom: 20px;
}

.vdp-search-results {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.vdp-search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vdp-search-result-item:hover {
    background: #f8f9fa;
}

.vdp-search-result-item .title {
    font-weight: 500;
}

.vdp-search-result-item .stock {
    color: #666;
    font-size: 12px;
}

.vdp-no-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Materials Table */
.vdp-table-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vdp-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.vdp-table thead {
    background: #f8f9fa;
}

.vdp-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.vdp-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.vdp-table tbody tr:hover {
    background: #f8f9fa;
}

.vdp-qty-input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.vdp-btn-edit, .vdp-btn-delete {
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.vdp-btn-edit:hover {
    color: #2271b1;
    background: rgba(34,113,177,0.1);
}

.vdp-btn-delete:hover {
    color: #dc3545;
    background: rgba(220,53,69,0.1);
}

.vdp-no-materials {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px !important;
}

.vdp-table-title {
    font-size: 18px;
    color: #23282d;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Actions */
.vdp-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    margin-top: 30px;
}

.vdp-btn-save, .vdp-btn-cancel {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vdp-btn-save {
    background: #28a745;
    color: white;
}

.vdp-btn-save:hover {
    background: #218838;
    transform: translateY(-1px);
}

.vdp-btn-cancel {
    background: #6c757d;
    color: white;
}

.vdp-btn-cancel:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 768px) {
    .vdp-dashboard-menu {
        flex-direction: column;
    }

    .vdp-modal-body {
        width: 95vw;
    }

    .vdp-modal-content {
        padding: 20px;
    }

    .vdp-table th, .vdp-table td {
        padding: 10px 8px;
    }

    .vdp-table-container {
        overflow-x: auto;
    }
}
