/* A3 Report Styles */

.a3-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.a3-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.a3-header h2 {
    font-size: 22px;
    color: #1d1d1f;
    margin: 0;
}

.a3-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.a3-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.a3-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.a3-btn-primary:hover { opacity: 0.9; }

.a3-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.a3-btn-secondary:hover { background: #e5e7eb; }

.a3-btn-ai {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.a3-btn-ai:hover { opacity: 0.9; }

.a3-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Report list */
.a3-list {
    display: grid;
    gap: 12px;
}

.a3-list-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.a3-list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.a3-list-number {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    white-space: nowrap;
}

.a3-list-info {
    flex: 1;
    min-width: 0;
}

.a3-list-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.a3-list-meta {
    font-size: 12px;
    color: #6e6e73;
}

.a3-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.a3-status-draft { background: #f3f4f6; color: #6b7280; }
.a3-status-in_progress { background: #dbeafe; color: #1d4ed8; }
.a3-status-review { background: #fef3c7; color: #92400e; }
.a3-status-completed { background: #d1fae5; color: #065f46; }
.a3-status-archived { background: #e5e7eb; color: #4b5563; }

/* A3 Sheet - One-page layout */
.a3-sheet {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.a3-sheet-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.a3-sheet-title {
    font-size: 18px;
    font-weight: 700;
}

.a3-sheet-number {
    font-size: 13px;
    opacity: 0.85;
}

.a3-sheet-meta {
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #4b5563;
    flex-wrap: wrap;
}

.a3-sheet-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 2x4 grid of blocks */
.a3-blocks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.a3-block {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    min-height: 180px;
}

.a3-block:nth-child(even) {
    border-right: none;
}

.a3-block:nth-child(7),
.a3-block:nth-child(8) {
    border-bottom: none;
}

.a3-block-header {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a3-block-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.a3-block-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-left: 8px;
    flex: 1;
}

.a3-block-body {
    padding: 12px 16px;
    min-height: 120px;
}

.a3-block-body textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
    color: #1d1d1f;
}

.a3-block-body textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.a3-block-text {
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
}

.a3-block-empty {
    color: #9ca3af;
    font-style: italic;
    font-size: 13px;
}

/* AI suggestion */
.a3-ai-suggestion {
    margin-top: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fdf2f8, #ede9fe);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #4b5563;
    border-left: 3px solid #a78bfa;
}

.a3-ai-suggestion-header {
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 4px;
}

/* Footer actions */
.a3-sheet-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Mobile */
@media (max-width: 768px) {
    .a3-blocks-grid {
        grid-template-columns: 1fr;
    }

    .a3-block {
        border-right: none;
    }

    .a3-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print styles for PDF */
@media print {
    .a3-container { padding: 0; }
    .a3-btn, .a3-header-actions, .a3-sheet-footer { display: none !important; }
    .a3-sheet { border: none; box-shadow: none; }
    .a3-blocks-grid { grid-template-columns: 1fr 1fr; }
    .a3-block { min-height: auto; break-inside: avoid; }
}
