:root {
    --bg-light: #f8fafc;
    --panel-bg: #ffffff;
    --border-color: #cbd5e1;
    --brand-blue: #003399; /* MSpace Logo Dark Blue */
    --brand-red: #b30000;  /* MSpace Logo Crimson Red */
    --text-dark: #0f172a;
    --text-muted: #475569; /* Darker, high-visibility muted grey */
    --text-light: #f8fafc;
    --success-green: #15803d;
    --error-red: #b91c1c;
    --console-bg: #0b1329; /* High-contrast very dark blue */
}

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

body {
    background-color: var(--bg-light);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sticky Header corporate styling */
.app-header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.brand-m {
    color: var(--brand-blue);
}

.brand-space {
    color: var(--brand-red);
}

.app-title {
    font-weight: 300;
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-size: 1.15rem;
    border-left: 1px solid #cbd5e1;
    padding-left: 0.5rem;
}

.header-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success-green);
    background: #dcfce7;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-green);
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s infinite;
}

/* App Layout Containers */
.app-container {
    display: flex;
    padding-top: 70px; /* Offset sticky header */
    padding-bottom: 40px; /* Offset sticky footer */
    min-height: calc(100vh - 70px - 40px);
}

/* Left Sidebar Navigation Drawer */
.sidebar-nav {
    width: 260px;
    background: #0f172a; /* Slate Dark background for maximum contrast */
    border-right: 1.5px solid #1e293b;
    position: fixed;
    top: 70px;
    bottom: 40px;
    left: 0;
    z-index: 99;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Override .tab-btn styles inside Left Navigation */
.sidebar-nav .tab-btn {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    padding: 0.85rem 1.25rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100%;
    font-family: inherit;
    transition: all 0.2s ease-in-out;
}

.sidebar-nav .tab-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-nav .tab-btn.active {
    background: #003399 !important; /* MSpace corporate brand blue */
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.3) !important;
}

.sidebar-nav .tab-btn.active i {
    color: #abcd16 !important; /* MSpace lime accent */
}

/* Main Content area */
.main-content {
    flex: 1;
    margin-left: 260px; /* Width of left nav */
    padding: 2rem;
    background: #f8fafc;
}

/* Main Workspaces Layout Grid */
.content-split-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

/* Sticky Footer corporate branding style */
.app-footer.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #0f172a;
    border-top: 1.5px solid #1e293b;
    z-index: 1000;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Clean High Contrast Workspace Panels */
.workspace-panel {
    background: var(--panel-bg);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-icon {
    font-size: 0.95rem;
}

/* Mode Switchers */
.mode-toggles {
    display: flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.tab-btn.active {
    background: #ffffff;
    color: var(--brand-blue);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Copy URL Container */
.gateway-url-box {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--brand-blue);
    padding: 0.75rem;
    border-radius: 6px;
}

.box-label {
    display: block;
    font-size: 0.7rem;
    color: var(--brand-blue);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.copy-url-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.copy-url-wrapper input {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    color: var(--text-dark);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
}

.btn-copy {
    background: var(--brand-blue);
    border: 1px solid var(--brand-blue);
    color: white;
    border-radius: 4px;
    padding: 0 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-copy:hover {
    background: #002673;
}

.box-info {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Forms controls */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.url-input-wrapper input,
.form-group input,
.screen-editor-card select,
.screen-editor-card textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.url-input-wrapper input:focus,
.form-group input:focus,
.screen-editor-card select:focus,
.screen-editor-card textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 2px rgba(0, 51, 153, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.session-wrapper {
    display: flex;
    gap: 0.4rem;
}

.btn-icon {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    width: 38px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.divider {
    border: none;
    height: 1px;
    background: #f1f5f9;
    margin: 1.25rem 0;
}

.presets label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.preset-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-preset {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark);
    padding: 0.45rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-preset:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: #fafafa;
}

/* Designer Components */
.designer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.designer-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sm-action {
    background: #ffffff;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-sm-action:hover {
    background: var(--brand-blue);
    color: white;
}

.screen-editor-card {
    background: #fafafa;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.screen-editor-card h4 {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.screen-editor-card textarea {
    height: 50px;
    resize: none;
}

.form-buttons {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.btn-primary {
    background: var(--brand-blue);
    border: 1px solid var(--brand-blue);
    color: white;
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background: #002673;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

/* Designed screens Scroller */
.screens-scroller {
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
}

.screens-list {
    list-style: none;
}

.screen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.screen-item:hover {
    background: #f8fafc;
}

.screen-item:last-child {
    border-bottom: none;
}

.screen-item.active-simulation {
    animation: activeGlow 1.5s infinite alternate;
}

@keyframes activeGlow {
    0% { box-shadow: inset 4px 0 0 var(--brand-red); }
    100% { box-shadow: inset 4px 0 8px rgba(179, 0, 0, 0.2); }
}

.screen-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.screen-name {
    font-weight: 600;
    color: var(--text-dark);
}

.screen-desc {
    color: var(--text-muted);
    font-size: 0.65rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-badge {
    padding: 0.15rem 0.4rem;
    font-size: 0.6rem;
    border-radius: 3px;
    font-weight: 700;
}

.badge-con { background: #dcfce7; color: #166534; }
.badge-end { background: #fee2e2; color: #991b1b; }
.badge-menu { background: #dbeafe; color: #1e40af; }

/* Phone Bezel Simulator */
.simulator-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.phone-frame {
    background: #1e293b; /* Dark Steel Bezel */
    border: 8px solid #0f172a;
    border-radius: 28px;
    width: 290px;
    height: 500px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.phone-speaker {
    width: 40px;
    height: 4px;
    background: #0f172a;
    border-radius: 2px;
    position: absolute;
    top: 4px;
    left: calc(50% - 20px);
}

.phone-screen {
    background: #020617; /* Slate Black display screen */
    flex: 1;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    padding: 5px 8px;
    font-size: 0.6rem;
    color: #94a3b8;
}

.screen-content-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.simulator-state {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Dial view */
.dial-input-box {
    color: #38bdf8;
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.dial-description {
    color: #64748b;
    font-size: 0.7rem;
    text-align: center;
}

/* USSD Pop-Up Card styles */
.dialog-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dialog-body {
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: pre-wrap;
    margin-bottom: 0.75rem;
    min-height: 50px;
    color: #1e293b;
    font-family: 'Space Mono', monospace;
}

.dialog-input-wrapper input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.4rem;
    color: var(--text-dark);
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.dialog-input-wrapper input:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.dialog-buttons {
    display: flex;
    gap: 0.4rem;
}

.btn-dialog-cancel {
    flex: 1;
    padding: 0.45rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-dialog-cancel:hover {
    background: #fee2e2;
    color: var(--brand-red);
    border-color: #fca5a5;
}

.btn-dialog-send {
    flex: 1;
    padding: 0.45rem;
    border-radius: 4px;
    border: none;
    background: var(--brand-blue);
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-dialog-send:hover {
    background: #002673;
}

/* Keypad Layout */
.keypad-container {
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.key {
    background: #334155;
    border: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.1s ease;
}

.key:hover {
    background: #475569;
}

.key:active {
    background: var(--brand-blue);
    transform: scale(0.95);
}

.action-buttons {
    display: flex;
    gap: 4px;
}

.btn-action {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: var(--brand-red);
}

.btn-dial-trigger {
    background: #22c55e;
    color: white;
}

.btn-dial-trigger:hover {
    background: #16a34a;
}

/* API Logger Console */
.log-panel {
    max-height: 520px;
}

.btn-clear {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-clear:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.console-logs {
    flex: 1;
    background: var(--console-bg);
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.75rem;
    overflow-y: auto;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.console-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    text-align: center;
    padding: 1.5rem;
    gap: 0.5rem;
}

.placeholder-icon {
    font-size: 1.5rem;
}

/* Log Entries */
.log-entry {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid #475569;
    border-radius: 2px;
    padding: 0.5rem;
}

.log-entry.success {
    border-color: #22c55e;
}

.log-entry.failed {
    border-color: #ef4444;
}

.log-entry.info {
    border-color: var(--brand-blue);
}

.log-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.log-time {
    color: #94a3b8;
}

.log-duration {
    color: #38bdf8;
}

.log-url {
    color: #64748b;
    word-break: break-all;
    margin-bottom: 0.25rem;
    font-size: 0.65rem;
}

.log-payload {
    color: #cbd5e1;
    margin-bottom: 0.25rem;
}

.log-response {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.35rem;
    border-radius: 3px;
    color: #94a3b8;
}

/* Keyframes */
@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Glassmorphism Authentication Overlay Styling */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-red) 100%);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
}

.login-logo h2 {
    color: var(--text-dark);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.login-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #b91c1c;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.login-error.hidden {
    display: none;
}

.login-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.login-card label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.login-card input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.login-card input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

.btn-login {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #002266 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.2);
    transition: all 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 51, 153, 0.35);
}

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

.login-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.25rem;
}

/* Premium Auth Switching Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.5rem;
    width: 100%;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-tab-btn:hover {
    color: var(--brand-blue);
}

.auth-tab-btn.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

.hidden {
    display: none !important;
}

/* OTP modal text color override for premium dark glassmorphism */
#otp-overlay .login-card {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
}

#otp-overlay h3 {
    color: #ffffff !important;
}

#otp-overlay p {
    color: #94a3b8 !important;
}

/* Mobile and Responsive Styles */
@media (max-width: 1024px) {
    .content-split-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Main Layout */
    .app-container {
        flex-direction: column;
        padding-top: 70px;
        padding-bottom: 50px; /* Offset taller mobile sticky footer */
    }

    /* Left Sidebar to top sticky scroll-view */
    .sidebar-nav {
        position: sticky;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        bottom: auto;
        border-right: none;
        border-bottom: 1.5px solid #1e293b;
        padding: 0.5rem 1rem;
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        z-index: 99;
    }

    .nav-menu {
        flex-direction: row !important;
        gap: 0.5rem !important;
        width: auto !important;
    }

    /* Hide client info footer inside sidebar on mobile to save space */
    .sidebar-nav div:last-child {
        display: none !important;
    }

    .sidebar-nav .tab-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        width: auto !important;
        display: inline-flex !important;
    }

    /* Content Area margin offset */
    .main-content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .content-split-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    /* Sticky Footer Responsive Adjustments */
    .app-footer.sticky-footer {
        height: 50px;
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
        text-align: center;
        padding: 0 1rem;
        font-size: 0.65rem;
    }

    .header-container {
        padding: 0 1rem;
    }

    .app-title {
        display: none; /* Hide app title on small screens */
    }
}



