/* ===========================
   Journal Page
=========================== */

.main-content{
    flex:1;
    padding:30px;
    background:#0f1722;
    min-height:100vh;
    overflow:auto;
    color:#fff;
}

/* ===========================
   Header
=========================== */

.page-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.page-header h1{
    font-size:30px;
    font-weight:200;
}

.page-header p{
    color:#9ca3af;
    margin-top:5px;
}

.yellow-btn{
    background:#f4b400;
    color:#111;
    border:none;
    padding:12px 22px;
    border-radius:10px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.yellow-btn:hover{
    background:#ffca28;
    transform:translateY(-2px);
}

/* ===========================
   Summary
=========================== */

.summary-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:30px;
}

.summary-card{
    background:#1b2433;
    border:1px solid #2a3446;
    border-radius:15px;
    padding:25px;
}

.summary-card h3{
    color:#9ca3af;
    font-size:15px;
    margin-bottom:12px;
}

.summary-card span{
    font-size:clamp(17px, 1.8vw, 24px);
    font-weight:bold;
    color:#fff;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
}

/* ===========================
   Calendar
=========================== */

.calendar-card{
    background:#1b2433;
    border-radius:15px;
    border:1px solid #2a3446;
    padding:25px;
}

.calendar-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

.calendar-header h2{
    font-size:24px;
}

.month-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:#263246;
    color:#fff;
    cursor:pointer;
}

.month-btn:hover{
    background:#f4b400;
    color:#111;
}

.weekdays{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    margin-bottom:15px;
    text-align:center;
    font-weight:600;
    color:#9ca3af;
}

.calendar{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:15px;
}

/* ===========================
   Day Card
=========================== */

.day{
    height:110px;
    border-radius:15px;
    padding:12px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    cursor:pointer;
    transition:.3s;
    border:1px solid transparent;
}

.day:hover{
    transform:translateY(-5px);
    border-color:#f4b400;
}

.day.empty{
    visibility:hidden;
}

.date{
    font-size:18px;
    font-weight:bold;
}

.day small{
    font-size:14px;
    font-weight:600;
}

/* Profit */

.profit{
    background:#163a28;
    color:#22c55e;
}

/* Loss */

.loss{
    background:#401d1d;
    color:#ef4444;
}

/* No Trade */

.no-trade{
    background:#263246;
    color:#9ca3af;
}

/* ===========================
   Modal
=========================== */

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    justify-content:center;
    align-items:center;
    z-index:999;
}

.modal-content{

    width:700px;
    max-width:95%;
    max-height:90vh;
    overflow:auto;

    background:#1b2433;

    border-radius:18px;

    padding:30px;

    border:1px solid #2a3446;

    position:relative;

}

.close,
.close-manual{

    position:absolute;
    right:20px;
    top:15px;

    font-size:28px;

    cursor:pointer;

    color:#fff;

}

.modal h2{

    margin-bottom:25px;

}

.journal-section{

    margin-bottom:25px;

}

.journal-section h3{

    margin-bottom:20px;

    color:#f4b400;

}

.info-row{

    display:flex;

    justify-content:space-between;

    margin-bottom:12px;

}

.profit-text{

    color:#22c55e;

    font-weight:bold;

}

.loss-text{

    color:#ef4444;

    font-weight:bold;

}

/* ===========================
   Inputs
=========================== */

label{

    display:block;

    margin-top:18px;

    margin-bottom:8px;

    color:#d1d5db;

}

input,
select,
textarea{

    width:100%;

    padding:12px;

    border-radius:10px;

    border:1px solid #334155;

    background:#0f1722;

    color:white;

    outline:none;

}

textarea{

    min-height:120px;

    resize:vertical;

}

textarea[readonly]{

    color:#cbd5e1;

}

input:focus,
select:focus,
textarea:focus{

    border-color:#f4b400;

}

/* ===========================
   Scrollbar
=========================== */

::-webkit-scrollbar{

    width:8px;

}

::-webkit-scrollbar-thumb{

    background:#3b4657;

    border-radius:10px;

}

/* ===========================
   Responsive
=========================== */

@media(max-width:1000px){

.summary-grid{

    grid-template-columns:repeat(2,1fr);

}

.calendar{

    gap:10px;

}

.day{

    height:90px;

}

}

@media(max-width:700px){

.page-header{

    flex-direction:column;

    gap:20px;

    align-items:flex-start;

}

.summary-grid{

    grid-template-columns:1fr;

}

.weekdays{

    font-size:13px;

}

.day{

    height:75px;

    padding:8px;

}

.day small{

    font-size:11px;

}

.modal-content{

    padding:20px;

}

}
/*==================================================
JOURNAL MODAL
==================================================*/

.journal-modal{

    width:95%;
    max-width:1100px;
    max-height:90vh;
    overflow-y:auto;
    background:#161616;
    border-radius:18px;
    padding:30px;

}

/*==================================================
HEADER
==================================================*/

.journal-header{

    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;

}

.journal-header h2{

    color:#fff;
    font-size:28px;
    margin-bottom:5px;

}

.journal-header p{

    color:#999;
    font-size:14px;

}

.journal-status{

    background:#18c964;
    color:#fff;
    padding:10px 22px;
    border-radius:30px;
    font-weight:700;
    font-size:14px;

}

.journal-status.loss{

    background:#e53935;

}

/*==================================================
TOP GRID
==================================================*/

.journal-grid{

    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
    margin-bottom:25px;

}

/*==================================================
CARDS
==================================================*/

.journal-card{

    background:#1f1f1f;
    border:1px solid #2c2c2c;
    border-radius:15px;
    padding:20px;
    margin-bottom:20px;

}

.journal-card h3{

    color:#f3c623;
    margin-bottom:18px;
    display:flex;
    align-items:center;
    gap:10px;

}

/*==================================================
ROWS
==================================================*/

.info-row{

    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 0;
    border-bottom:1px solid #2d2d2d;

}

.info-row:last-child{

    border-bottom:none;

}

.info-row span{

    color:#999;

}

.info-row strong{

    color:#fff;
    font-weight:600;

}

/*==================================================
AI NOTE
==================================================*/

.ai-note{

    width:100%;
    margin-top:20px;
    background:#121212;
    border:1px solid #2c2c2c;
    color:#fff;
    border-radius:10px;
    resize:none;
    min-height:120px;
    padding:15px;
    line-height:1.6;

}

/*==================================================
TRADE TABLE
==================================================*/

.trade-table{

    overflow-x:auto;

}

.trade-table table{

    width:100%;
    border-collapse:collapse;

}

.trade-table th{

    background:#262626;
    color:#f3c623;
    padding:14px;
    text-align:left;

}

.trade-table td{

    padding:14px;
    border-bottom:1px solid #2d2d2d;
    color:#ddd;

}

.trade-table tr:hover{

    background:#222;

}

/*==================================================
FORM
==================================================*/

.journal-form{

    display:flex;
    flex-direction:column;
    gap:18px;

}

.journal-form label{

    color:#ddd;
    font-weight:600;
    margin-bottom:8px;
    display:block;

}

.journal-form input,

.journal-form select,

.journal-form textarea{

    width:100%;
    padding:12px;
    background:#111;
    color:#fff;
    border:1px solid #333;
    border-radius:10px;
    outline:none;
    transition:.3s;

}

.journal-form input:focus,

.journal-form select:focus,

.journal-form textarea:focus{

    border-color:#f3c623;

}

.journal-form textarea{

    resize:vertical;
    min-height:120px;

}

/*==================================================
BUTTON
==================================================*/

.journal-form .yellow-btn{

    width:220px;
    margin-top:10px;

}

/*==================================================
PROFIT / LOSS COLORS
==================================================*/

.profit-text{

    color:#18c964;
    font-weight:bold;

}

.loss-text{

    color:#ff4d4d;
    font-weight:bold;

}

/*==================================================
SCROLLBAR
==================================================*/

.journal-modal::-webkit-scrollbar{

    width:8px;

}

.journal-modal::-webkit-scrollbar-thumb{

    background:#444;
    border-radius:20px;

}

/*==================================================
RESPONSIVE
==================================================*/

@media(max-width:900px){

    .journal-grid{

        grid-template-columns:1fr;

    }

    .journal-header{

        flex-direction:column;
        align-items:flex-start;
        gap:15px;

    }

    .journal-status{

        align-self:flex-start;

    }

    .journal-form .yellow-btn{

        width:100%;

    }

}
.journal-account-label{
    margin:0 0 12px;
    padding:12px 16px;
    border:1px solid var(--border, rgba(255,255,255,.08));
    border-radius:12px;
    background:var(--card, #171f2f);
    color:var(--text, #fff);
    font-size:13px;
    font-weight:600;
}

html[data-theme="light"] .journal-page .journal-account-label{
    border-color:#dbe2ea;
    background:#fff;
    color:#334155;
}

@media(max-width:700px){
    .journal-page .dashboard .main-content{
        padding:12px 13px 24px;
    }

    .journal-page .dashboard .page-header{
        gap:10px;
        margin-bottom:12px;
    }

    .journal-page .dashboard .page-header h1{
        margin:0;
        font-size:27px;
        font-weight:650;
        letter-spacing:-.04em;
    }

    .journal-page .dashboard .page-header p{
        margin-top:5px;
        font-size:12px;
    }

    .journal-page .dashboard .page-header .yellow-btn{
        min-height:38px;
        padding:9px 15px;
    }

    .journal-page .journal-account-label{
        margin-bottom:10px;
        padding:9px 12px;
        font-size:12px;
        font-weight:500;
        line-height:1.45;
    }

    .journal-page .dashboard .summary-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px;
        margin-bottom:14px;
    }

    .journal-page .dashboard .summary-card{
        min-width:0;
        padding:12px;
        border-radius:12px;
    }

    .journal-page .dashboard .summary-card h3{
        margin-bottom:8px;
        font-size:11px;
    }

    .journal-page .dashboard .summary-card span{
        font-size:17px;
    }

    .journal-page .dashboard .calendar-card{
        padding:14px 11px;
        border-radius:14px;
    }

    .journal-page .dashboard .calendar-header{
        gap:8px;
        margin-bottom:15px;
    }

    .journal-page .dashboard .calendar-header h2{
        font-size:18px;
        text-align:center;
    }

    .journal-page .dashboard .month-btn{
        width:34px;
        height:34px;
        flex:none;
    }

    .journal-page .dashboard .weekdays{
        margin-bottom:9px;
        font-size:10px;
    }

    .journal-page .dashboard .calendar{
        gap:4px;
    }

    .journal-page .dashboard .day{
        position:relative;
        min-width:0;
        height:52px;
        min-height:52px;
        align-items:center;
        justify-content:flex-start;
        gap:6px;
        padding:5px 2px;
        border-radius:9px;
        overflow:hidden;
    }

    .journal-page .dashboard .day:hover{
        transform:none;
    }

    .journal-page .dashboard .day .date{
        font-size:12px;
    }

    .journal-page .dashboard .day small{
        display:none;
    }

    .journal-page .dashboard .day.profit::after,
    .journal-page .dashboard .day.loss::after{
        width:5px;
        height:5px;
        flex:none;
        border-radius:50%;
        background:currentColor;
        content:"";
    }

    .journal-page .dashboard .day:focus-visible{
        outline:2px solid #f3c623;
        outline-offset:1px;
    }

    .journal-page .journal-modal{
        width:100%;
        max-width:none;
        max-height:calc(100vh - 20px);
        max-height:calc(100dvh - 20px);
        padding:20px 14px;
        border-radius:16px;
    }

    .journal-page .journal-modal > .close{
        top:9px;
        right:13px;
    }

    .journal-page .journal-header{
        gap:10px;
        margin-bottom:14px;
        padding-right:22px;
    }

    .journal-page .journal-header h2{
        margin-bottom:4px;
        font-size:22px;
        overflow-wrap:anywhere;
    }

    .journal-page .journal-header p{
        font-size:12px;
    }

    .journal-page .journal-status{
        flex:none;
        padding:7px 11px;
        font-size:11px;
    }

    .journal-page .journal-grid{
        gap:10px;
        margin-bottom:12px;
    }

    .journal-page .journal-modal .journal-card{
        margin-bottom:12px;
        padding:14px;
        border-radius:12px;
    }

    .journal-page .journal-modal .journal-card h3{
        gap:8px;
        margin-bottom:10px;
        font-size:15px;
    }

    .journal-page .journal-modal .info-row{
        gap:10px;
        padding:8px 0;
        font-size:12px;
    }

    .journal-page .journal-modal .info-row strong{
        max-width:58%;
        overflow-wrap:anywhere;
        text-align:right;
    }

    .journal-page .ai-note{
        min-height:76px;
        margin-top:12px;
        padding:11px;
        font-size:12px;
    }

    .journal-page .trade-table{
        margin:0 -2px;
        border-radius:8px;
    }

    .journal-page .trade-table table{
        min-width:380px;
    }

    .journal-page .trade-table th,
    .journal-page .trade-table td{
        padding:9px 8px;
        font-size:11px;
        white-space:nowrap;
    }
}
