/* ==========================================================================
   BioCore Component Library
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
    background: var(--secondary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-emerald {
    background: var(--emerald);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--slate-300);
    color: var(--slate-700);
}

.btn-outline:hover {
    background: var(--slate-100);
    border-color: var(--slate-400);
    color: var(--slate-900);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.775rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-full {
    width: 100%;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-emerald { background: var(--emerald-light); color: #047857; }
.badge-amber { background: var(--amber-light); color: #b45309; }
.badge-rose { background: var(--rose-light); color: #be123c; }
.badge-purple { background: var(--secondary-light); color: var(--secondary); }
.badge-slate { background: var(--slate-200); color: var(--slate-700); }

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--slate-700);
}

.form-control {
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--slate-800);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.data-table th {
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--slate-700);
    vertical-align: middle;
}

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

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

/* Tab Pills */
.tab-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--slate-500);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Stepper Component */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.stepper-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--slate-200);
    z-index: 1;
    transform: translateY(-50%);
}

.stepper-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--emerald));
    transition: width 0.4s ease;
}

.stepper-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card);
    padding: 0 0.5rem;
}

.step-node {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--slate-100);
    border: 2px solid var(--slate-300);
    color: var(--slate-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
}

.stepper-step.completed .step-node {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #ffffff;
}

.stepper-step.active .step-node {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

.step-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-600);
    text-align: center;
}

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    padding: 2rem;
}

.btn-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    color: var(--slate-400);
    line-height: 1;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-modal-close:hover {
    background: var(--slate-100);
    color: var(--slate-800);
}

/* Drawer Component (Notification Log) */
.drawer-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 90vw;
    background: #ffffff;
    z-index: 1010;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--slate-900);
    color: #ffffff;
}

.drawer-header h3 {
    color: #ffffff;
    font-size: 1rem;
}

.drawer-filter {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--slate-100);
    border-bottom: 1px solid var(--border-color);
}

.filter-chip {
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid var(--slate-300);
    color: var(--slate-600);
}

.filter-chip.active {
    background: var(--slate-800);
    color: #ffffff;
    border-color: var(--slate-800);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-item {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.825rem;
}

.log-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--slate-500);
    font-size: 0.75rem;
}

.log-msg {
    color: var(--slate-800);
    font-weight: 500;
    line-height: 1.4;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--slate-900);
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* OTP Box Style */
.otp-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.otp-input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--slate-300);
    border-radius: var(--radius-md);
}

.otp-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
