/* /home/momen/gtr_meetmate/Frontend/css/style.css */

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

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* --- SOFT DARK MODE (Default) --- */
    --bg-primary: #121212;
    --bg-secondary: #18181b; 
    --bg-tertiary: #27272a;  
    --bg-card: #1e1e20;
    --bg-hover: #2d2d30;
    
    --accent-primary: #ffffff;
    --accent-secondary: #a1a1aa;
    
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    --text-primary: #f4f4f5;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    
    --border-subtle: #27272a;
    --border-medium: #3f3f46;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f3f4f6; 
    --bg-secondary: #ffffff; 
    --bg-tertiary: #f9fafb; 
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;
    --accent-primary: #111827;
    --accent-secondary: #4b5563;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --border-subtle: #e5e7eb;
    --border-medium: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--text-primary);
    color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--text-primary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.config-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.config-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.config-icon {
    color: var(--text-primary);
    font-size: 1.25rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="number"], input[type="text"], select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-input { margin-bottom: 1rem; }

.btn-group { display: flex; gap: 0.75rem; }

button {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    width: auto;
}

.btn-group button { flex: 1; }
button:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(1); }

.btn-green { background: var(--accent-success); color: #ffffff; }
.btn-green:hover:not(:disabled) { background: #059669; }

.btn-red { background: var(--accent-danger); color: #ffffff; }
.btn-red:hover:not(:disabled) { background: #dc2626; }

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-card);
    border: 1px solid var(--accent-primary);
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }

.btn-dark {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: 0.625rem 1rem;
}
.btn-dark:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-primary);
}

.status {
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status.active { border-color: var(--accent-danger); color: var(--accent-danger); background: rgba(239, 68, 68, 0.05); }
.status.success { border-color: var(--accent-success); color: var(--accent-success); background: rgba(16, 185, 129, 0.05); }

.transcript-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-danger);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#transcript-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.log-entry { margin-bottom: 0.5rem; padding: 0.5rem; border-bottom: 1px solid var(--border-subtle); }

.speaker-tag {
    color: var(--text-primary);
    font-weight: 800;
    margin-right: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.history-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border-medium);
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    color: var(--text-secondary);
}

.history-table tbody tr:hover { background: var(--bg-hover); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-bot { background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--text-muted); }
.badge-round { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border-medium); }

.icon-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.icon-btn:hover:not(.disabled) { color: var(--text-primary); transform: scale(1.1); }
.icon-btn.disabled { opacity: 0.2; cursor: not-allowed; }

/* Styling for the Meeting Name textbox */
.form-group input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color, #444);
    border-radius: 4px;
    background-color: var(--input-bg, #2d2d2d);
    color: var(--text-color, #ffffff);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    border-color: var(--accent, #007bff);
}

/* Ensure consistent labeling in the grid */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    margin: 2% auto;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-medium);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-download {
    background: var(--text-primary);
    color: var(--bg-card);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-download:hover { opacity: 0.8; transform: translateY(-1px); }

.close {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.close:hover { color: var(--text-primary); }

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.csv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.csv-table th {
    text-align: left;
    padding: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    border-bottom: 2px solid var(--text-primary);
    text-transform: uppercase;
}
.csv-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}
.csv-table tr:hover { background: var(--bg-hover); }

.group-header { font-weight: 700; color: var(--text-primary); }

.markdown-doc { line-height: 1.7; color: var(--text-secondary); }
.markdown-doc h1, .markdown-doc h2, .markdown-doc h3 { color: var(--text-primary); margin-top: 1.5rem; }
.markdown-doc h1 { border-bottom: 1px solid var(--border-medium); padding-bottom: 0.5rem; }
.markdown-doc code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid var(--border-subtle);
}
.markdown-doc blockquote {
    border-left: 3px solid var(--text-muted);
    padding-left: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .header { padding: 1rem; }
    .btn-group { flex-direction: column; }
    .btn-group button { width: 100%; }
}

[contenteditable="true"] {
    cursor: text;
}

[contenteditable="true"]:hover {
    background-color: var(--bg-hover);
    outline: 1px solid var(--border-medium);
}

[contenteditable="true"]:focus {
    background-color: var(--bg-tertiary);
    outline: 2px solid var(--accent-primary);
    border-radius: 4px;
    padding: 5px;
    color: var(--text-primary);
}

td[contenteditable="true"] {
    background: var(--bg-tertiary); /* Light highlight */
    border: 1px dashed var(--border-medium);
    cursor: text;
}

td[contenteditable="true"]:focus {
    background: var(--bg-primary);
    border: 1px solid var(--accent-primary);
    outline: none;
}

/* css/style.css */

.btn-trash:hover {
    color: var(--accent-danger); /* Red color */
    background: rgba(239, 68, 68, 0.1); /* Light red bg */
    border-radius: 4px;
    transform: scale(1.1);
}