/* Vendors Module CSS */

/* --- 1. Registration Page --- */
.vendor-registration-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

.registration-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.registration-header {
    text-align: center;
    padding: 40px 32px 24px;
    background: linear-gradient(135deg, #FEF9E7 0%, #FCE588 100%);
    border-bottom: 3px solid #D4A853;
}

.registration-header .logo {
    height: 48px;
    margin-bottom: 16px;
}

.registration-title {
    font-size: 24px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.registration-subtitle {
    font-size: 14px;
    color: #6B7280;
}

/* Progress */
.progress-container {
    padding: 24px 32px;
    border-bottom: 1px solid #E5E7EB;
}

.progress-info {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
}

.progress-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4A853, #E8C97A);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Form */
.form-step {
    display: none;
    padding: 32px;
}

.form-step.active {
    display: block;
}

.form-section {
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F3F4F6;
}

.section-icon {
    font-size: 24px;
}

.subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: #4B5563;
    margin: 24px 0 16px;
}

.form-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 24px 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}

.required {
    color: red;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: inherit;
}

.form-hint {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
    display: block;
}

.form-row {
    display: flex;
    gap: 24px;
}

.form-row .form-group {
    flex: 1;
}

/* Toggle Options */
.toggle-options {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.toggle-option {
    flex: 1;
    cursor: pointer;
}

.toggle-option input {
    display: none;
}

.toggle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.2s;
}

.toggle-icon {
    font-size: 32px;
}

.toggle-text {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

.toggle-option input:checked+.toggle-card {
    border-color: #D4A853;
    background: #FFFBEB;
}

.toggle-card:hover {
    border-color: #D4A853;
}

/* VAT Fields Animation */
.vat-fields {
    animation: slideDown 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Actions */
.form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.form-actions-split {
    display: flex;
    justify-content: space-between;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: #D4A853;
    color: white;
    /* Or black based on design system, staying consistent */
    color: #000;
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

/* IBAN Input */
.iban-input {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- 2. Vendor Project Details & Invoice --- */

/* Project Info Box */
.project-info-box {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
}

.project-info-box .info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.project-info-box .info-icon {
    font-size: 20px;
}

.project-info-box .info-text {
    font-size: 14px;
    color: #374151;
}

/* Total Calculation */
.total-calculation {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: 12px;
    padding: 16px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.calc-label {
    font-size: 14px;
    color: #6B7280;
}

.calc-value {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.calc-total {
    border-top: 2px solid #D4A853;
    margin-top: 8px;
    padding-top: 12px;
}

.calc-total .calc-label,
.calc-total .calc-value {
    font-size: 16px;
    font-weight: 700;
    color: #D4A853;
}

/* Bank Account Options */
.bank-account-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bank-option {
    cursor: pointer;
}

.bank-option input {
    display: none;
}

.bank-card {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.bank-option input:checked+.bank-card {
    border-color: #D4A853;
    background: #FFFBEB;
}

.bank-card:hover {
    border-color: #D4A853;
}

.bank-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.radio-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    position: relative;
}

.bank-option input:checked+.bank-card .radio-indicator {
    border-color: #D4A853;
}

.bank-option input:checked+.bank-card .radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #D4A853;
    border-radius: 50%;
}

.bank-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.bank-details {
    padding-right: 32px;
}

.bank-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.bank-iban {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 4px;
}

.bank-holder {
    font-size: 13px;
    color: #6B7280;
}

.bank-card-new {
    border-style: dashed;
}

/* Form Warning */
.form-warning {
    background: #FEF3C7;
    color: #92400E;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 8px;
}

/* Uploaded File */
.uploaded-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    margin-top: 12px;
}

.uploaded-file .file-icon {
    font-size: 24px;
}

.uploaded-file .file-name {
    flex: 1;
    font-size: 14px;
    color: #166534;
}

.uploaded-file .btn-remove {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 18px;
    cursor: pointer;
}

/* VAT Badge */
.vat-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #D1FAE5;
    color: #059669;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

/* Confirmation Checkbox */
.confirmation-checkbox {
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    position: relative;
}

.checkbox-label input:checked+.checkbox-custom {
    background: #D4A853;
    border-color: #D4A853;
}

.checkbox-label input:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 14px;
    color: #374151;
}

/* Modal Overlay (Generic) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
}

.file-upload-area {
    border: 2px dashed #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #D4A853;
    background: #FFFBEB;
}

/* Vendor Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-primary);
}

.stat-card.stat-active .stat-icon {
    background: #E0F2FE;
    color: #0284C7;
}

.stat-card.stat-completed .stat-icon {
    background: #DCFCE7;
    color: #16A34A;
}

.stat-card.stat-total .stat-icon {
    background: #FEF3C7;
    color: #D97706;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Admin Vendor Table */
.vendor-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.filters-bar {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th,
td {
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
}

th {
    background: #F9FAFB;
    font-weight: 600;
    color: #4B5563;
    font-size: 14px;
}

td {
    font-size: 14px;
    color: #1F2937;
}

/* Actions Menu */
.actions-cell {
    position: relative;
}

.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #6B7280;
    transition: background-color 0.2s, color 0.2s;
}

.action-btn:hover {
    background-color: #F3F4F6;
    color: #111827;
}

.action-menu {
    display: none;
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-10%);
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    min-width: 160px;
    padding: 4px 0;
    text-align: right;
}

.action-menu.show {
    display: block;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    text-align: right;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-family: inherit;
    transition: background-color 0.2s;
    text-decoration: none;
}

.action-item:hover {
    background-color: #F9FAFB;
    color: #D4A853;
}

.action-item.delete {
    color: #DC2626;
}

.action-item.delete:hover {
    background-color: #FEF2F2;
}

/* Import Modal Specific Styles */

/* Template Section */
.template-section {
    text-align: center;
    padding: 32px;
    background: #F9FAFB;
    border-radius: 12px;
    margin-bottom: 24px;
}

.template-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.template-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.template-desc {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 16px;
}

/* Divider with Text */
.divider-with-text {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.divider-with-text span {
    padding: 0 16px;
    color: #9CA3AF;
    font-size: 14px;
}

/* Columns Info */
.columns-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}

.columns-info .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: #1E40AF;
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.file-info .file-icon {
    font-size: 24px;
}

.file-info .file-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #166534;
}

.btn-change {
    background: none;
    border: none;
    color: #D4A853;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

/* Summary Cards */
.summary-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.summary-card .summary-value {
    font-size: 32px;
    font-weight: 700;
    color: #374151;
}

.summary-card .summary-label {
    font-size: 13px;
    color: #6B7280;
    margin-top: 4px;
}

.summary-card.summary-success {
    background: #F0FDF4;
    border-color: #BBF7D0;
}

.summary-card.summary-success .summary-value {
    color: #059669;
}

.summary-card.summary-error {
    background: #FEF2F2;
    border-color: #FECACA;
}

.summary-card.summary-error .summary-value {
    color: #DC2626;
}

/* Preview Table */
.preview-section {
    margin-bottom: 24px;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.preview-table-wrapper {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table th,
.preview-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid #E5E7EB;
}

.preview-table th {
    background: #F9FAFB;
    font-weight: 600;
    font-size: 13px;
    color: #6B7280;
    position: sticky;
    top: 0;
}

.preview-table td {
    font-size: 14px;
    color: #374151;
}

.preview-table tr.has-error {
    background: #FEF2F2;
}

.preview-table tr.has-error td {
    color: #DC2626;
}

.error-message {
    display: block;
    font-size: 11px;
    color: #DC2626;
    margin-top: 4px;
}

.preview-pagination {
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    color: #6B7280;
    border-top: 1px solid #E5E7EB;
}

/* Import Options */
.import-options {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 20px;
}

.options-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
}

.checkbox-option input {
    display: none;
}

.checkbox-option .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
}

.checkbox-option input:checked+.checkbox-custom {
    background: #D4A853;
    border-color: #D4A853;
}

.checkbox-option input:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-option .checkbox-text {
    font-size: 14px;
    color: #374151;
}

/* Result Section */
.result-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

.result-title {
    font-size: 24px;
    font-weight: 600;
    color: #059669;
    text-align: center;
    margin-bottom: 24px;
}

.result-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.result-card {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: #F0FDF4;
    border-radius: 12px;
}

.result-card .result-value {
    font-size: 36px;
    font-weight: 700;
    color: #059669;
}

.result-card .result-label {
    font-size: 13px;
    color: #166534;
    margin-top: 4px;
}

.result-card.result-warning {
    background: #FEF3C7;
}

.result-card.result-warning .result-value {
    color: #D97706;
}

.result-card.result-warning .result-label {
    color: #92400E;
}

.result-details {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid #E5E7EB;
}

.detail-item .detail-icon {
    font-size: 20px;
}

.detail-item .detail-text {
    font-size: 14px;
    color: #374151;
}

.detail-item.warning .detail-text {
    color: #92400E;
}

.error-report {
    text-align: center;
}

/* Footer Steps */
.footer-step {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
}

/* Import Step Visibility */
.import-step {
    display: none;
}

/* Enhanced Filter Bar Styles */
.filters-bar-enhanced {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.search-group {
    flex: 2;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 12px;
    color: #9CA3AF;
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 8px 40px 8px 16px;
    /* Right padding for icon in RTL */
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
    background: #F9FAFB;
}

.search-input:focus {
    background: white;
    border-color: #D4A853;
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
    outline: none;
}

.filter-group {
    position: relative;
    min-width: 160px;
}

.filter-select {
    width: 100%;
    height: 42px;
    padding: 8px 36px 8px 16px;
    /* Right padding involves custom arrow handling if needed, usually browser default is left in RTL? Adjusting. */
    appearance: none;
    -webkit-appearance: none;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    color: #4B5563;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    /* RTL: Arrow on left */
    background-size: 16px;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: #D1D5DB;
}

.filter-select:focus {
    border-color: #D4A853;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.btn-icon-only {
    height: 42px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 10px;
    padding: 0;
}

@media (max-width: 768px) {
    .filters-bar-enhanced {
        flex-direction: column;
        align-items: stretch;
    }

    .search-group,
    .filter-group {
        width: 100%;
    }
}

.import-step.active {
    display: block;
}

/* Update for Vendor Types & Specs */
/* Type Badge */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.type-internal {
    background: #DBEAFE;
    color: #1D4ED8;
}


.type-external {
    background: #F3E8FF;
    color: #7C3AED;
}

.rating-number {
    font-weight: 700;
    font-size: 14px;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rating-number::before {
    content: "★";
    color: #FBBF24;
    font-size: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-active {
    background: #DCFCE7;
    color: #166534;
}

.status-inactive {
    background: #FEF3C7;
    color: #D97706;
}

.badge-icon {
    font-size: 12px;
}

/* Specialization Badge */
.spec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    background: #F3F4F6;
    padding: 4px 8px;
    border-radius: 6px;
}

.spec-main {
    color: #374151;
    font-weight: 500;
}

.spec-separator {
    color: #9CA3AF;
    font-weight: bold;
}

.spec-sub {
    color: #6B7280;
}

/* Modal Type Options */
.type-options {
    display: flex;
    gap: 16px;
}

.type-option {
    flex: 1;
    cursor: pointer;
    margin-bottom: 0;
}

.type-option input {
    display: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.2s;
    height: 100%;
}

.type-option input:checked+.type-card {
    border-color: #D4A853;
    background: #FFFBEB;
}

.type-card:hover {
    border-color: #D4A853;
}

.type-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.type-name {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.type-desc {
    font-size: 12px;
    color: #6B7280;
}

/* Form Styles */
.form-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 24px 0;
}

.required {
    color: #DC2626;
    margin-right: 4px;
}

.form-hint {
    font-size: 12px;
    color: #6B7280;
    margin-top: 6px;
    display: block;
}

.modal-content.modal-md {
    max-width: 600px;
}

/* Action Menu - Explicit Override */
.actions-cell {
    /* Ensure overflow is visible for the menu to pop out */
    overflow: visible !important;
    position: relative;
    width: 50px;
    /* Fixed width for action column */
    text-align: center;
}

.action-menu-container {
    position: relative;
    display: inline-block;
}

.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: #F3F4F6;
    color: #374151;
}

.action-menu {
    position: absolute;
    top: 100%;
    /* Anchor below button */
    left: 0;
    right: auto;
    /* RTL Fix: Align left side to left side of container so it expands rightwards (into screen) */

    z-index: 9999 !important;
    /* Force high Z-Index */
    min-width: 180px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #E5E7EB;

    display: none;
    /* Hidden by default */
    transform-origin: top left;
}

.action-menu.show {
    display: block !important;
    animation: menuFadeIn 0.2s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    text-align: right;
    /* RTL */
    font-family: inherit;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    /* for <a> tags */
    transition: background 0.2s;
    box-sizing: border-box;
}

.action-item span {
    font-size: 16px;
    width: 20px;
    display: inline-block;
}

.action-item:hover {
    background: #F9FAFB;
    color: #D4A853;
}

.action-item.delete {
    color: #DC2626;
}

.action-item.delete:hover {
    background: #FEF2F2;
}

.menu-divider {
    height: 1px;
    background: #F3F4F6;
    margin: 6px 0;
}

.menu-arrow {
    position: absolute;
    top: -6px;
    left: 12px;
    right: auto;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid #E5E7EB;
    border-top: 1px solid #E5E7EB;
}