/* ==========================================================================
   BRC Reusable Components (Tables, Badges, Modals, Toasts)
   ========================================================================== */

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    margin-top: 1rem;
}

.brc-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.brc-table th, .brc-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.brc-table th {
    background-color: var(--gray-800);
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
}

.brc-table tr:hover {
    background-color: #f9fafb;
}

/* Badges (Status Indicators) */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-yellow { background-color: #fef08a; color: #854d0e; } /* Menunggu/Proses */
.badge-gray { background-color: #e5e7eb; color: #374151; } /* Lead/Draft */
.badge-green { background-color: #bbf7d0; color: #166534; } /* Aktif/Selesai */

/* Modal (Popup Forms) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17, 24, 39, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: 2rem;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 1rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.875rem; }
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--yellow-500);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--yellow-500);
    box-shadow: var(--shadow-md);
    animation: slideUp var(--transition-fast) forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}