/* Modern, Pixel-Accurate Styles for DevLys <-> Unicode Converter V3 */

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

@font-face {
    font-family: 'DevLys 010';
    src: url('DevLys010.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DevLys 010 Regular';
    src: url('DevLys010.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kruti Dev 010';
    src: url('Kruti_Dev.ttf') format('truetype'),
         url('DevLys010.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-blue: #1d4ed8;
    --primary-blue-hover: #1e40af;
    --navy-action: #172554;
    --navy-action-hover: #1e3a8a;
    --bg-page: #f4f7fb;
    --card-bg: #ffffff;
    --border-card: #e2e8f0;
    --border-editor: #cbd5e1;
    --border-editor-focus: #3b82f6;
    --text-heading: #1e293b;
    --text-body: #334155;
    --text-muted: #64748b;
    --pill-legacy-bg: #fef3c7;
    --pill-legacy-text: #92400e;
    --pill-legacy-border: #fde68a;
    --pill-uni-bg: #dbeafe;
    --pill-uni-text: #1e40af;
    --pill-uni-border: #bfdbfe;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-btn: 0 4px 12px rgba(23, 37, 84, 0.2);
}

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

body {
    font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

form,
#form1 {
    width: 100%;
    margin: 0;
    padding: 0;
}

.app-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.content-area {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header Section */
.app-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-card);
    margin: 0 0 16px 0;
    overflow: hidden;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-logo-link:hover {
    opacity: 0.92;
}

.header-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.title-bidirectional-icon {
    width: 22px;
    height: 22px;
    color: #1e3a8a;
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.header-title-box:hover .title-bidirectional-icon {
    color: #ea580c;
    transform: scale(1.08);
}

.app-title-main {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: -0.2px;
    font-family: 'Poppins', 'Inter', sans-serif;
}

.version-tag {
    font-size: 11px;
    font-weight: 700;
    color: #ea580c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 1px 6px;
    border-radius: 5px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Navigation Bar (Integrated below header content in same panel) */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 6px 20px;
    border-top: 1px solid #e2e8f0;
    gap: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-link:hover {
    color: #1d4ed8;
    background-color: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.08);
}

.nav-link.nav-link-logout {
    color: #b91c1c;
    background-color: #fef2f2;
    border-color: #fecaca;
}

.nav-link.nav-link-logout:hover {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fca5a5;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.nav-icon {
    font-size: 13px;
    line-height: 1;
    display: inline-block;
}

.nav-text {
    display: inline-block;
}

.nav-text-desktop {
    display: inline-block;
}

.nav-text-mobile {
    display: none;
}

/* Main Grid Layout */
.converter-workspace {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    width: 100%;
}

/* Card Container */
.converter-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

/* Light Orange Theme for DevLys Panel */
.converter-card.card-devlys {
    background-color: #fffbf5;
    border-color: #fed7aa;
}

.card-devlys .card-header {
    background-color: #fff4e6;
    border-bottom: 1px solid #fed7aa;
}

.card-devlys .card-footer {
    background-color: #fff7ed;
    border-top: 1px solid #fed7aa;
}

.card-devlys .editor-box {
    border-color: #fed7aa;
    background-color: #ffffff;
}

.card-devlys .editor-box:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.card-devlys .btn-toggle.active {
    background-color: #ea580c;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.3);
}

.card-devlys .btn-voice {
    border-color: #fed7aa;
    background-color: #fff7ed;
    color: #c2410c;
}

.card-devlys .btn-voice:hover {
    background-color: #ffedd5;
    border-color: #fdba74;
}

/* Light Blue Theme for Mangal Unicode Panel */
.converter-card.card-unicode {
    background-color: #f4f9ff;
    border-color: #bfdbfe;
}

.card-unicode .card-header {
    background-color: #e8f2ff;
    border-bottom: 1px solid #bfdbfe;
}

.card-unicode .card-footer {
    background-color: #eff6ff;
    border-top: 1px solid #bfdbfe;
}

.card-unicode .editor-box {
    border-color: #bfdbfe;
    background-color: #ffffff;
}

.card-unicode .editor-box:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.card-unicode .btn-toggle.active {
    background-color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.3);
}

.card-unicode .btn-voice {
    border-color: #bfdbfe;
    background-color: #eff6ff;
    color: #1d4ed8;
}

.card-unicode .btn-voice:hover {
    background-color: #dbeafe;
    border-color: #93c5fd;
}

/* Card Header */
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
}

/* Badges */
.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-legacy {
    background-color: var(--pill-legacy-bg);
    color: var(--pill-legacy-text);
    border: 1px solid var(--pill-legacy-border);
}

.badge-unicode {
    background-color: var(--pill-uni-bg);
    color: var(--pill-uni-text);
    border: 1px solid var(--pill-uni-border);
}

/* Toolbar */
.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-card);
    background-color: #ffffff;
    color: var(--text-body);
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-tool:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-tool:active {
    transform: translateY(0);
}

.btn-voice {
    border-color: #bfdbfe;
    background-color: #eff6ff;
    color: var(--primary-blue);
}

.btn-voice:hover {
    background-color: #dbeafe;
    border-color: #93c5fd;
}

.btn-voice.recording {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-icon {
    width: 15px;
    height: 15px;
    display: inline-block;
    flex-shrink: 0;
}

/* Segmented Language Toggle & Increased F12 Shortcut Hint */
.lang-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.shortcut-hint {
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.shortcut-hint kbd {
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 800;
    color: var(--text-heading);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: inline-block;
    line-height: 1;
    cursor: default;
}

.card-devlys .shortcut-hint kbd {
    border-color: #fdba74;
    color: #ea580c;
    background-color: #fffaf0;
}

.card-unicode .shortcut-hint kbd {
    border-color: #93c5fd;
    color: #1d4ed8;
    background-color: #f8fafc;
}

.lang-toggle-group {
    display: inline-flex;
    background-color: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.btn-toggle {
    border: none;
    background: transparent;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-toggle.active {
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.3);
}

.btn-toggle:hover:not(.active) {
    color: var(--text-heading);
}

/* Action Group */
.action-group {
    display: inline-flex;
    gap: 8px;
}

/* Editor Area */
.card-body {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-box {
    width: 100%;
    min-height: 400px;
    max-height: 560px;
    padding: 16px;
    border: 1px solid var(--border-editor);
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.4;
    overflow-y: auto;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    white-space: pre-wrap;
    word-break: break-word;
}

.editor-box:focus {
    border-color: var(--border-editor-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.editor-box.editor-highlight {
    animation: flash-highlight 0.6s ease;
}

@keyframes flash-highlight {
    0% { background-color: rgba(59, 130, 246, 0.12); }
    100% { background-color: #ffffff; }
}

/* Font stylings for editors */
#unicode-editor {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

#devlys-editor {
    font-family: 'DevLys 010', 'DevLys 010 Regular', 'Kruti Dev 010', Arial, sans-serif;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.15;
}

/* Bilingual text spans inside editors */
.eng-text,
#devlys-editor .eng-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    display: inline !important;
}

#unicode-editor .eng-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    display: inline !important;
}

.hindi-text,
#devlys-editor .hindi-text {
    font-family: 'DevLys 010', 'DevLys 010 Regular', 'Kruti Dev 010', Arial, sans-serif !important;
    font-size: 22px !important;
    font-weight: bold !important;
    line-height: 1.15 !important;
    display: inline !important;
}

.speech-interim-preview {
    color: #2563eb !important;
    border-bottom: 2px dashed #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.08) !important;
    border-radius: 2px !important;
    display: inline !important;
}

/* Bottom Stats Bar */
.card-footer {
    padding: 12px 20px;
    background-color: #fafbfc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-value {
    color: var(--text-heading);
    font-weight: 700;
}

/* Center Action Column */
.center-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-convert {
    width: 100%;
    padding: 16px 12px;
    border-radius: 10px;
    border: none;
    background-color: var(--navy-action);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-btn);
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-convert:hover {
    background-color: var(--navy-action-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(23, 37, 84, 0.3);
}

.btn-convert:active {
    transform: translateY(0);
}

.btn-convert .icon-arrow {
    width: 20px;
    height: 20px;
}

.btn-reset-all {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-editor);
    background-color: #ffffff;
    color: var(--text-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-reset-all:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Toast Notification Popup at Bottom */
.toast-notification {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background-color: #0f172a;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 90vw;
    text-align: center;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #10b981;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

/* App Footer / Access Counter */
.app-footer-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    padding: 6px 0;
    width: 100%;
}

.access-counter-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-size: 12px;
    color: var(--text-muted);
}

.counter-icon {
    font-size: 13px;
    line-height: 1;
}

.counter-label {
    font-weight: 600;
    color: #64748b;
}

.counter-value {
    font-weight: 700;
    color: #1e3a8a;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* =========================================================
   Accessed By IP (Analytics Page) Styles
   ========================================================= */
.analytics-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.analytics-card {
    background-color: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    width: 100%;
}

.analytics-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-icon {
    font-size: 24px;
    line-height: 1;
}

.analytics-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-back-link {
    background-color: #f1f5f9;
    color: #1e3a8a;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

.btn-back-link:hover {
    background-color: #e2e8f0;
    color: #172554;
    border-color: #94a3b8;
}

.analytics-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.btn-filter {
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-filter.active {
    background: linear-gradient(135deg, #172554 0%, #1e3a8a 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.3);
    border-color: transparent;
}

.stat-pill-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
}

.stat-pill-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.stat-pill-text {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
}

.analytics-body {
    padding: 16px 20px;
    width: 100%;
}

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.table-modern th {
    background: linear-gradient(135deg, #172554 0%, #1e3a8a 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    border: none;
    white-space: nowrap;
}

.table-modern td {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
    font-family: 'Inter', -apple-system, sans-serif;
}

.table-modern tr:nth-child(even) td {
    background-color: #f8fafc;
}

.table-modern tr:hover td {
    background-color: #f0f9ff;
    transition: background-color 0.15s ease;
}

.table-modern td:first-child {
    font-weight: 600;
    color: #1e3a8a;
}

/* Modern GridView Pager Styling */
.table-pager {
    width: 100%;
    background-color: #fafbfc;
    border-top: 1px solid #e2e8f0;
}

.table-pager table {
    margin: 14px auto !important;
}

.table-pager td {
    padding: 2px 4px !important;
    border: none !important;
    background: transparent !important;
}

.table-pager a,
.table-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.table-pager a {
    background-color: #ffffff;
    color: #1e3a8a;
    border: 1px solid #cbd5e1;
}

.table-pager a:hover {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-pager span {
    background: linear-gradient(135deg, #172554 0%, #1e3a8a 100%);
    color: #ffffff !important;
    border: 1px solid transparent;
    box-shadow: 0 2px 5px rgba(23, 37, 84, 0.25);
}

/* Page Size Selector Styling */
.page-size-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
}

.page-size-label {
    font-size: 13px;
    color: var(--text-muted);
}

.select-modern {
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #ffffff;
    color: #1e293b;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-modern:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .content-area {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .converter-workspace {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .converter-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .center-actions {
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .btn-convert {
        flex-direction: row;
        padding: 12px 18px;
    }

    .btn-reset-all {
        width: auto;
        padding: 12px 18px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        min-height: 100dvh;
        overflow-x: hidden;
    }

    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .content-area {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Mobile Header: 100% Full Width Edge-to-Edge */
    .app-header {
        margin: 0 0 4px 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        width: 100% !important;
    }

    .header-main {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 4px 8px;
        gap: 6px;
    }

    .header-logo {
        height: 28px;
        max-width: 100%;
    }

    .header-title-box {
        gap: 5px;
    }

    .title-bidirectional-icon {
        width: 16px;
        height: 16px;
    }

    .app-title-main {
        font-size: 13px;
        white-space: nowrap;
    }

    .version-tag {
        font-size: 9px;
        padding: 0 3px;
    }

    /* Mobile Nav: Renamed to IP, Dashboard, SSO, LOGOUT */
    .nav-text-desktop {
        display: none;
    }

    .nav-text-mobile {
        display: inline-block;
    }

    .nav-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
        padding: 4px 8px;
        flex-wrap: nowrap;
    }

    .nav-links {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .nav-link {
        padding: 3px 6px;
        font-size: 10px;
        gap: 3px;
        border-radius: 4px;
    }

    .nav-icon {
        font-size: 10px;
    }

    /* Compact Workspace: 100% Full Width Edge-to-Edge */
    .converter-workspace {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .converter-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        box-shadow: none !important;
    }

    .card-header {
        padding: 4px 8px;
    }

    .title-row {
        margin-bottom: 2px;
        gap: 6px;
    }

    .panel-title {
        font-size: 12px;
    }

    .badge {
        font-size: 9px;
        padding: 1px 4px;
    }

    /* Compact Single-Line Toolbar on Mobile */
    .toolbar-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3px;
        flex-wrap: nowrap;
    }

    .btn-tool {
        padding: 2px 6px;
        font-size: 10px;
        height: 24px;
        border-radius: 5px;
        gap: 3px;
    }

    .btn-tool .btn-icon {
        width: 11px;
        height: 11px;
    }

    .btn-toggle {
        padding: 2px 5px;
        font-size: 9px;
        border-radius: 4px;
    }

    .lang-toggle-group {
        padding: 1px;
        border-radius: 5px;
    }

    .shortcut-hint {
        display: none !important;
    }

    .action-group {
        gap: 3px;
    }

    .card-body {
        padding: 3px 6px;
    }

    /* Doubled Textarea Height for Mobile */
    .editor-box {
        min-height: 175px !important;
        height: clamp(175px, 28vh, 240px) !important;
        max-height: 280px !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        border-radius: 6px;
    }

    #devlys-editor,
    #devlys-editor .hindi-text {
        font-family: 'DevLys 010', 'DevLys 010 Regular', 'Kruti Dev 010', Arial, sans-serif !important;
        font-size: 20px !important;
        font-weight: bold !important;
    }

    #unicode-editor,
    #unicode-editor .hindi-text {
        font-size: 16px !important;
        font-weight: 600 !important;
    }

    .card-footer {
        padding: 2px 8px;
        font-size: 9px;
    }

    /* Horizontal Center Action Buttons */
    .center-actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 100%;
        margin: 2px 0;
        min-width: 0;
    }

    .btn-convert {
        flex-direction: row;
        padding: 4px 10px;
        font-size: 11px;
        font-weight: 600;
        height: 28px;
        gap: 4px;
        border-radius: 6px;
        width: auto;
        flex: 1;
        max-width: 140px;
    }

    .btn-convert .icon-arrow {
        width: 12px;
        height: 12px;
    }

    .btn-reset-all {
        padding: 4px 10px;
        font-size: 11px;
        font-weight: 600;
        height: 28px;
        gap: 4px;
        border-radius: 6px;
        width: auto;
        flex-shrink: 0;
    }

    .btn-reset-all .btn-icon {
        width: 12px;
        height: 12px;
    }

    /* Mobile Analytics Adjustments */
    .analytics-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .analytics-title-box {
        gap: 8px;
    }

    .analytics-icon {
        font-size: 18px;
    }

    .analytics-subtitle {
        font-size: 11px;
    }

    .btn-back-link {
        font-size: 11px;
        padding: 4px 8px;
    }

    .analytics-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .btn-filter {
        font-size: 11px;
        padding: 4px 8px;
    }

    .stat-pill-box {
        padding: 3px 8px;
    }

    .stat-pill-text {
        font-size: 11px;
    }

    .analytics-body {
        padding: 6px 8px;
    }

    .table-modern th,
    .table-modern td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .app-footer-bar {
        margin-top: 6px;
        padding: 2px 0 6px 0;
    }

    .access-counter-pill {
        padding: 3px 10px;
        font-size: 11px;
    }

    .counter-value {
        font-size: 11px;
        padding: 1px 6px;
    }
}

/* =========================================================
 * Voice Command Tip & Instruction Bar Styles
 * ========================================================= */
.voice-instruction-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 8px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
    font-size: 13px;
    color: #1e3a8a;
    transition: all 0.2s ease;
}

.voice-instruction-bar .instruction-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.voice-instruction-bar .instruction-badge {
    background-color: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.voice-instruction-bar .instruction-text {
    line-height: 1.4;
    color: #1e40af;
}

.voice-instruction-bar .instruction-text strong {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    font-weight: 700;
    margin: 0 2px;
}

.voice-instruction-bar .instruction-text kbd {
    background-color: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

@media screen and (max-width: 768px) {
    .voice-instruction-bar {
        flex-wrap: wrap;
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
}
