/* ── Trading Discipline Manager — Frontend App Shell ── */

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

.tdm-frontend-app,
.tdm-wrap,
.tdm-login-shell {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.tdm-frontend-app {
    background: #0f172a;
    padding: 16px 20px 20px;
    width: 100%;
    margin: 0;
    color: #f1f5f9;
    box-sizing: border-box;
}

/* ── TOPBAR ── */
.tdm-frontend-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 0;
    border-bottom: 1px solid #1e293b;
    gap: 12px;
    flex-wrap: nowrap;
}

.tdm-frontend-brand {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.tdm-frontend-brand .dashicons { color: #3b82f6; font-size: 18px; }

.tdm-frontend-user {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── TABS ── */
.tdm-frontend-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    border-bottom: 1px solid #334155;
    margin-bottom: 20px;
    margin-top: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tdm-frontend-tabs::-webkit-scrollbar { display: none; }

.tdm-frontend-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .2px;
}
.tdm-frontend-tab .dashicons { font-size: 14px; width: 14px; height: 14px; }
.tdm-frontend-tab:hover { color: #f1f5f9; }
.tdm-frontend-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }

.tdm-frontend-panel { display: none; }
.tdm-frontend-panel.active { display: block; }

/* ── LOGIN SCREEN — trading-themed split layout ── */
.tdm-login-shell {
    background: #0a0e1a;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
}

.tdm-login-visual {
    position: relative;
    background: #0d1326;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-right: 1px solid #1e293b;
}
.tdm-login-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#1a2236 1px, transparent 1px), linear-gradient(90deg, #1a2236 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: .5;
}
.tdm-login-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}
.tdm-login-brand .dashicons { color: #3b82f6; font-size: 20px; }
.tdm-login-chart { position: relative; z-index: 2; width: 100%; height: 160px; }
.tdm-login-tagline { position: relative; z-index: 2; }
.tdm-login-tagline h2 { font-size: 18px; font-weight: 500; color: #fff; margin: 0 0 6px; line-height: 1.4; }
.tdm-login-tagline p { font-size: 12px; color: #64748b; margin: 0; line-height: 1.6; }
.tdm-ticker { position: relative; z-index: 2; display: flex; gap: 16px; font-size: 11px; color: #64748b; margin-top: 14px; flex-wrap: wrap; }
.tdm-ticker span.up { color: #22c55e; font-weight: 600; }
.tdm-ticker span.dn { color: #ef4444; font-weight: 600; }

.tdm-login-form-side {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tdm-login-form-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.tdm-login-form-sub { font-size: 12px; color: #64748b; margin-bottom: 24px; }
.tdm-login-footer { font-size: 11px; color: #475569; text-align: center; margin-top: 18px; line-height: 1.6; }

.tdm-login-form-side .login-username,
.tdm-login-form-side .login-password,
.tdm-login-form-side .login-remember { margin: 0 0 14px; }
.tdm-login-form-side .login-username label,
.tdm-login-form-side .login-password label {
    display: block; font-size: 11px; color: #64748b;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: .6px;
}
.tdm-login-form-side .login-username input,
.tdm-login-form-side .login-password input {
    width: 100%; background: #0a0e1a; border: 1px solid #1e293b;
    color: #f1f5f9; border-radius: 6px; padding: 10px 12px;
    font-size: 14px; box-sizing: border-box; transition: border-color .15s;
}
.tdm-login-form-side .login-username input:focus,
.tdm-login-form-side .login-password input:focus { outline: none; border-color: #3b82f6; }
.tdm-login-form-side .login-remember {
    font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 6px; margin-bottom: 18px;
}
.tdm-login-form-side .login-submit input[type="submit"] {
    width: 100%; background: #3b82f6; color: #fff; border: none;
    border-radius: 6px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tdm-login-form-side .login-submit input[type="submit"]:hover { background: #2563eb; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
    .tdm-login-shell { grid-template-columns: 1fr; min-height: auto; }
    .tdm-login-visual { border-right: none; border-bottom: 1px solid #1e293b; }
    .tdm-login-chart { height: 120px; }
}

@media (max-width: 782px) {
    .tdm-frontend-app { padding: 12px 14px 16px; }
    .tdm-frontend-topbar { flex-wrap: wrap; gap: 8px; }
    .tdm-frontend-brand { font-size: 13px; }
    .tdm-frontend-user { font-size: 11px; gap: 6px; }
    .tdm-frontend-tab { padding: 8px 10px; font-size: 11px; }
}
