/*
 * SEO Imaginarium - interface moderne
 * Cette feuille surcharge Bootstrap 2 sans modifier les classes utilisées par
 * les écrans historiques. Elle permet de faire évoluer l'interface par étapes.
 */
:root {
    --ui-bg: #f4f7fb;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f8fafc;
    --ui-ink: #172033;
    --ui-muted: #68758a;
    --ui-line: #e3e8f0;
    --ui-brand: #2859d8;
    --ui-brand-dark: #1d43a9;
    --ui-brand-soft: #edf2ff;
    --ui-success: #16835b;
    --ui-success-soft: #e8f7f0;
    --ui-warning: #b87514;
    --ui-warning-soft: #fff6df;
    --ui-danger: #c64c59;
    --ui-danger-soft: #fff0f1;
    --ui-shadow-sm: 0 1px 2px rgba(20, 34, 58, .04), 0 8px 24px rgba(20, 34, 58, .05);
    --ui-shadow-md: 0 10px 30px rgba(20, 34, 58, .08);
    --ui-radius: 14px;
}

html {
    background: var(--ui-bg);
}

body.seo-app {
    min-width: 320px;
    padding-top: 82px;
    padding-bottom: 0;
    background: var(--ui-bg);
    color: var(--ui-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

body.seo-app a {
    color: var(--ui-brand);
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.seo-app a:hover,
body.seo-app a:focus {
    color: var(--ui-brand-dark);
    text-decoration: none;
}

.app-shell,
.seo-app > .container {
    width: min(1680px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

.app-main {
    min-height: calc(100vh - 180px);
    padding: 26px 0 48px;
}

/* Top navigation */
.seo-app .navbar {
    margin: 0;
    border: 0;
}

.seo-app .navbar-fixed-top {
    z-index: 1030;
}

.seo-app .navbar-inner {
    min-height: 72px;
    padding: 0;
    background: rgba(255, 255, 255, .96);
    border: 0;
    border-bottom: 1px solid var(--ui-line);
    border-radius: 0;
    box-shadow: 0 5px 22px rgba(20, 34, 58, .06);
    filter: none;
}

.seo-app .navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 72px;
}

.seo-app .navbar .brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    height: 72px;
    margin-left: 0;
    padding: 0 24px 0 0;
    color: var(--ui-ink);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
    text-shadow: none;
    white-space: nowrap;
    overflow: visible;
}

.brand-copy {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    transform: translateY(5px);
    visibility: visible;
    color: var(--ui-ink);
}

.brand-copy small {
    color: var(--ui-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .09em;
    line-height: 1;
    text-transform: uppercase;
}

.seo-app .navbar .nav {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
}

.seo-app .nav-collapse {
    flex: 1 1 auto;
}

.seo-app .navbar .nav > li > a,
.seo-app .navbar .dropdown-toggle {
    margin: 0;
    padding: 10px 13px;
    border-radius: 9px;
    color: #56647a;
    font-size: 13px;
    font-weight: 650;
    text-shadow: none;
}

.seo-app .navbar .nav > li > a:hover,
.seo-app .navbar .nav > li > a:focus,
.seo-app .navbar .nav > .active > a,
.seo-app .navbar .nav > .active > a:hover,
.seo-app .navbar .nav li.dropdown.open > .dropdown-toggle {
    background: var(--ui-brand-soft);
    color: var(--ui-brand-dark);
    box-shadow: none;
}

.seo-app .navbar .nav.pull-right {
    margin-left: auto;
}

.seo-app .navbar .divider-vertical {
    height: 28px;
    margin: 0 9px;
    border-right: 1px solid var(--ui-line);
    border-left: 0;
}

.seo-app .navbar .dropdown-menu {
    min-width: 220px;
    margin-top: 8px;
    padding: 7px;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-md);
}

.seo-app .navbar .dropdown-menu li > a {
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--ui-ink);
    font-size: 13px;
}

.seo-app .navbar .dropdown-menu li > a:hover,
.seo-app .navbar .dropdown-menu li > a:focus {
    background: var(--ui-brand-soft);
    color: var(--ui-brand-dark);
}

.seo-app .navbar .dropdown-menu .divider {
    margin: 7px 4px;
    background: var(--ui-line);
    border: 0;
}

.seo-app .navbar .btn-navbar {
    display: none;
    flex-direction: column;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 18px 0 18px auto;
    padding: 8px 10px;
    border: 1px solid var(--ui-line);
    border-radius: 9px;
    background: var(--ui-surface-muted);
    box-shadow: none;
}

.seo-app .btn-navbar .icon-bar {
    background: var(--ui-ink);
}

/* Page hierarchy */
.seo-app h1,
.seo-app h2,
.seo-app h3,
.seo-app h4,
.seo-app h5 {
    color: var(--ui-ink);
    font-family: inherit;
    font-weight: 750;
    letter-spacing: -.035em;
}

.seo-app h1 {
    margin: 10px 0 24px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.seo-app h2 {
    margin: 8px 0 18px;
    font-size: clamp(22px, 2.5vw, 28px);
    line-height: 1.2;
}

.seo-app h3 {
    margin-top: 0;
    font-size: 19px;
}

.seo-app h4 {
    font-size: 15px;
}

.seo-app .hero-unit,
.seo-app .well {
    margin: 0 0 22px;
    padding: 28px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-sm);
    color: var(--ui-ink);
}

.seo-app .hero-unit h1 {
    margin-top: 0;
    font-size: clamp(26px, 3vw, 34px);
    text-align: left;
    text-shadow: none;
}

.seo-app .login-card {
    max-width: 820px;
    margin: 28px auto;
}

.seo-app .login-intro {
    max-width: 620px;
    margin: -10px 0 24px;
}

.seo-app .login-form {
    justify-content: flex-start;
}

.seo-app .login-form .form-group {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
}

.seo-app .login-form input {
    min-width: 260px;
}

.seo-app .quota-reached {
    margin: 18px 0 24px;
    padding: 13px 16px;
    border: 1px solid #f2cfd3;
    border-radius: 10px;
    background: var(--ui-danger-soft);
    color: var(--ui-danger);
    font-weight: 750;
}

.seo-app .project-quota-line {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 32px;
    margin: 6px 0 12px;
    color: #6c777b;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .seo-app .project-quota-line {
        flex-wrap: wrap;
        gap: 6px 20px;
        white-space: normal;
    }
}

.seo-app .form-return {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ui-line);
    text-align: center;
}

.seo-app .saved-keywords {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 16px;
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    background: var(--ui-surface-muted);
    color: var(--ui-muted);
    line-height: 1.7;
    text-align: left;
}

.seo-app .rank-keyword {
    margin: -10px 0 22px;
    color: var(--ui-muted);
    font-size: 15px;
}

.seo-app .rank-keyword strong {
    color: var(--ui-ink);
}

.seo-app .log-entry {
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--ui-line);
    border-left: 3px solid #b9c3d2;
    border-radius: 9px;
    background: var(--ui-surface);
    color: #4e5b70;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(20, 34, 58, .03);
}

.seo-app .log-entry time {
    color: var(--ui-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.seo-app .log-success {
    border-left-color: var(--ui-success);
}

.seo-app .log-error {
    border-left-color: var(--ui-danger);
}

.seo-app .log-temps {
    border-left-color: var(--ui-warning);
}

.seo-app .log-ranking {
    max-height: 260px;
    margin: 10px 0 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid var(--ui-line);
    border-radius: 7px;
    background: var(--ui-surface-muted);
    color: var(--ui-muted);
    font-size: 11px;
    white-space: pre-wrap;
}

.seo-app .hero-unit p {
    color: var(--ui-muted);
}

.seo-app .well {
    background: var(--ui-surface);
}

.seo-app .well strong {
    color: var(--ui-ink);
}

/* Buttons and controls */
.seo-app .btn {
    display: inline-flex;
    min-height: 40px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--ui-surface);
    background-image: none;
    color: #46546a;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    text-shadow: none;
    box-shadow: 0 1px 2px rgba(20, 34, 58, .05);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

/* Dashboard action bar: every action shares the same height and the available
 * width is used before the export action is kept at the far edge. */
.seo-app .dashboard-action-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    margin-top: 4px;
}

.seo-app .dashboard-action-list {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.seo-app .dashboard-action-list > a.btn,
.seo-app .dashboard-action-list > .inline-action-form {
    flex: 1 1 170px;
    min-width: 150px;
}

.seo-app .dashboard-action-list > a.btn {
    margin: 0;
    text-align: center;
    white-space: normal;
    gap: 9px;
    padding-right: 18px;
    padding-left: 18px;
}

.seo-app .dashboard-action-list > .inline-action-form {
    display: flex;
    margin: 0;
}

.seo-app .dashboard-action-list > .inline-action-form > .btn {
    width: 100%;
    height: 100%;
    margin: 0;
    gap: 9px;
    padding-right: 18px;
    padding-left: 18px;
}

.seo-app .dashboard-action-export {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.seo-app .dashboard-export-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ui-line);
    border-radius: 9px;
    background: var(--ui-surface-muted);
    color: var(--ui-muted);
}

.seo-app .dashboard-export-button:hover,
.seo-app .dashboard-export-button:focus {
    border-color: #b8c8ee;
    background: var(--ui-brand-soft);
    color: var(--ui-brand-dark);
}

.seo-app .btn:hover,
.seo-app .btn:focus {
    background: #f7f9fc;
    border-color: #cbd5e4;
    color: var(--ui-ink);
    box-shadow: 0 4px 12px rgba(20, 34, 58, .08);
}

.seo-app .btn:active {
    transform: translateY(1px);
}

.seo-app .btn-primary,
.seo-app .btn-info {
    background: var(--ui-brand);
    border-color: var(--ui-brand);
    color: #fff;
}

.seo-app .btn-primary:hover,
.seo-app .btn-primary:focus,
.seo-app .btn-info:hover,
.seo-app .btn-info:focus {
    background: var(--ui-brand-dark);
    border-color: var(--ui-brand-dark);
    color: #fff;
}

.seo-app .btn-success {
    background: var(--ui-success);
    border-color: var(--ui-success);
    color: #fff;
}

.seo-app .btn-warning {
    background: var(--ui-warning);
    border-color: var(--ui-warning);
    color: #fff;
}

.seo-app .btn-danger {
    background: var(--ui-danger);
    border-color: var(--ui-danger);
    color: #fff;
}

.seo-app .btn-mini {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 12px;
    box-shadow: none;
}

.seo-app .btn-large {
    min-height: 44px;
    padding: 11px 20px;
}

.seo-app input,
.seo-app select,
.seo-app textarea,
.seo-app .form-control {
    max-width: 100%;
    border: 1px solid #d5ddea;
    border-radius: 8px;
    background: #fff;
    color: var(--ui-ink);
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(20, 34, 58, .03);
}

.seo-app input:focus,
.seo-app select:focus,
.seo-app textarea:focus,
.seo-app .form-control:focus {
    border-color: #7d9bf0;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(40, 89, 216, .12);
}

.seo-app input[type="checkbox"],
.seo-app input[type="radio"] {
    accent-color: var(--ui-brand);
}

.seo-app .form-inline,
.seo-app .form-horizontal {
    color: var(--ui-ink);
}

.seo-app form.form-inline {
    gap: 9px;
    align-items: center;
    padding: 16px;
    background: var(--ui-surface-muted);
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    box-shadow: none;
}

.seo-app form.form-inline select,
.seo-app form.form-inline input[type="text"],
.seo-app form.form-inline input[type="number"] {
    min-height: 36px;
    margin-bottom: 0;
}

.seo-app .form-horizontal .control-group {
    margin-bottom: 18px;
}

.seo-app .form-horizontal .control-label {
    padding-top: 9px;
    color: #4b5970;
    font-size: 13px;
    font-weight: 700;
}

.seo-app .form-horizontal .controls {
    margin-left: 180px;
}

.seo-app fieldset {
    min-width: 0;
}

.seo-app legend {
    width: 100%;
    margin-bottom: 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ui-line);
    color: var(--ui-ink);
    font-size: 16px;
    font-weight: 750;
}

.seo-app .form-actions {
    margin-top: 22px;
    padding: 18px 0 0;
    border-top: 1px solid var(--ui-line);
    background: transparent;
}

.seo-app .help-block,
.seo-app p.help-block {
    margin-top: 7px;
    color: var(--ui-muted);
    font-size: 12px;
}

/* Messages */
.seo-app .alert {
    margin: 0 0 18px;
    padding: 13px 16px;
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    background: var(--ui-surface-muted);
    color: var(--ui-ink);
    text-shadow: none;
    box-shadow: none;
}

.seo-app .alert-info {
    background: var(--ui-brand-soft);
    border-color: #d9e3ff;
    color: #2b4b9b;
}

.seo-app .alert-success {
    background: var(--ui-success-soft);
    border-color: #c7ead9;
    color: #156545;
}

.seo-app .alert-warning {
    background: var(--ui-warning-soft);
    border-color: #f0dfad;
    color: #805611;
}

.seo-app .alert-error,
.seo-app .alert-danger {
    background: var(--ui-danger-soft);
    border-color: #f2cfd3;
    color: #923a45;
}

.seo-app .close {
    color: currentColor;
    opacity: .65;
    text-shadow: none;
}

/* Data tables: dense but readable, with a clear hierarchy. */
.seo-app .table {
    width: 100%;
    margin: 0 0 18px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    box-shadow: var(--ui-shadow-sm);
    color: var(--ui-ink);
    font-size: 13px;
}

.seo-app .table thead th {
    padding: 12px 10px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--ui-line);
    color: #68758a;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.seo-app .table thead th a {
    color: #68758a;
}

.seo-app .table td,
.seo-app .table th {
    padding: 11px 10px;
    border-top: 1px solid #edf0f5;
    vertical-align: middle;
}

.seo-app .table tbody tr {
    transition: background-color .15s ease;
}

.seo-app .table tbody tr:hover td {
    background: #f7f9fe;
}

.seo-app .table tbody tr.success td {
    background: var(--ui-success-soft);
}

.seo-app .table tbody tr.warning td {
    background: var(--ui-warning-soft);
}

.seo-app .table tbody tr.error td {
    background: var(--ui-danger-soft);
}

.seo-app .table tbody tr.infoconcurrent td {
    background: #f2f6ff;
}

.seo-app .table tbody tr.keyword-highlight {
    scroll-margin-top: 96px;
}

.seo-app .table tbody tr.keyword-highlight td {
    background: #fff1a8 !important;
    box-shadow: inset 0 3px 0 #e4b100, inset 0 -3px 0 #e4b100;
}

.seo-app .table tbody tr.keyword-highlight td:first-child {
    box-shadow: inset 4px 3px 0 #e4b100, inset 0 -3px 0 #e4b100;
}

.seo-app .table tbody tr.keyword-highlight td:last-child {
    box-shadow: inset 0 3px 0 #e4b100, inset -4px -3px 0 #e4b100;
}

.seo-app .table.table-condensed td,
.seo-app .table.table-condensed th {
    padding: 8px;
}

.seo-app .table input[type="text"],
.seo-app .table input[type="password"],
.seo-app .table input[type="number"] {
    min-height: 32px;
    box-sizing: border-box;
}

.seo-app .table td > a > i,
.seo-app .table td > i {
    display: inline-block;
    margin: 0 2px;
    opacity: .8;
}

.seo-app .table td > a:hover > i {
    opacity: 1;
}

.seo-app .delete-inline-form {
    display: inline;
    margin: 0;
}

.seo-app .icon-button {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0;
    background: transparent;
    color: #c2415a;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.seo-app .icon-button:hover,
.seo-app .icon-button:focus {
    color: #8f1d35;
    border-color: #f2cfd3;
    background: var(--ui-danger-soft);
    outline: 0;
}

.seo-app .inline-action-form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

.seo-app .action-icon-form .icon-button {
    margin: 0;
}

.seo-app .action-cell {
    min-width: 122px;
    padding-right: 12px;
    padding-left: 12px;
    text-align: center;
    white-space: nowrap;
}

.seo-app .action-cell .inline-action-form,
.seo-app .action-cell .delete-inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0 2px;
    vertical-align: middle;
}

.seo-app .action-cell .icon-button i,
.seo-app .action-cell .table-action-link i {
    margin: 0;
    opacity: 1;
}

.seo-app .action-cell .action-state-pause {
    color: var(--ui-warning);
}

.seo-app .action-cell .action-state-pause:hover,
.seo-app .action-cell .action-state-pause:focus {
    border-color: #f0dfad;
    background: var(--ui-warning-soft);
    color: #805611;
}

.seo-app .action-cell .action-state-resume {
    color: var(--ui-success);
}

.seo-app .action-cell .action-state-resume:hover,
.seo-app .action-cell .action-state-resume:focus {
    border-color: #c7ead9;
    background: var(--ui-success-soft);
    color: #156545;
}

.seo-app .action-cell .action-refresh,
.seo-app .action-cell .action-history {
    color: var(--ui-brand);
}

.seo-app .action-cell .action-refresh:hover,
.seo-app .action-cell .action-refresh:focus,
.seo-app .action-cell .action-history:hover,
.seo-app .action-cell .action-history:focus {
    border-color: #d9e3ff;
    background: var(--ui-brand-soft);
    color: var(--ui-brand-dark);
}

.seo-app .action-cell .table-action-link {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 8px;
    vertical-align: middle;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.seo-app .menu-action-form {
    margin: 0;
}

.seo-app .menu-action-button {
    display: block;
    width: 100%;
    padding: 3px 20px;
    border: 0;
    background: transparent;
    color: #333;
    text-align: left;
    cursor: pointer;
}

.seo-app .menu-action-button:hover,
.seo-app .menu-action-button:focus {
    background: #f5f7fb;
    color: var(--ui-primary);
}

.seo-app .inline-form,
.seo-app .alert-dismiss-form {
    display: inline;
    margin: 0;
}

.seo-app .alert-dismiss-form {
    position: absolute;
    top: 10px;
    right: 12px;
}

.seo-app .badge,
.seo-app .label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef1f6;
    color: #59677c;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    text-shadow: none;
}

.seo-app .badge-success,
.seo-app .label-success {
    background: var(--ui-success-soft);
    color: var(--ui-success);
}

.seo-app .badge-warning,
.seo-app .label-warning {
    background: var(--ui-warning-soft);
    color: var(--ui-warning);
}

.seo-app .badge-info,
.seo-app .label-info {
    background: var(--ui-brand-soft);
    color: var(--ui-brand-dark);
}

.seo-app .badge-serp-position {
    margin-left: 6px;
    background: #f1f3f7;
    color: #59677c;
    border: 1px solid #d9dee8;
    vertical-align: middle;
}

.seo-app .position-cell {
    text-align: center;
    white-space: nowrap;
}

.seo-app .local-position-badge {
    margin-left: 6px;
    margin-right: 0;
    vertical-align: middle;
}

.seo-app .position-unavailable-badge {
    margin-left: 6px;
    background: #fff4d6;
    color: #8a5a00;
    border: 1px solid #efd58a;
    vertical-align: middle;
}

/* Existing dashboard cards use these classes; align them with the new shell. */
.seo-app .home-group-section {
    margin-bottom: 28px;
}

.seo-app .home-project-grid {
    gap: 16px;
}

.seo-app .home-project-card {
    min-width: 280px;
    padding: 22px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    box-shadow: var(--ui-shadow-sm);
}

.seo-app .home-project-card:hover {
    border-color: #b8c8ee;
    box-shadow: var(--ui-shadow-md);
    transform: translateY(-2px);
}

.seo-app .home-project-domain {
    color: var(--ui-ink);
    font-size: 22px;
    letter-spacing: -.03em;
}

.seo-app .home-project-meta {
    color: var(--ui-muted);
    font-size: 13px;
}

.seo-app .trend-pill {
    padding: 10px 12px;
    border-radius: 10px;
    font-family: inherit;
}

.seo-app .trend-pill em {
    font-size: 21px;
}

.seo-app .home-alert-card,
.seo-app .home-empty-state {
    border-radius: 12px;
    box-shadow: var(--ui-shadow-sm);
}

.seo-app .home-alert-card {
    position: relative;
}

.seo-app .home-alert-message {
    font-size: 14px;
}

/* Secondary pages and charts */
.seo-app .seo-analysis {
    background: linear-gradient(180deg, #f7f9ff, #fff);
    border-color: #dce5fb;
}

.seo-app .seo-score {
    margin-left: 6px;
    background: var(--ui-brand-soft);
    color: var(--ui-brand-dark);
}

.seo-app #monthly-trend-chart,
.seo-app .graph_detail {
    overflow: hidden;
    border-radius: 10px;
}

.seo-app .trend-chart {
    width: 100%;
    min-height: 360px;
    padding: 8px 0 0;
    background: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
    border: 1px solid #e2e8f3;
    border-radius: 12px;
}

.seo-app .trend-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 320px;
}

.seo-app .trend-grid-line {
    stroke: #e5eaf3;
    stroke-width: 1;
}

.seo-app .trend-axis-label,
.seo-app .trend-date-label {
    fill: #7a8494;
    font-family: inherit;
    font-size: 13px;
}

.seo-app .trend-line {
    fill: none;
    stroke: #2859d8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.seo-app .trend-not-found-summary {
    fill: #913631;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
}

.seo-app .trend-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 28px;
    color: var(--ui-muted);
    text-align: center;
    font-size: 15px;
}

.seo-app footer,
.app-footer {
    margin: 0;
    padding: 22px 0 28px;
    border-top: 1px solid var(--ui-line);
    color: var(--ui-muted);
    font-size: 12px;
}

.seo-app footer p {
    margin: 0;
}

.seo-app footer a {
    font-weight: 650;
}

.seo-app #dhtmltooltip {
    border: 1px solid #c8d3e4;
    border-radius: 10px;
    background: #fff;
    color: var(--ui-ink);
    box-shadow: var(--ui-shadow-md);
}

/* Standalone ranking history page (opened from the dashboard). */
body.seo-app.seo-chart-page {
    padding: 0;
}

.chart-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 0 max(20px, calc((100% - 1680px) / 2));
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--ui-line);
    box-shadow: 0 5px 22px rgba(20, 34, 58, .06);
}

.chart-page-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ui-ink);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.chart-page-header .brand:hover {
    color: var(--ui-ink);
}

.chart-page-context {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--ui-muted);
    font-size: 12px;
}

.chart-page-context strong {
    color: var(--ui-ink);
    font-size: 14px;
}

.chart-page-main {
    width: min(1680px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 42px;
}

.chart-card {
    padding: 20px 24px 24px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-sm);
}

/* Old inline layout helpers need to become fluid on small screens. */
.seo-app [style*="float:left"],
.seo-app [style*="float: left"] {
    max-width: 100%;
}

@media (max-width: 900px) {
    .seo-app .navbar .nav > li > a,
    .seo-app .navbar .dropdown-toggle {
        padding-right: 9px;
        padding-left: 9px;
    }

    .seo-app .form-horizontal .controls {
        margin-left: 150px;
    }
}

@media (max-width: 979px) {
    .seo-app .navbar .btn-navbar {
        display: inline-flex;
    }

    .seo-app .nav-collapse.collapse {
        display: none;
        height: 0;
        overflow: hidden;
    }

    .seo-app .nav-collapse.collapse.in {
        display: block;
        height: auto;
        overflow: visible;
    }

    .seo-app .navbar-fixed-top {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        margin: 0;
    }

    .seo-app .navbar-fixed-top .navbar-inner {
        padding: 0;
    }
}

@media (max-width: 767px) {
    body.seo-app {
        padding-top: 68px;
    }

    .app-shell,
    .seo-app > .container {
        width: min(100% - 28px, 680px);
    }

    .app-main {
        padding-top: 18px;
    }

    .seo-app .navbar-inner,
    .seo-app .navbar .container {
        min-height: 60px;
    }

    .seo-app .navbar .brand {
        height: 60px;
        font-size: 15px;
    }

    .seo-app .brand-copy small {
        font-size: 8px;
    }

    .seo-app .nav-collapse {
        clear: both;
        flex-basis: 100%;
        width: 100%;
        margin: 0;
        padding: 8px 0 12px;
    }

    .seo-app .nav-collapse.in {
        border-top: 1px solid var(--ui-line);
    }

    .seo-app .navbar .nav,
    .seo-app .navbar .nav.pull-right {
        display: block;
        float: none;
        margin: 0;
    }

    .seo-app .navbar .nav > li > a,
    .seo-app .navbar .dropdown-toggle {
        margin: 2px 0;
        padding: 11px 12px;
    }

    .seo-app .navbar .divider-vertical {
        display: none;
    }

    .seo-app .navbar .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin: 4px 0 6px;
        box-shadow: none;
    }

    .seo-app .hero-unit,
    .seo-app .well {
        padding: 20px;
        border-radius: 12px;
    }

    .seo-app .login-form .form-group {
        align-items: stretch;
        flex-direction: column;
    }

    .seo-app .login-form input {
        min-width: 0;
        width: 100%;
    }

    .seo-app form.form-inline {
        display: block;
    }

    .seo-app form.form-inline > * {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 10px;
    }

    .seo-app form.form-inline > *:last-child {
        margin-bottom: 0;
    }

    .seo-app .dashboard-action-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .seo-app .dashboard-action-list > a.btn,
    .seo-app .dashboard-action-list > .inline-action-form {
        flex-basis: 100%;
        min-width: 0;
    }

    .seo-app .dashboard-action-export {
        justify-content: flex-end;
    }

    .seo-app .form-horizontal .control-label {
        display: block;
        float: none;
        width: auto;
        padding: 0;
        margin-bottom: 6px;
        text-align: left;
    }

    .seo-app .form-horizontal .controls {
        margin-left: 0;
    }

    .seo-app .form-horizontal input,
    .seo-app .form-horizontal textarea,
    .seo-app .form-horizontal select {
        box-sizing: border-box;
        width: 100%;
    }

    .seo-app .table {
        display: block;
        min-width: 760px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .seo-app .home-project-top {
        gap: 10px;
    }

    .seo-app .home-project-card {
        flex-basis: 100%;
    }

    .seo-app .admin-top-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .seo-app [style*="float:right"],
    .seo-app [style*="float: right"] {
        float: none !important;
        padding-top: 12px !important;
    }

    .chart-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 16px 14px;
    }

    .chart-page-main {
        width: calc(100% - 28px);
        padding-top: 14px;
    }

    .chart-page-context {
        align-items: flex-start;
    }

    .chart-card {
        padding: 10px;
    }

    #container {
        min-height: 500px !important;
        height: 70vh !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .seo-app *,
    .seo-app *::before,
    .seo-app *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
