/* ==========================================================
   DASHBOARD CARDS
========================================================== */

.sb-card-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(330px,1fr));

    gap:30px;

}

.sb-card{

position:relative;

background:#FFFCF7;

border:1px solid #E8D6BF;

border-radius:18px;

padding:28px;

transition:.25s;

box-shadow:0 8px 25px rgba(92,55,18,.08);

overflow:hidden;

min-height:320px;

}

.sb-card:hover{

transform:translateY(-4px);

box-shadow:0 15px 35px rgba(92,55,18,.15);

border-color:#D7B67A;

}

.sb-card-ornament{

position:absolute;

top:18px;

right:18px;

font-size:22px;

opacity:.05;

color:#7A4A22;

}

.sb-card-header{

    display:flex;

    align-items:center;

    gap:15px;

    margin-bottom:20px;

}

.sb-type-icon{

    font-size:34px;

}

.sb-card-title{

font-size:22px;

font-weight:700;

line-height:1.35;

color:#3E2413;

margin:0 0 18px;

display:-webkit-box;

-webkit-line-clamp:2;

-webkit-box-orient:vertical;

overflow:hidden;

min-height:60px;

}

.sb-chip{

    display:inline-flex;

    align-items:center;

    gap:8px;

    background:#FFF4E8;

    border-radius:50px;

    padding:8px 16px;

    font-size:14px;

    margin-bottom:15px;

}

.sb-chip-type{

display:inline-flex;

align-items:center;

gap:6px;

padding:8px 14px;

border-radius:999px;

background:#F6EBD8;

color:#5C3712;

font-size:13px;

font-weight:600;

}

.sb-meta{

    margin:8px 0;

    font-size:15px;

}

.sb-card-meta{

display:flex;

justify-content:space-between;

align-items:center;

gap:10px;

margin-bottom:18px;

flex-wrap:wrap;

}

.sb-status{

padding:8px 16px;

border-radius:30px;

font-size:13px;

font-weight:600;

background:#FFF5D6;

color:#8A5A00;

}

.sb-card-date{

display:flex;

align-items:center;

gap:8px;

margin:18px 0;

font-size:14px;

color:#675544;

}

.sb-card-date strong{

color:#3D2415;

}

.sb-card-date span{

font-weight:500;

}

.sb-card-files{

margin-bottom:20px;

font-size:14px;

color:#7A5B39;

}

.sb-card-actions{

display:grid;

grid-template-columns:1fr;

gap:10px;

margin-top:auto;

}

.sb-card-footer{

    display:flex;

    gap:10px;

    margin-top:20px;

    flex-wrap:wrap;

}

.sb-btn{

display:flex;

justify-content:center;

align-items:center;

height:42px;

border-radius:10px;

font-size:14px;

font-weight:600;

text-decoration:none;

border:none;

cursor:pointer;

transition:.25s;

}

.sb-btn:hover{

transform:translateY(-2px);

}

.sb-badge{

display:inline-flex;

align-items:center;

padding:8px 14px;

border-radius:999px;

font-size:13px;

font-weight:600;

}

.sb-view{

background:#8A4B08;

color:#fff;

}

/* ==========================================================
   JOURNEY BUTTON
   ========================================================== */

.sb-journey-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;

    width:100%;
    height:54px;

    background:#F8F2EA;
    border:2px solid #D9B37B;
    border-radius:14px;

    color:#8B4A00 !important;
    fill:#8B4A00;

    text-decoration:none !important;

    font-size:18px;
    font-weight:600;

    cursor:pointer;

    transform:translateY(0);

    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

/* Keep Journey text consistently visible */
.sb-journey-btn,
.sb-journey-btn:link,
.sb-journey-btn:visited,
.sb-journey-btn:focus,
.sb-journey-btn:active{
    color:#8B4A00 !important;
    fill:#8B4A00;
    text-decoration:none !important;
}

/* Stable hover state */
.sb-journey-btn:hover{
    background:#FFF7EE !important;
    border-color:#C99A5B !important;
    color:#8B4A00 !important;
    fill:#8B4A00;

    transform:translateY(-2px);

    box-shadow:0 8px 18px rgba(83,34,14,.12);
}

/* Prevent generic button hover rules from changing the text */
.sb-card-actions .sb-journey-btn:hover,
.sb-card .sb-journey-btn:hover{
    color:#8B4A00 !important;
    background:#FFF7EE !important;
    border-color:#C99A5B !important;
}

/* Keep the emoji/icon visible */
.sb-journey-btn::first-letter{
    opacity:1 !important;
}


.sb-download{

background:#EFE6D7;

color:#5C3712;

}



.sb-preview-panel{

display:none;

margin-top:-15px;

margin-bottom:25px;

background:#fff;

border:1px solid #e4d8c8;

border-radius:0 0 18px 18px;

padding:25px;

box-shadow:0 10px 30px rgba(0,0,0,.06);

}

.sb-preview-content{

line-height:1.8;

}

.sb-preview-content hr{

margin:25px 0;

}

.sb-badge.pending{
background:#FFF5D6;
color:#8A5A00;
}

.sb-badge.committee{
background:#EAF2FF;
color:#1F5FBF;
}

.sb-badge.teacher{
background:#F4E9FF;
color:#6D28D9;
}

.sb-badge.principal{
background:#E8FAF7;
color:#0F766E;
}

.sb-badge.published{
background:#EAF8EE;
color:#166534;
}

.sb-badge.revision{
background:#FDECEC;
color:#B42318;
}

/* ==========================================
   GLOBAL MODAL
==========================================*/

.sb-modal{

display:none;

position:fixed;

top:0;

left:0;

width:100%;

height:100%;

z-index:99999;

}

.sb-modal.active{

display:block;

}

.sb-modal-overlay{

position:absolute;

width:100%;

height:100%;

background:rgba(0,0,0,.55);

backdrop-filter:blur(3px);

}



.sb-modal-close{

position:absolute;

top:18px;

right:18px;

width:42px;

height:42px;

border:none;

border-radius:50%;

background:#A75500;

color:#fff;

font-size:24px;

cursor:pointer;

}



/* ===========================================
   MANUSCRIPT READER
=========================================== */

.sb-modal-window{

    position:absolute;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%);

    width:min(760px,92vw);

    height:90vh;

    background:#fffdf8;

    border-radius:22px;

    box-shadow:0 20px 70px rgba(0,0,0,.30);

    display:flex;

    flex-direction:column;

    overflow:hidden;

    transition:width .25s ease;

}


/*====================================================
Modal Variants
====================================================*/

.sb-modal-window.reader{

    width:min(760px,92vw);

}

.sb-modal-window.timeline{

    width:min(900px,94vw);

}

.sb-modal-window.editorial{

    width:min(1180px,96vw);

}

/*==================================================
  MODAL TYPES
==================================================*/

.sb-modal-window.reader{

    width:min(1100px,92vw);

}

.sb-modal-window.timeline{

    width:min(760px,92vw);

}

.sb-modal-body{

    flex:1;

    display:flex;

    flex-direction:column;

    min-height:0;

    overflow:hidden;

}

.sb-loading{

    flex:1;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:18px;

    color:#7A4A22;

}

.sb-loading-icon{

    font-size:42px;

}

.sb-loading-text{

    font-size:20px;

}

.sb-work-popup{

    display:flex;

    flex-direction:column;

    flex:1;

    min-height:0;

    width:100%;

}











/*==========================================
MANUSCRIPT READER
==========================================*/

.sb-work-header{

padding:35px 45px 20px;

border-bottom:1px solid #EFE6DA;

background:#FFFDF8;

}

.sb-work-title{

margin:0 0 18px;

font-size:34px;

line-height:1.25;

color:#3A2412;

}

.sb-work-meta{

display:flex;

gap:12px;

flex-wrap:wrap;

}

.sb-work-content{

    flex:1;

    overflow-y:auto;

    overflow-x:hidden;

    padding:35px 60px;

    font-family:Georgia,"Book Antiqua",serif;

    font-size:20px;

    line-height:1.9;

    color:#3E3329;

    width:100%;

    max-width:760px;

    margin:0 auto;

    box-sizing:border-box;

}

.sb-work-footer{

display:flex;

justify-content:flex-end;

gap:12px;

padding:18px 35px;

border-top:1px solid #EFE6DA;

background:#FFF8EF;

position:sticky;

bottom:0;

}

.sb-print{

background:#5A7B99;

color:#fff;

}

.sb-close-modal{

background:#777;

color:#fff;

}

/*==================================================
  JOURNEY TIMELINE
==================================================*/

.sb-journey-container{

    padding:40px 50px;

    max-width:760px;

    margin:0 auto;

}

.sb-journey-header{

    margin-bottom:40px;

    border-bottom:1px solid #eee3d3;

    padding-bottom:25px;

}

.sb-journey-header h2{

    margin:0;

    font-size:34px;

    color:#2F241B;

    font-weight:700;

}

.sb-journey-header p{

    margin:10px 0 0;

    color:#7b6048;

    font-size:17px;

}

.sb-journey-timeline{

    position:relative;

    margin-left:18px;

    padding-left:38px;

    border-left:3px solid #E6D6C2;

}

.sb-stage{

    position:relative;

    padding-bottom:38px;

}

.sb-stage:last-child{

    padding-bottom:0;

}

.sb-stage-marker{

    position:absolute;

    left:-52px;

    top:2px;

    width:28px;

    height:28px;

    border-radius:50%;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:15px;

    font-weight:700;

    background:#ffffff;

    border:3px solid #d7c2aa;

}

.sb-stage.completed .sb-stage-marker{

    background:#2E8B57;

    border-color:#2E8B57;

    color:#fff;

}

.sb-stage.active .sb-stage-marker{

    background:#B56600;

    border-color:#B56600;

    color:#fff;

}

.sb-stage.pending .sb-stage-marker{

    background:#fff;

    color:#b8b8b8;

}

.sb-stage-title{

    font-size:20px;

    font-weight:700;

    color:#2F241B;

}

.sb-stage-subtitle{

    margin-top:6px;

    color:#7b6048;

    font-size:15px;

    line-height:1.6;

}

/*==================================================
EDITORIAL STUDIO
==================================================*/

.sb-review-heading{

    margin:0 0 30px;

    font-size:34px;

    color:#2F241B;

}

.sb-review-grid{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(360px,1fr));

    gap:28px;

}

.sb-review-card{

    background:#fff;

    border:1px solid #eadfcf;

    border-radius:18px;

    padding:18px 22px;

    transition:.25s;

    box-shadow:0 6px 18px rgba(0,0,0,.06);

}

.sb-review-card:hover{

    transform:translateY(-5px);

}

.sb-review-top{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:20px;

    margin-bottom:12px;

}

.sb-review-title{

    margin:0;

    font-size:24px;

    line-height:1.35;

    font-weight:700;

}

.sb-review-badge{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:8px 14px;

    border-radius:999px;

    font-size:13px;

    font-weight:600;

    white-space:nowrap;

}

.sb-review-badge.committee{

    background:#FFF2DB;

    color:#9C640C;

}

.sb-review-meta{

    display:flex;

    gap:30px;

    margin:10px 0;

    color:#6f5d4c;

    font-size:15px;

}

.sb-review-date{

    margin:12px 0 18px;

    color:#6f5d4c;

    font-size:15px;

}

.sb-review-actions{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:10px;

}

.sb-review-actions .sb-btn{

    width:100%;

    padding:10px 0;

    font-size:14px;

}

.sb-review-card:hover{

    transform:translateY(-3px);

    box-shadow:0 12px 28px rgba(0,0,0,.08);

}

.sb-review-grid{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(420px,1fr));

    gap:20px;

}

/*==================================================
EDITORIAL BUTTONS
==================================================*/

.sb-review-read{

    background:#A75500;

    color:#fff;

}

.sb-review-approve{

    background:#2E8B57;

    color:#fff;

}

.sb-review-revision{

    background:#D97706;

    color:#fff;

}

.sb-review-read:hover{

    background:#8D4700;

}

.sb-review-approve:hover{

    background:#256F46;

}

.sb-review-revision:hover{

    background:#B45F06;

}

/*==================================================
EDITORIAL TOOLBAR
==================================================*/

.sb-editor-toolbar{

    display:flex;

    justify-content:space-between;

    align-items:flex-end;

    gap:35px;

    margin:35px 0;

    flex-wrap:wrap;

}

.sb-editor-stats{

    display:flex;

    gap:18px;

}

.sb-stat-card{

    background:#fff;

    border:1px solid #EADFCF;

    border-radius:18px;

    min-width:150px;

    padding:18px;

    text-align:center;

    box-shadow:0 5px 18px rgba(0,0,0,.05);

}

.sb-stat-value{

    font-size:34px;

    font-weight:700;

    color:#A75500;

}

.sb-stat-title{

    margin-top:8px;

    color:#6F5D4C;

}

.sb-editor-search{

    display:flex;

    gap:12px;

    flex-wrap:wrap;

}

.sb-review-search{

    width:320px;

    padding:12px 16px;

    border-radius:12px;

    border:1px solid #D8C8B3;

}

.sb-review-filter,

.sb-review-sort{

    padding:12px 16px;

    border-radius:12px;

    border:1px solid #D8C8B3;

    background:#fff;

}

/*==================================================
EDITORIAL REVIEW FORM
==================================================*/

.sb-review-form{

    max-width:760px;

    margin:0 auto;

    padding:40px;

}

.sb-review-form h3{

    margin:0 0 30px;

    font-size:32px;

    color:#2F241B;

}

.sb-review-field{

    margin-bottom:30px;

}

.sb-review-field label{

    display:block;

    margin-bottom:10px;

    font-weight:600;

}

.sb-review-field textarea{

    width:100%;

    min-height:180px;

    padding:18px;

    border:1px solid #D9CBB8;

    border-radius:14px;

    resize:vertical;

    font-size:16px;

    font-family:inherit;

}

.sb-review-form .sb-review-actions{

    display:flex;

    gap:15px;

}

/*======================================
Editorial Workspace Button
======================================*/

.sb-review-footer{

    margin-top:22px;

}

.sb-review-workspace-btn{

    display:block;

    width:100%;

    text-align:center;

    padding:14px;

    background:#53220e;

    color:#fff;

    border-radius:12px;

    text-decoration:none;

    font-size:16px;

    font-weight:700;

    transition:.25s;

}

.sb-review-workspace-btn:hover{

    background:#af7d2b;

    color:#fff;

    transform:translateY(-2px);

}