/* ==========================================================================
   Idara Manzil Frontend Styles - Inter Font & Modern Responsive UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.idm-course-purchase-box,
.idm-student-portal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    box-sizing: border-box;
}

.idm-course-purchase-box {
    margin: 18px 0 25px 0;
    width: 100%;
}

.idm-btn-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #16a34a;
    color: #ffffff !important;
    border: none;
    padding: 14px 20px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
    font-family: 'Inter', sans-serif;
}

.idm-btn-primary-action:hover {
    background: #15803d;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.idm-buy-subtext {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    text-align: center;
}

/* Status Cards on Course Page */
.idm-status-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.idm-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.idm-status-card.card-pending {
    border-color: #bfdbfe;
    background: #f8fbff;
}
.idm-status-card.card-pending::before {
    background: #2563eb;
}

.idm-status-card.card-review {
    border-color: #fde68a;
    background: #fffdf5;
}
.idm-status-card.card-review::before {
    background: #f59e0b;
}

.idm-card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.idm-status-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.pill-pending { background: #dbeafe; color: #1d4ed8; }
.pill-review  { background: #fef3c7; color: #b45309; }

.idm-challan-tag {
    font-family: monospace;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.idm-card-msg {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 14px;
}

/* Action Button Rows (Clean, robust, no-overlap) */
.idm-action-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .idm-action-button-row {
        grid-template-columns: 1fr;
    }
}

.idm-btn-action-outline {
    background: #ffffff;
    border: 1.5px solid #3b82f6;
    color: #2563eb !important;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-align: center;
    box-sizing: border-box;
}

.idm-btn-action-outline:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8 !important;
}

.idm-btn-action-primary {
    background: #16a34a;
    color: #ffffff !important;
    border: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.idm-btn-action-primary:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.idm-cancel-row {
    display: flex;
    justify-content: flex-end;
}

.idm-btn-action-cancel {
    background: transparent;
    border: none;
    color: #94a3b8 !important;
    padding: 4px 6px;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.idm-btn-action-cancel:hover {
    color: #dc2626 !important;
    background: #fee2e2;
}

/* Inline Upload Box */
.idm-upload-section {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.idm-form-group {
    margin-bottom: 10px;
}

.idm-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #334155;
}

.idm-file-input,
.idm-text-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.idm-btn-submit-receipt {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 9px 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.idm-btn-submit-receipt:hover {
    background: #1d4ed8;
}

.idm-upload-spinner {
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
}

.idm-form-msg {
    margin-top: 8px;
    font-size: 12.5px;
}

/* Student Portal Dashboard Styles */
.idm-student-portal {
    max-width: 900px;
    margin: 20px auto;
}

.idm-portal-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.idm-portal-header h2 {
    font-size: 22px;
    color: #0f172a;
    margin-bottom: 5px;
    font-weight: 700;
}

.idm-portal-header p {
    color: #64748b;
    font-size: 14px;
}

.idm-challan-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.idm-challan-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.idm-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.idm-card-challan-no strong {
    font-size: 15px;
    color: #2563eb;
    font-family: monospace;
}

.idm-badge-ui {
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 6px;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger  { background: #fef2f2; color: #ef4444; }
.badge-pending { background: #e0f2fe; color: #0284c7; }

.idm-course-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.idm-meta-row {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 14px;
}

.idm-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.idm-btn-outline {
    background: #fff;
    border: 1.5px solid #3b82f6;
    color: #2563eb !important;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
    cursor: pointer;
}

.idm-btn-outline:hover {
    background: #eff6ff;
}

.idm-btn-toggle-upload {
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #16a34a;
    color: #fff;
}

.idm-btn-toggle-upload:hover {
    background: #15803d;
}

.idm-btn-danger-outline {
    background: #fff;
    border: 1px solid #fca5a5;
    color: #dc2626 !important;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin-left: auto;
}

.idm-btn-danger-outline:hover {
    background: #fef2f2;
}
