/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --purple-color: #8b5cf6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: #000000;
    min-height: 100vh;
    padding: 2rem 1rem;
    direction: rtl;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-save {
    background: var(--success-color);
    color: white;
}

.btn-save:hover {
    background: #059669;
}

.btn-print {
    background: var(--primary-color);
    color: white;
}

.btn-print:hover {
    background: #1d4ed8;
}

.btn-clear {
    background: var(--danger-color);
    color: white;
}

.btn-clear:hover {
    background: #dc2626;
}

.btn-add {
    background: var(--success-color);
    color: white;
    margin-top: 1rem;
    width: 100%;
}

.btn-add:hover {
    background: #059669;
}

.btn-upload {
    background: var(--purple-color);
    color: white;
}

.btn-upload:hover {
    background: #7c3aed;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-delete {
    color: var(--danger-color);
}

.btn-delete:hover {
    background: #fee2e2;
}

/* Form */
.form {
    padding: 2rem;
}

/* Sections */
.section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    border-right: 4px solid;
    background: var(--gray-50);
}

.section-green {
    border-right-color: var(--success-color);
}

.section-blue {
    border-right-color: var(--info-color);
}

.section-yellow {
    border-right-color: var(--warning-color);
}

.section-orange {
    border-right-color: #f97316;
}

.section-purple {
    border-right-color: var(--purple-color);
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section h2 i {
    font-size: 1.25rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-input,
.table-textarea,
.table-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.table-input:focus,
.table-textarea:focus,
.table-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.table-textarea {
    resize: vertical;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: white;
    margin: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.status-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge:not(.status-locked) {
    background: var(--warning-color);
    color: white;
}

.status-locked {
    background: var(--gray-300);
    color: var(--gray-700);
}

.status-approved {
    background: var(--success-color) !important;
    color: white !important;
}

.status-arrow {
    font-size: 1.5rem;
    color: var(--gray-400);
}

/* Meeting Phase */
.meeting-phase {
    animation: fadeIn 0.5s ease;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0 2rem 2rem 2rem;
    border-radius: 12px;
}

.phase-header i {
    font-size: 2rem;
}

.phase-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Phase Footer */
.phase-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: 12px;
    flex-wrap: wrap;
    margin: 0 2rem 2rem 2rem;
}

/* Approval Section */
.approval-section {
    padding: 3rem 2rem;
    animation: fadeIn 0.5s ease;
}

.approval-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.approval-icon {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.approval-card h2 {
    font-size: 1.75rem;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.approval-card p {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.email-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 2px solid var(--primary-color);
}

.email-info i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.email-info span {
    font-size: 1rem;
    color: var(--gray-700);
}

.email-info strong {
    color: var(--primary-color);
    font-weight: 700;
}

.approval-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-approve {
    background: var(--success-color);
    color: white;
    padding: 1rem 2rem;
}

.btn-approve:hover {
    background: #059669;
}

.btn-reject {
    background: var(--danger-color);
    color: white;
    padding: 1rem 2rem;
}

.btn-reject:hover {
    background: #dc2626;
}

/* Form Footer */
.form-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: 12px;
    flex-wrap: wrap;
}

/* Uploaded Files Section */
.uploaded-files-section {
    margin: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border-right: 4px solid var(--purple-color);
}

.uploaded-files-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.file-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--purple-color);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 600;
    color: var(--gray-800);
    word-break: break-word;
}

.file-size {
    font-size: 0.85rem;
    color: var(--gray-700);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-remove-file {
    padding: 0.5rem 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-file:hover {
    background: #dc2626;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .info-banner,
    .status-bar,
    .form-footer,
    .phase-footer,
    .btn-icon,
    .uploaded-files-section,
    .approval-section {
        display: none !important;
    }

    .container {
        box-shadow: none;
    }

    .section {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }

    .header {
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .data-table thead {
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    input,
    textarea,
    select {
        border: none !important;
        background: transparent !important;
        padding: 0.25rem !important;
    }

    .table-input,
    .table-textarea,
    .table-select {
        border: none !important;
        padding: 0.25rem !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .header {
        padding: 1.5rem;
        text-align: center;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .form {
        padding: 1rem;
    }

    .section {
        padding: 1rem;
    }

    .section h2 {
        font-size: 1.25rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .status-bar {
        margin: 1rem;
        padding: 1rem;
        gap: 1rem;
    }

    .status-item {
        font-size: 0.9rem;
    }

    .status-item i {
        font-size: 1.5rem;
    }

    .phase-header {
        margin: 0 1rem 1rem 1rem;
        padding: 1rem;
    }

    .phase-header h2 {
        font-size: 1.2rem;
    }

    .phase-footer {
        margin: 0 1rem 1rem 1rem;
        padding: 1rem;
        flex-direction: column;
    }

    .phase-footer .btn {
        width: 100%;
    }

    .approval-section {
        padding: 2rem 1rem;
    }

    .approval-card {
        padding: 2rem 1rem;
    }

    .approval-icon {
        font-size: 3rem;
    }

    .approval-card h2 {
        font-size: 1.3rem;
    }

    .approval-actions {
        flex-direction: column;
    }

    .approval-actions .btn {
        width: 100%;
    }

    .form-footer {
        flex-direction: column;
        padding: 1rem;
    }

    .form-footer .btn {
        width: 100%;
    }

    .uploaded-files-section {
        margin: 1rem;
        padding: 1rem;
    }

    .file-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .file-actions {
        width: 100%;
    }

    .btn-remove-file {
        width: 100%;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Action Items Row Animation */
.action-item-row {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}