/**
 * assets/css/chat_page/screen_recorder.css
 * AbraCollab Screen Recorder & Knowledge Capture System
 * BrightSaaS Design System Styling — Full Dark Mode & High Contrast Compatibility
 */

/* ── Root Container ───────────────────────────────────────────────────── */
.screen_recorder_middle_view {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    background-color: #0b0f19 !important;
    color: #f1f5f9 !important;
    position: relative;
    padding: 20px 24px;
    box-sizing: border-box;
}

/* ── Panels ───────────────────────────────────────────────────────────── */
.sr_panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    background: transparent !important;
}

.sr_panel.d-none {
    display: none !important;
}

/* ── Header Banner ────────────────────────────────────────────────────── */
.sr_header_banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.sr_header_icon {
    font-size: 26px;
    color: #6366f1 !important;
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sr_header_text h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

.sr_header_text p {
    font-size: 13.5px;
    color: #94a3b8 !important;
    margin-bottom: 0;
    max-width: 850px;
    line-height: 1.5;
}

.sr_header_actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.sr_view_library_btn {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sr_view_library_btn:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
}

/* ── Setup Grid ───────────────────────────────────────────────────────── */
.sr_setup_grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .sr_setup_grid {
        grid-template-columns: 1fr;
    }
}

.sr_setup_card {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sr_card_title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

.sr_card_title i {
    color: #6366f1;
}

/* ── Config Groups ────────────────────────────────────────────────────── */
.sr_config_group {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #1e293b !important;
}

.sr_config_group:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sr_label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b !important;
    margin-bottom: 8px;
    display: block;
}

.sr_sublabel {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1 !important;
}

/* ── Inputs & Selects (Matching Notes styling) ────────────────────────── */
.sr_panel select.form-select,
.sr_panel input.form-control,
.sr_panel textarea.form-control,
.sr_modal_card select.form-select,
.sr_modal_card input.form-control,
.sr_modal_card textarea.form-control {
    background: #151d30 !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
}

.sr_panel select.form-select:focus,
.sr_panel input.form-control:focus,
.sr_panel textarea.form-control:focus,
.sr_modal_card select.form-select:focus,
.sr_modal_card input.form-control:focus,
.sr_modal_card textarea.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3) !important;
    background: #1b253d !important;
    color: #ffffff !important;
}

.sr_panel select.form-select option {
    background: #0f172a !important;
    color: #ffffff !important;
}

/* ── Source Badges ────────────────────────────────────────────────────── */
.sr_source_selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sr_source_badge {
    padding: 12px 8px;
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8 !important;
}

.sr_source_badge i {
    font-size: 18px;
}

.sr_source_badge.active,
.sr_source_badge:hover {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.2) !important;
    color: #ffffff !important;
}

/* ── Switch Rows ──────────────────────────────────────────────────────── */
.sr_switch_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sr_switch_title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    display: block;
}

.sr_switch_desc {
    font-size: 12px;
    color: #94a3b8 !important;
    display: block;
    margin-top: 2px;
}

.sr_toggle_input {
    width: 2.75rem !important;
    height: 1.5rem !important;
    cursor: pointer;
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.sr_toggle_input:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

/* ── Layout Options ───────────────────────────────────────────────────── */
.sr_layout_options {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.sr_layout_btn {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    color: #cbd5e1 !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sr_layout_btn:hover {
    border-color: #334155 !important;
    color: #ffffff !important;
}

.sr_layout_btn.active {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
}

/* ── Live VU Meter ────────────────────────────────────────────────────── */
.sr_vu_meter_wrap {
    background: #151d30 !important;
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid #1e293b !important;
}

.sr_vu_label {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #94a3b8 !important;
    margin-bottom: 6px;
    font-weight: 500;
}

.sr_vu_bar_container {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.sr_vu_bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #6366f1 70%, #ef4444 100%);
    transition: width 0.05s ease-out;
    border-radius: 3px;
}

/* ── Live Preview Viewport ────────────────────────────────────────────── */
.sr_preview_viewport {
    background: #020617 !important;
    border: 1px solid #1e293b !important;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.sr_preview_placeholder {
    text-align: center;
    color: #64748b !important;
    padding: 24px;
}

.sr_preview_placeholder i {
    font-size: 42px;
    color: #334155 !important;
    margin-bottom: 10px;
    display: block;
}

.sr_cam_video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.sr_privacy_box {
    font-size: 12.5px;
    color: #94a3b8 !important;
    background: #151d30 !important;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid #6366f1 !important;
    margin-bottom: 24px;
    line-height: 1.5;
}

.sr_start_action_wrap {
    margin-top: auto;
}

.sr_start_recording_btn {
    width: 100%;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sr_start_recording_btn:hover {
    background: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.6);
}

.sr_rec_pulse {
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: srPulse 1.5s infinite;
}

@keyframes srPulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}

/* ── Floating Recording Control Bar ───────────────────────────────────── */
.sr_recording_toolbar.d-none {
    display: none !important;
}

.sr_recording_toolbar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.3);
    border-radius: 40px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10000;
}

.sr_toolbar_drag_handle {
    color: #475569 !important;
    cursor: grab;
}

.sr_toolbar_indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-family: monospace;
    font-size: 16px;
    color: #ffffff !important;
}

.sr_live_dot {
    width: 10px;
    height: 10px;
    background: #ef4444 !important;
    border-radius: 50%;
    animation: srPulse 1s infinite;
}

.sr_toolbar_controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sr_tool_btn {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sr_tool_btn:hover {
    background: #334155 !important;
}

.sr_tool_btn.sr_stop_btn {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.sr_tool_btn.sr_stop_btn:hover {
    background: #dc2626 !important;
}

/* ── Processing Screen ────────────────────────────────────────────────── */
.sr_processing_panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.sr_processing_card {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.sr_proc_title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 6px;
    color: #ffffff !important;
}

.sr_proc_desc {
    font-size: 13px;
    color: #94a3b8 !important;
    margin-bottom: 24px;
}

.sr_stages_list {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sr_stage_item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #151d30 !important;
    border-radius: 8px;
    font-size: 13px;
    color: #94a3b8 !important;
    border: 1px solid #1e293b !important;
    transition: all 0.3s ease;
}

.sr_stage_item.completed {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}

.sr_stage_item.active {
    color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    font-weight: 600;
}

.sr_spin {
    animation: srSpin 1s linear infinite;
}

@keyframes srSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Knowledge Viewer ─────────────────────────────────────────────────── */
.sr_viewer_topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    margin-bottom: 18px;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 12px;
}

.sr_viewer_topbar_left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sr_editable_title_wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 520px;
}

.sr_title_input {
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    width: 100%;
}

.sr_title_input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3) !important;
}

.sr_viewer_topbar_right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sr_viewer_layout {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

@media (max-width: 1024px) {
    .sr_viewer_layout {
        grid-template-columns: 1fr;
    }
}

.sr_player_section {
    display: flex;
    flex-direction: column;
}

.sr_video_container {
    background: #000000 !important;
    border: 1px solid #1e293b !important;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* Video.js fluid wrapper fills the container */
.sr_video_container > .video-js {
    width: 100% !important;
    border-radius: 12px;
}

/* Ensure Video.js control icons always render with VideoJS font */
.sr_video_container .video-js .vjs-icon-placeholder,
.sr_video_container .video-js .vjs-icon-placeholder:before,
.sr_video_container .video-js .vjs-button > .vjs-icon-placeholder:before,
.sr_video_container .video-js .vjs-play-control .vjs-icon-placeholder:before,
.sr_video_container .video-js .vjs-mute-control .vjs-icon-placeholder:before,
.sr_video_container .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,
.sr_video_container .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before {
    font-family: VideoJS !important;
    font-weight: normal !important;
    font-style: normal !important;
}

.sr_video_elem,
.sr_video_container .video-js video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sr_meta_strip {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 14px;
    margin-top: 10px;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 10px;
    font-size: 13px;
    color: #94a3b8 !important;
}

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

.sr_meta_item i {
    color: #6366f1;
}

/* ── Knowledge Tabs ───────────────────────────────────────────────────── */
.sr_knowledge_section {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sr_knowledge_tabs {
    border-bottom: 1px solid #1e293b !important;
    background: #0b0f19 !important;
    padding: 6px 8px 0;
}

.sr_knowledge_tabs .nav-link {
    color: #94a3b8 !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.sr_knowledge_tabs .nav-link:hover {
    color: #cbd5e1 !important;
}

.sr_knowledge_tabs .nav-link.active {
    color: #ffffff !important;
    background: transparent !important;
    border-bottom-color: #6366f1 !important;
}

.sr_tab_content {
    flex: 1;
    overflow-y: auto;
    background: #0f172a !important;
}

/* ── Knowledge Tab Details ────────────────────────────────────────────── */
.sr_summary_card {
    background: #151d30 !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 10px;
    padding: 16px 20px;
}

.sr_summary_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sr_sec_heading {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0;
}

.sr_sec_subheading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff !important;
}

.sr_summary_body {
    font-size: 13.5px;
    line-height: 1.6;
    color: #cbd5e1 !important;
    margin-bottom: 0;
}

.sr_bridge_btn_group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ── Transcript Segments ──────────────────────────────────────────────── */
.sr_transcript_segments_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sr_trans_segment {
    padding: 10px 14px;
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sr_trans_segment:hover,
.sr_trans_segment.active {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: #6366f1 !important;
}

.sr_trans_time {
    font-family: monospace;
    font-size: 12px;
    color: #818cf8 !important;
    font-weight: 700;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.sr_trans_speaker {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff !important;
    display: block;
    margin-bottom: 2px;
}

.sr_trans_text {
    font-size: 13px;
    color: #cbd5e1 !important;
    margin-bottom: 0;
}

/* ── Chapters ─────────────────────────────────────────────────────────── */
.sr_chapters_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sr_chapter_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sr_chapter_item:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: #6366f1 !important;
}

.sr_chapter_title {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff !important;
}

/* ── Action Items ─────────────────────────────────────────────────────── */
.sr_action_items_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sr_action_card {
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.sr_action_title {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 4px;
}

.sr_action_meta {
    font-size: 12px;
    color: #94a3b8 !important;
    display: flex;
    gap: 12px;
}

/* ── Notes Tab ────────────────────────────────────────────────────────── */
.sr_note_preview_card {
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 10px;
    padding: 18px 20px;
    font-size: 13.5px;
    color: #cbd5e1 !important;
}

.sr_note_preview_card h2,
.sr_note_preview_card h3 {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    margin-top: 14px;
    margin-bottom: 6px;
}

/* ── Ask AI ───────────────────────────────────────────────────────────── */
.sr_ask_container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sr_ask_history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    max-height: 420px;
}

.sr_ask_msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.sr_ask_msg.user {
    flex-direction: row-reverse;
}

.sr_ask_avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #6366f1 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.sr_ask_bubble {
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 85%;
    color: #e2e8f0 !important;
}

.sr_ask_msg.user .sr_ask_bubble {
    background: #6366f1 !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
}

/* ── Modals & Details Table ───────────────────────────────────────────── */
.modal.sr_modal_wrapper,
#sr_stop_modal,
#sr_library_modal,
#sr_share_modal {
    z-index: 100050 !important;
}

.modal-backdrop {
    z-index: 100040 !important;
}

.sr_modal_card {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

.sr_modal_card .modal-header {
    border-bottom: 1px solid #1e293b !important;
    padding: 18px 24px 12px 24px !important;
}

.sr_modal_card .modal-header .modal-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
}

.sr_modal_card .modal-body {
    color: #cbd5e1 !important;
    padding: 18px 24px !important;
}

.sr_modal_card .modal-body p,
.sr_modal_card .sr_modal_body_text {
    color: #cbd5e1 !important;
    font-size: 14.5px !important;
    line-height: 1.6 !important;
}

.sr_modal_card .modal-body .text-muted {
    color: #94a3b8 !important;
}

.sr_modal_card .modal-footer {
    border-top: 1px solid #1e293b !important;
    padding: 14px 24px 18px 24px !important;
    gap: 10px;
}

.sr_modal_card .btn-outline-secondary,
.sr_modal_card .sr_modal_cancel_btn {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.sr_modal_card .btn-outline-secondary:hover,
.sr_modal_card .sr_modal_cancel_btn:hover {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

.sr_modal_card .btn-primary,
.sr_modal_card .sr_modal_save_btn {
    background: #6366f1 !important;
    border: 1px solid #6366f1 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.sr_modal_card .btn-primary:hover,
.sr_modal_card .sr_modal_save_btn:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

.sr_modal_card .btn-close,
.sr_modal_card .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.8 !important;
}

.sr_modal_card .btn-close:hover,
.sr_modal_card .btn-close-white:hover {
    opacity: 1 !important;
}

.sr_details_table {
    color: #cbd5e1 !important;
}

.sr_details_table th {
    width: 35%;
    color: #94a3b8 !important;
    font-weight: 600;
    border-color: #1e293b !important;
}

.sr_details_table td {
    border-color: #1e293b !important;
}

/* ── Library Grid ─────────────────────────────────────────────────────── */
.sr_library_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.sr_lib_card {
    background: #151d30 !important;
    border: 1px solid #1e293b !important;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sr_lib_card:hover {
    border-color: #6366f1 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sr_lib_thumb {
    aspect-ratio: 16 / 9;
    background: #020617 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.sr_lib_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr_lib_thumb i {
    font-size: 32px;
    color: #334155 !important;
}

.sr_lib_dur {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

.sr_lib_body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sr_lib_title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr_lib_date {
    font-size: 12px;
    color: #94a3b8 !important;
}

.sr_lib_actions {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
