/* CSS Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Styles */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 20px; 
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); 
    line-height: 1.4;
    min-height: 100vh;
}

/* Container */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    background: white; 
    padding: 20px; 
    border-radius: 15px; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Header */
.header { 
    background: linear-gradient(135deg, #252525 0%, #545455 100%); 
    color: white; 
    padding: 20px; 
    margin: -20px -20px 20px -20px; 
    text-align: center; 
    border-radius: 15px 15px 0 0;
    position: relative;
    overflow: hidden;
}

.header-logo-left {
    position: absolute;
    left: 20px;
    top: 50%;
    line-height:25px;
    transform: translateY(-50%);
    width: 115px;
    height: 100px;
    z-index: 3;
}

.header-logo-right {
    position: absolute;
    right: 20px;
    top: 50%;
    line-height: 25px;
    transform: translateY(-50%);
    width: 115px;
    height: 100px;
    z-index: 3;
}

.chapter-two-logo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-main-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 2px;
}

.chapter-word {
    color: #33cccc;
}

.two-word {
    color: #6b7280;
}

.logo-underline {
    width: 100%;
    height: 3px;
    background: #33cccc;
    margin: 2px 0;
    border-radius: 1px;
}

.consulting-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    color: #6b7280;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Project Info Section */
.project-info { 
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%); 
    padding: 20px; 
    margin-bottom: 20px; 
    border-radius: 10px; 
    border: 2px solid #e2e8f0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.project-info input { 
    margin: 5px; 
    padding: 10px; 
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    width: 200px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.project-info input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Button Groups */
.button-group {
    margin: 15px 0;
}

/* Buttons */
.btn { 
    background: transparent; 
    color: #0ea5e9; 
    padding: 10px 20px; 
    border: none; 
    border-radius: 0; 
    cursor: pointer; 
    margin: 5px; 
    font-size: 14px;
    font-weight: 500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #33cccc;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.btn:hover:not(:disabled)::after {
    width: 100%;
}

.btn:hover:not(:disabled) {
    background: transparent;
    color: #33cccc;
}

.btn:disabled {
    background: transparent;
    color: #94a3b8;
    cursor: not-allowed;
}

.btn:disabled::after {
    display: none;
}

.btn.pdf-btn {
    color: #dc2626;
}

.btn.pdf-btn::after {
    background-color: #dc2626;
}

.btn.pdf-btn:hover:not(:disabled) {
    color: #dc2626;
}

.btn.export-btn {
    color: #33cccc;
}

.btn.export-btn::after {
    background-color: #33cccc;
}

.btn.export-btn:hover:not(:disabled) {
    color: #33cccc;
}

.btn.import-btn {
    color: #6366f1;
}

.btn.import-btn::after {
    background-color: #6366f1;
}

.btn.import-btn:hover:not(:disabled) {
    color: #6366f1;
}

.btn.danger-btn {
    color: #f59e0b;
}

.btn.danger-btn::after {
    background-color: #f59e0b;
}

.btn.danger-btn:hover:not(:disabled) {
    color: #f59e0b;
}

.pdf-status {
    font-size: 12px;
    margin-left: 10px;
    font-style: italic;
    opacity: 0.9;
    color: #64748b;
    font-weight: 400;
}

/* Summary Section */
.summary { 
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); 
    padding: 20px; 
    margin: 20px 0; 
    border-radius: 10px; 
    border: 2px solid #10b981;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.1);
}

/* Compliance Section Headers */
.compliance-section-header {
    padding: 18px 22px;
    margin: 24px 0 8px 0;
    border-radius: 10px;
    border-left: 5px solid;
}

.compliance-section-header:first-child {
    margin-top: 0;
}

.compliance-section-header h2 {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: 0.3px;
}

.compliance-section-header p {
    font-size: 0.9em;
    margin: 0;
    opacity: 0.85;
}

.designer-section-header {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #0ea5e9;
}

.designer-section-header h2 {
    color: #1e40af;
}

.designer-section-header p {
    color: #3b82f6;
}

.brpd-section-header {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.brpd-section-header h2 {
    color: #92400e;
}

.brpd-section-header p {
    color: #b45309;
}

/* Approved Documents */
.approved-doc { 
    background: white; 
    border: 2px solid #e2e8f0; 
    margin: 15px 0; 
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.doc-header { 
    background: linear-gradient(135deg, #252525 0%, #545455 100%); 
    color: white; 
    padding: 16px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: all 0.3s ease;
    user-select: none;
    border-bottom: 3px solid #0ea5e9;
}

.doc-header-primary {
    display: block;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.doc-header-guidance {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 4px;
    font-style: italic;
}

.doc-header:hover { 
    background: linear-gradient(135deg, #414141 0%, #7a7a7a 100%);
    transform: translateY(-1px);
}

.doc-content { 
    display: none; 
    padding: 20px; 
    transition: all 0.3s ease;
    background: #fafafa;
}

.doc-content.open { 
    display: block; 
}

/* Requirements */
.requirement { 
    background: white; 
    border: 2px solid #e2e8f0; 
    margin: 15px 0; 
    padding: 20px; 
    border-radius: 10px; 
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.requirement:hover {
    border-color: #0ea5e9;
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.1);
}

.requirement-text { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); 
    padding: 15px; 
    margin-bottom: 15px; 
    border-radius: 8px; 
    font-size: 14px; 
    border-left: 4px solid #f59e0b; 
    font-weight: 500;
}

/* Compliance Area */
.compliance-area { 
    margin-top: 15px; 
}

.compliance-select { 
    padding: 10px; 
    margin-right: 10px; 
    border: 2px solid #e2e8f0; 
    border-radius: 8px;
    min-width: 150px;
    font-family: inherit;
    background: white;
    transition: border-color 0.3s ease;
}

.compliance-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Comment Sections */
.comment-section {
    margin-bottom: 20px;
}

.comment-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 15px;
}

.compliance-text { 
    width: 100%; 
    min-height: 60px; 
    padding: 12px; 
    border: 2px solid #e2e8f0; 
    border-radius: 8px; 
    margin-top: 5px; 
    margin-bottom: 10px;
    font-family: inherit;
    resize: none; /* Disable manual resize since we're auto-resizing */
    overflow: hidden; /* Hide scrollbars since we're auto-resizing */
    transition: all 0.3s ease; /* Smooth height transitions */
    line-height: 1.4; /* Consistent line height for better calculations */
    box-sizing: border-box; /* Include padding in height calculations */
    background: white;
}

.compliance-text:focus {
    border-color: #0ea5e9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Auto-resize specific styling */
.compliance-text.auto-resize {
    height: auto; /* Let JavaScript control the height */
}

/* Status Styling */
.compliant { 
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.2);
}

.not-compliant { 
    border-left: 4px solid #dc2626;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    box-shadow: 0 3px 12px rgba(220, 38, 38, 0.2);
}

.not-applicable { 
    border-left: 4px solid #6b7280;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    box-shadow: 0 3px 12px rgba(107, 114, 128, 0.2);
}

/* Message Styling */
.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #dc2626;
    display: none;
    font-weight: 500;
}

.success-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #10b981;
    display: none;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .project-info input {
        width: 100%;
        margin: 5px 0;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .header h1 {
        font-size: 2em;
        letter-spacing: 1px;
    }
}


/* ==========================================
   TAB NAVIGATION
   ========================================== */

.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 3px solid #0ea5e9;
}

.tab-btn {
    background: #f1f5f9;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-bottom: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    transition: all 0.2s ease;
    position: relative;
    top: 3px;
}

.tab-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.tab-btn.active {
    background: white;
    color: #0ea5e9;
    border-color: #0ea5e9;
    border-bottom: 3px solid white;
}

.tab-panel {
    display: none;
    padding-top: 20px;
}

.tab-panel.active {
    display: block;
}

/* ==========================================
   PD BR COMPLIANCE TRACKER TAB
   ========================================== */

.pdbr-header-section {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.pdbr-header-section h2 {
    color: #2d3748;
    font-size: 1.4em;
    margin-bottom: 8px;
}

.pdbr-header-section p {
    color: #4a5568;
    font-size: 0.95em;
}

/* PDBR Controls */
.pdbr-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 15px;
}

.pdbr-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.pdbr-search input {
    width: 100%;
    padding: 7px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.pdbr-search input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Progress Bar (reuses nd-progress-bar-bg/fill from shared styles) */
.pdbr-progress-section {
    padding: 15px 20px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 10px;
    margin-bottom: 15px;
}

.pdbr-progress-label {
    margin-bottom: 8px;
    font-size: 14px;
    color: #065f46;
}

/* Progress Bar Shared */
.nd-progress-bar-bg {
    width: 100%;
    height: 22px;
    background: #e2e8f0;
    border-radius: 11px;
    overflow: hidden;
}

.nd-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
    border-radius: 11px;
    transition: width 0.4s ease;
}

/* Buttons */
.pdbr-buttons {
    margin-bottom: 15px;
}

/* ==========================================
   PDBR ACCORDION STYLES
   ========================================== */

/* Group Accordion */
.pdbr-group {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.pdbr-group-header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #0ea5e9;
    user-select: none;
    transition: background 0.2s ease;
}

.pdbr-group-header:hover {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.pdbr-group-title {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.pdbr-group-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdbr-group-progress {
    font-size: 12px;
    opacity: 0.85;
    white-space: nowrap;
}

.pdbr-group-toggle {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.pdbr-group-body {
    display: none;
    background: #fafafa;
    padding: 0;
}

.pdbr-group-body.open {
    display: block;
}

/* Item Accordion */
.pdbr-item {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s ease;
}

.pdbr-item:last-child {
    border-bottom: none;
}

.pdbr-item-header {
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.15s ease;
}

.pdbr-item-header:hover {
    background: #f0f4f8;
}

.pdbr-item-title {
    font-weight: 600;
    font-size: 13px;
    color: #2d3748;
    flex: 1;
    margin-right: 12px;
}

.pdbr-item-id {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin-right: 10px;
    white-space: nowrap;
}

.pdbr-item-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.pdbr-badge-not-started { background: #f1f5f9; color: #64748b; }
.pdbr-badge-in-progress { background: #dbeafe; color: #1e40af; }
.pdbr-badge-complete { background: #d1fae5; color: #065f46; }
.pdbr-badge-not-applicable { background: #fef3c7; color: #92400e; }

/* Item status background colors */
.pdbr-status-complete .pdbr-item-header {
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.pdbr-status-in-progress .pdbr-item-header {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.pdbr-status-not-applicable .pdbr-item-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.pdbr-item-body {
    display: none;
    padding: 14px 18px 16px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.pdbr-item-body.open {
    display: block;
}

.pdbr-item-desc {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: white;
    border-left: 3px solid #0ea5e9;
    border-radius: 0 6px 6px 0;
}

.pdbr-item-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.pdbr-ref {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.pdbr-ref-regulation {
    background: #e0e7ff;
    color: #3730a3;
}

.pdbr-ref-guidance {
    background: #fce7f3;
    color: #9d174d;
}

.pdbr-item-controls {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pdbr-control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pdbr-control-label {
    font-size: 11px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdbr-status-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    min-width: 180px;
    transition: border-color 0.3s ease;
    background: white;
}

.pdbr-status-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.pdbr-notes {
    flex: 1;
    min-height: 60px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-width: 250px;
    transition: border-color 0.3s ease;
}

.pdbr-notes:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.pdbr-item-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .pdbr-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pdbr-item-controls {
        flex-direction: column;
    }

    .pdbr-notes {
        min-width: 100%;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media print {
    .pdbr-controls, .pdbr-buttons {
        display: none;
    }
}

/* ==========================================
   PD PROJECT INFO & SIGN-OFF (shared)
   ========================================== */

/* Project Info */
.pdt-project-info {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.pdt-project-info > strong {
    display: block;
    color: #2d3748;
    font-size: 15px;
    margin-bottom: 14px;
}

.pdt-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pdt-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    flex: 1 1 200px;
}

.pdt-field label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdt-field input[type="text"],
.pdt-field input[type="date"],
.pdt-field select {
    padding: 9px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.pdt-field input[type="text"]:focus,
.pdt-field input[type="date"]:focus,
.pdt-field select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.pdt-field-hrb {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-basis: 100%;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid #f59e0b;
}

.pdt-field-hrb label {
    margin: 0;
    font-size: 13px;
    color: #92400e;
}

.pdt-field-hrb input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.pdt-hrb-hint {
    font-size: 12px;
    color: #92400e;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .pdt-fields {
        flex-direction: column;
    }

    .pdt-field {
        min-width: 100%;
    }
}

/* Print */
@media print {
    .pdt-signoff {
        page-break-inside: avoid;
    }
}
.pdt-signoff {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    padding: 24px;
    margin-top: 20px;
    border-radius: 10px;
    border: 2px solid #2d3748;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.pdt-signoff h3 {
    color: #2d3748;
    font-size: 1.2em;
    margin-bottom: 12px;
    border-bottom: 3px solid #0ea5e9;
    padding-bottom: 8px;
}

.pdt-declaration-text {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.7;
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 4px solid #0ea5e9;
    border-radius: 0 8px 8px 0;
    margin-bottom: 18px;
    font-style: italic;
}

.pdt-signoff-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pdt-field-wide {
    flex-basis: 100%;
}

/* ==========================================
   PD REVIEW TAB
   ========================================== */

.review-header-section {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.review-header-section h2 {
    color: #2d3748;
    font-size: 1.4em;
    margin-bottom: 8px;
}

.review-header-section p {
    color: #4a5568;
    font-size: 0.95em;
}

.review-summary {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    padding: 20px;
    border: 2px solid #10b981;
    border-radius: 10px;
    margin-bottom: 15px;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.review-stat {
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
}

.review-stat-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.review-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 15px;
}

.review-filter,
.review-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-filter strong {
    color: #2d3748;
    font-size: 14px;
    white-space: nowrap;
}

.review-filter select {
    padding: 7px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background: white;
}

.review-search input {
    padding: 7px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    min-width: 220px;
}

/* ==========================================
   DESIGNER SUBMISSIONS TAB
   ========================================== */

.sub-designer-block {
    margin-bottom: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.sub-designer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: white;
    cursor: pointer;
    user-select: none;
}

.sub-designer-header:hover {
    background: linear-gradient(135deg, #1a202c, #2d3748);
}

.sub-designer-header.open {
    border-bottom: 3px solid #0ea5e9;
}

.sub-designer-name {
    font-weight: 700;
    font-size: 15px;
    margin-right: 12px;
}

.sub-designer-spec {
    font-size: 12px;
    opacity: 0.85;
    background: rgba(255,255,255,0.15);
    padding: 2px 10px;
    border-radius: 10px;
}

.sub-designer-count {
    font-size: 12px;
    background: #0ea5e9;
    padding: 2px 10px;
    border-radius: 10px;
    margin-right: 10px;
    font-weight: 600;
}

.sub-designer-date {
    font-size: 11px;
    opacity: 0.7;
}

.sub-designer-body {
    display: none;
    padding: 16px;
    background: #f8fafc;
}

.sub-designer-body.open {
    display: block;
}

.sub-doc-section {
    margin-bottom: 14px;
}

.sub-doc-title {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    padding: 10px 14px;
    font-weight: 600;
    font-size: 13px;
    color: #2d3748;
    border-radius: 6px 6px 0 0;
    border-left: 4px solid #0ea5e9;
}

.sub-req-item {
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 12px 14px;
    background: white;
}

.sub-req-item:last-child {
    border-radius: 0 0 6px 6px;
}

.sub-req-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
    margin-bottom: 8px;
}

.sub-req-field {
    margin: 4px 0;
    font-size: 13px;
}

.sub-req-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 6px;
}

.sub-req-value {
    padding: 5px 10px;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 13px;
    white-space: pre-wrap;
    margin-top: 2px;
}

.review-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.review-item:hover {
    border-color: #0ea5e9;
}

.review-item-header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid #0ea5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-item-header:hover {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.review-item-body {
    display: none;
    padding: 16px;
    background: #fafafa;
}

.review-item-body.open {
    display: block;
}

.review-status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.review-badge-not-reviewed { background: #fef3c7; color: #92400e; }
.review-badge-reviewed { background: #dbeafe; color: #1e40af; }
.review-badge-query { background: #fee2e2; color: #991b1b; }
.review-badge-accepted { background: #d1fae5; color: #065f46; }

.designer-response {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid #0ea5e9;
}

.designer-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.designer-response-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 14px;
}

.designer-response-specialism {
    background: #0ea5e9;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.designer-response-date {
    color: #64748b;
    font-size: 12px;
}

.designer-response-field {
    margin-bottom: 8px;
}

.designer-response-field-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.designer-response-field-value {
    color: #2d3748;
    font-size: 13px;
    line-height: 1.5;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 4px;
    white-space: pre-wrap;
}

.no-submissions {
    color: #94a3b8;
    font-style: italic;
    padding: 10px;
}

.pd-review-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid #e2e8f0;
}

.pd-review-section h4 {
    color: #2d3748;
    font-size: 13px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-review-controls {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.pd-review-status-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    min-width: 180px;
}

.pd-review-comment {
    flex: 1;
    min-height: 60px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-width: 300px;
}

.review-item-hidden {
    display: none;
}

@media (max-width: 768px) {
    .review-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .review-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pd-review-controls {
        flex-direction: column;
    }

    .pd-review-comment {
        min-width: 100%;
    }
}

@media print {
    .review-controls {
        display: none;
    }
}