/* screener_base.css
   Replaces style.css + dashboard.css + screener.css for all screener/calculator pages.
   Source: extracted only the rules used by screener_app and calculator_app templates. */

/* ═══════════════════════════════════════════════════════════════
   1. RESET & CSS VARIABLES  (from style.css)
   ═══════════════════════════════════════════════════════════════ */

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

:root {
    --primary-color: #0B101A;
    --secondary-color: #1A212D;
    --border-radious: 10px;
    --light-text: #FEFEFF;
    --white: #ffffff;
    --das-text: #9C9FAF;
    --color-shadow: linear-gradient(73.6deg, #85FFC4 2.11%, #5CC6FF 42.39%, #BC85FF 85.72%);
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--primary-color);
    color: var(--white);
}

a {
    text-decoration: none;
}

ul, ol {
    list-style-type: none;
}

input, label, button {
    font-family: "Inter", sans-serif;
    outline: none;
    border: none;
}

p {
    font-family: "Cabin", sans-serif;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   2. SCROLLBAR  (from style.css)
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

/* ═══════════════════════════════════════════════════════════════
   3. FOOTER  (from style.css)
   ═══════════════════════════════════════════════════════════════ */

footer {
    background-color: var(--secondary-color);
}

.ft-container {
    max-width: 1450px;
    padding: 21px 50px;
    margin: 0 auto;
    width: 100%;
}

.ft-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ft-main p {
    font-size: 14px;
    font-weight: 500;
    line-height: 18.9px;
    letter-spacing: -0.005em;
    color: var(--light-text);
    opacity: 60%;
}

.ft-main ul a img {
    height: 15px;
    width: 15px;
}

.ft-main ul a span {
    font-size: 15px;
    font-weight: 500;
    line-height: 19.5px;
    color: var(--white);
}

.ft-main ul a,
.ft-main ul {
    display: flex;
    align-items: center;
}

.ft-main ul a {
    gap: 6px;
}

.ft-main ul {
    gap: 20px;
}

@media screen and (max-width: 607px) {
    .ft-main {
        flex-direction: column;
        gap: 20px;
    }
    .ft-main ul {
        width: 100%;
        justify-content: space-between;
    }
}

@media screen and (max-width: 400px) {
    .ft-container {
        padding: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   4. PAGE LAYOUT  (from dashboard.css)
   ═══════════════════════════════════════════════════════════════ */

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dashboard-body {
    display: flex;
    flex: 1;
}

.content-area {
    flex: 1;
    display: flex;
    width: 80%;
    height: 90vh;
    flex-direction: column;
    padding: 20px 0 0 20px;
}

.header {
    height: 50px;
    padding: 20px;
}

.das-header-content2,
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.main-dashboard-content {
    padding: 70px 20px 70px 0;
    font-size: 18px;
    overflow: scroll;
}

.main-dashboard-content::-webkit-scrollbar {
    display: none;
}

.das-header-content h1 {
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.01em;
    color: var(--white);
}

.das-header-content p {
    font-size: 15px;
    font-weight: 500;
    line-height: 27px;
    letter-spacing: -0.01em;
    color: var(--white);
    opacity: 70%;
}

/* ═══════════════════════════════════════════════════════════════
   5. SIDEBAR  (from dashboard.css)
   ═══════════════════════════════════════════════════════════════ */

.sidebar {
    width: 16%;
    padding: 30px 20px;
    border-right: 2px solid #1A1E27;
}

.sidebar .logo-dash {
    width: 90%;
}

.dash-menu {
    margin: 30px 0 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 81%;
}

.dash-menu ul li {
    padding: 6% 10%;
    background-color: #0A0F19;
    margin-bottom: 10px;
    border-radius: 6px;
}

.dash-menu ul li a {
    display: flex;
    align-items: center;
    width: 100%;
}

.dash-menu ul li a img {
    width: 18px;
    margin: 0 15px 0 0;
    opacity: 70%;
}

.dash-menu ul li a span {
    font-size: 16px;
    font-weight: 500;
    line-height: 21px;
    letter-spacing: -0.01em;
    color: #9D9FA3;
}

.dash-active {
    position: relative;
    background: linear-gradient(73.6deg, rgba(133, 255, 196, 0.2) 2.11%, rgba(92, 198, 255, 0.2) 42.39%, rgba(188, 133, 255, 0.2) 85.72%);
    border-radius: 8px !important;
}

.dash-active::after {
    content: '';
    display: block;
    width: 3.5px;
    height: 16px;
    background-image: var(--color-shadow);
    position: absolute;
    top: 0;
    border-radius: 8px;
    transform: translatey(85%);
    left: 0;
}

.dash-active a span {
    color: var(--white) !important;
}

.dash-active a img {
    opacity: 100% !important;
}

.new-trades img {
    width: 18px;
    height: 18px;
}

.new-trades a {
    margin: 10px 0;
    display: block;
    padding: 1.4px;
    border-radius: 30px;
    background-image: var(--color-shadow);
}

.new-trades .trade-bg {
    display: flex;
    width: 100%;
    border-radius: 30px;
    padding: 7px 20px;
    background-color: var(--primary-color);
    align-items: center;
    gap: 12px;
}

.new-trades .trade-bg span {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 22.5px;
    color: var(--white);
    opacity: 80%;
}

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 42px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    text-align: center;
    line-height: 42px;
}

/* ── Sidebar responsive ────────────────────────────────────────── */

@media (max-width: 850px) {
    .main-dashboard-content {
        padding: 0 0 60px 0;
    }
    .content-area {
        overflow-y: scroll;
        overflow-x: hidden;
        padding: 20px;
    }
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-body {
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        background-color: var(--primary-color);
        z-index: 9;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    .sidebar12 {
        display: flex;
        align-items: center;
        text-align: center;
    }
    .sidebar12 button:first-child {
        display: inline-block;
        margin-right: 30%;
    }
    .sidebar .logo-dash {
        width: 100%;
        padding-top: 6px;
    }
    .content-area,
    .sidebar-toggle .content-area {
        width: 100%;
    }
    .header {
        padding: 0;
    }
    .dash-menu {
        display: none;
    }
    .sidebar-toggle.active {
        background-image: var(--color-shadow);
    }
    .sidebar-toggle.active img {
        filter: invert(27%) sepia(53%) saturate(413%) hue-rotate(195deg) brightness(0%) contrast(100%);
    }
    .sidebar.active .dash-menu,
    .sidebar.active .new-trades {
        display: block;
        width: 200px;
        position: absolute;
        z-index: 10;
        height: auto;
        background-color: var(--primary-color);
    }
    .sidebar.active .new-trades {
        border-right: 1.6px solid #BC85FF;
        border-bottom: 1.6px solid #BC85FF;
        border-left: 1.6px solid #74E7DD;
        position: relative;
        left: -11px;
        top: 10px;
        padding: 0 10px;
        border-radius: 0 0 10px 10px;
    }
    .sidebar.active .dash-menu {
        margin-top: 10%;
        border-right: 1.6px solid #BC85FF;
        border-top: 1.6px solid #79B2FF;
        border-left: 1.6px solid #74E7DD;
        padding: 10px;
        border-radius: 10px;
    }
}

@media (max-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
    .das-header-content-none {
        display: none !important;
    }
    .header {
        flex-direction: column;
        height: 50%;
    }
    .das-header-content2 {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .sidebar12 button:first-child {
        margin-right: 17%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   6. SCREENER COMPONENTS  (from screener.css — all kept)
   ═══════════════════════════════════════════════════════════════ */

.cp-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    color: var(--das-text);
    margin-bottom: 16px;
}

.cp-breadcrumb a {
    color: #5CC6FF;
    text-decoration: none;
    transition: color .15s;
}

.cp-breadcrumb a:hover {
    color: #85FFC4;
}

.cp-breadcrumb .sep {
    color: var(--das-text);
    margin: 0 2px;
}

.dashboard-body {
    height: 100vh;
    overflow: hidden;
}

.content-area {
    height: 100%;
    overflow-y: auto;
}

/* Hero Section */
.screener-hero {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

.screener-search {
    max-width: 800px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    gap: 10px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    height: 54px;
    background-color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.search-input-wrapper i {
    color: var(--das-text);
    margin-right: 10px;
}

.search-input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 16px;
}

.search-button {
    height: 54px;
    background-image: var(--color-shadow);
    border: none;
    border-radius: 6px;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-button:hover {
    transform: translateY(-2px);
}

/* Results Container */
.screener-results-container {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 40px;
}

/* Stats */
.screener-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 6px;
}

.stat-label {
    color: var(--das-text);
    font-size: 12px;
    margin-right: 10px;
}

.stat-value {
    color: var(--white);
    font-weight: 600;
}

/* Table */
.screener-table-wrapper {
    overflow-x: auto;
}

.screener-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.screener-table th {
    text-align: left;
    padding: 12px 15px;
    color: var(--das-text);
    font-weight: 600;
    font-size: 13px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.screener-table tr {
    transition: background-color 0.2s;
}

.screener-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.screener-table td {
    padding: 12px 15px;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.add-trade-btn {
    background-color: rgba(92, 198, 255, 0.2);
    color: #5CC6FF;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.add-trade-btn:hover {
    background-color: rgba(92, 198, 255, 0.3);
}

.no-results {
    text-align: center;
    color: var(--das-text);
    padding: 30px !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-btn {
    background-color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.pagination-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .header {
        height: auto !important;
        min-height: unset !important;
        margin-bottom: 10px;
    }
    .screener-hero {
        padding: 20px;
    }
    .search-container {
        flex-direction: column;
    }
    .search-input-wrapper {
        height: 76px;
        padding: 0 18px;
    }
    .search-input {
        height: 76px;
        font-size: 18px;
    }
    .search-button {
        width: 100%;
        height: 60px;
        font-size: 18px;
    }
    .screener-results-container {
        padding: 15px;
    }
    .screener-table th,
    .screener-table td {
        padding: 10px;
    }
}
