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

html,
body{
overflow-x:clip;
background:#081223;
font-family:Arial;
}

/*
=====================================================
TOP BAR
=====================================================
*/

.top{
background:#0f172a;
padding:12px;
display:flex;
gap:10px;
align-items:center;
position:fixed;
top:0;
left:0;
right:0;
width:100%;
z-index:9999;
flex-wrap:wrap;
box-shadow:0 2px 12px rgba(0,0,0,.6);
}

/* Push content below fixed header — height set dynamically by JS */
.header-spacer{
display:block;
}

.top input,
.top select{
padding:10px;
border:none;
outline:none;
font-size:14px;
border-radius:3px;
}

#search{
flex:1;
min-width:120px;
}

#sort{
width:130px;
}

.top-row{
display:flex;
gap:10px;
align-items:center;
width:100%;
}

.top-meta{
display:flex;
gap:10px;
align-items:center;
margin-left:auto;
flex-shrink:0;
}

.logout{
background:#dc2626;
color:#fff;
border:none;
padding:10px 15px;
cursor:pointer;
font-weight:bold;
border-radius:3px;
white-space:nowrap;
}

.adminbtn{
background:#2563eb;
color:#fff;
border:none;
padding:10px 15px;
cursor:pointer;
font-weight:bold;
border-radius:3px;
white-space:nowrap;
}

/*
=====================================================
WRAPPER
=====================================================
*/

.wrap{
padding:15px;
}

/*
=====================================================
CARD
=====================================================
*/

.card{
background:#162033;
border:1px solid #1e3a5f;
border-bottom:6px solid #2563eb;
margin-bottom:28px;
border-radius:8px;
overflow:hidden;
scroll-margin-top:110px;
}

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

.head{
display:flex;
align-items:center;
min-height:55px;
gap:0;
touch-action:manipulation;
cursor:pointer;
}

.pid{
width:90px;
min-width:90px;
height:55px;
display:flex;
align-items:center;
justify-content:center;
background:#1d4ed8;
color:#fff;
font-weight:bold;
font-size:15px;
letter-spacing:.5px;
}

.title{
flex:0 1 38%;
max-width:38%;
min-width:160px;
padding:8px 12px;
color:#e2e8f0;
font-size:12.5px;
font-weight:500;
line-height:1.45;
word-break:break-word;
}

.card-meta{
display:flex;
flex-direction:row;
align-items:center;
gap:6px;
padding:0 6px;
flex:1;
flex-shrink:0;
flex-wrap:wrap;
justify-content:flex-end;
}

.card-meta.admin-meta{
flex-wrap:nowrap;
}

.status{
padding:6px 12px;
color:#fff;
font-size:11px;
font-weight:bold;
width:112px;
text-align:center;
border-radius:4px;
margin:0;
letter-spacing:.5px;
}

.Pending{
background:#0369a1;
}

.Generated{
background:#b91c1c;
}

.Approved,
.Updated{
background:#15803d;
}

.Working{
background:#ea580c;
}

.Paused{
background:#b45309;
}

.WorkDone{
background:#16a34a;
}

.Published{
background:#1d4ed8;
}

.InfoWork{
background:#c2410c;
}

.ContentPending{
background:#6d28d9;
}

.InQA{
background:#7c3aed;
}

.SEOReview{
background:#0891b2;
}

.Hold{
background:#92400e;
}

.Changes{
background:#d97706 !important;
}

.ChangesInContent{
background:#db2777 !important;
}

.Changing{
background:#ea580c !important;
}

.Republish{
background:#0d9488;
}

/*
=====================================================
URGENT
=====================================================
*/

@keyframes urgentBlink{
0%,100%{ border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.35); }
50%{     border-color:transparent; box-shadow:0 0 0 3px rgba(239,68,68,0); }
}

.card.urgent-card{
border:2px solid #ef4444;
animation:urgentBlink 1.2s ease-in-out infinite;
}

.pid.urgent-pid{
background:#ef4444 !important;
}

.urgent-badge{
display:inline-flex;
align-items:center;
gap:4px;
background:#ef4444;
color:#fff;
font-size:10px;
font-weight:bold;
padding:3px 8px;
border-radius:3px;
letter-spacing:.5px;
white-space:nowrap;
}

.toggle{
width:50px;
min-width:50px;
height:55px;
background:#0f2744;
border:none;
border-left:1px solid #1e3a5f;
color:#94a3b8;
font-size:16px;
cursor:pointer;
}

/*
=====================================================
INLINE ASSIGN
=====================================================
*/

.inline-assign-sel{
padding:4px 6px;
font-size:11px;
border-radius:4px;
border:1px solid #334155;
background:#0f2744;
color:#e2e8f0;
outline:none;
cursor:pointer;
width:132px;
flex-shrink:0;
}

.inline-assign-btn{
border:none;
padding:5px 12px;
border-radius:4px;
font-size:11px;
font-weight:bold;
cursor:pointer;
flex-shrink:0;
white-space:nowrap;
background:#2563eb;
color:#fff;
transition:background .2s;
width:134px;
}

.inline-assign-btn.assigned{
background:#16a34a !important;
color:#fff;
}

/*
=====================================================
BODY
=====================================================
*/

.body{
display:none;
flex-direction:column;
padding:15px;
background:#0d1f36;
border-top:1px solid #1e3a5f;
}

.body.open{
display:flex;
}

/*
=====================================================
BUTTONS
=====================================================
*/

.actions{
display:flex;
gap:10px;
margin-top:14px;
flex-wrap:wrap;
}

.qa-submit-box{
display:grid;
grid-template-columns:110px 1fr 140px;
gap:10px;
align-items:stretch;
margin-top:14px;
}

.qa-labels{
display:grid;
grid-template-rows:1fr 1fr;
gap:12px;
color:#e2e8f0;
font-size:18px;
align-items:center;
}

.qa-fields{
display:grid;
grid-template-rows:1fr 1fr;
gap:12px;
}

.qa-fields input{
width:100%;
border:none;
outline:none;
padding:12px;
font-size:14px;
background:#fff;
color:#111827;
}

.qa-submit-btn{
border:none;
background:#00a84f;
color:#07111f;
font-size:18px;
font-weight:bold;
cursor:pointer;
}

.qa-links-box{
display:flex;
gap:10px;
flex-wrap:wrap;
margin-top:14px;
}

.qa-links-box a{
display:inline-flex;
align-items:center;
justify-content:center;
min-height:38px;
padding:8px 14px;
border-radius:5px;
background:#0f2744;
border:1px solid #2563eb;
color:#e2e8f0;
font-size:13px;
font-weight:bold;
text-decoration:none;
}

.qa-done-note{
margin-top:12px;
color:#86efac;
font-size:13px;
font-weight:bold;
}

.pager{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
padding:10px 0 20px;
color:#e2e8f0;
font-size:13px;
}

.pager button{
border:none;
border-radius:5px;
padding:10px 16px;
background:#2563eb;
color:#fff;
font-weight:bold;
cursor:pointer;
}

.pager button:disabled{
opacity:.45;
cursor:not-allowed;
}

.actionbtn{
padding:11px 20px;
border:none;
font-weight:bold;
cursor:pointer;
border-radius:5px;
font-size:13px;
letter-spacing:.5px;
transition:opacity .15s;
}

.btn1{
background:#0ea5e9;
color:#fff;
}

.btn2{
background:#22c55e;
color:#fff;
}

.btn3{
background:#dc2626;
color:#fff;
}

.btn-writer-save{
background:#f59e0b;
color:#fff;
}

button:disabled{
opacity:.4;
cursor:not-allowed;
}

/*
=====================================================
EDITOR
=====================================================
*/

.editor{
background:#fff;
padding:20px;
min-height:300px;
line-height:1.8;
outline:none;
color:#1e293b;
white-space:pre-wrap;
overflow:auto;
word-break:break-word;
font-size:14px;
border-radius:6px;
border:2px solid transparent;
transition:border-color .2s;
}

.editor[contenteditable="true"]:focus{
border-color:#2563eb;
box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.locked{
background:#f8fafc;
color:#475569;
border-color:#e2e8f0;
}

/*
=====================================================
DIFF
=====================================================
*/

.diff-bar{
display:none;
align-items:center;
justify-content:space-between;
flex-wrap:wrap;
gap:8px;
margin-top:10px;
padding:8px 12px;
background:#0a1628;
border:1px solid #1e3a5f;
border-radius:6px;
}

.diff-legend{
font-size:12px;
color:#94a3b8;
font-weight:600;
}

.diff-legend-add{
color:#4ade80;
}

.diff-legend-del{
color:#f87171;
}

.btn-revert{
background:#334155;
color:#e2e8f0;
border:1px solid #475569;
padding:5px 12px;
border-radius:5px;
font-size:12px;
font-weight:bold;
cursor:pointer;
white-space:nowrap;
}

.btn-revert:hover{
background:#475569;
color:#fff;
}

.diff-preview{
margin-top:8px;
background:#0a1628;
border:1px solid #1e3a5f;
border-radius:6px;
padding:16px 20px;
font-size:14px;
line-height:1.9;
color:#cbd5e1;
white-space:pre-wrap;
word-break:break-word;
}

.diff-add{
outline:2px solid #22c55e;
background:rgba(34,197,94,.12);
border-radius:2px;
padding:0 2px;
}

.diff-del{
text-decoration:underline;
text-decoration-color:#ef4444;
text-decoration-thickness:2px;
color:#f87171;
background:rgba(239,68,68,.10);
border-radius:2px;
padding:0 2px;
}

/*
=====================================================
WORKER STATUS BAR
=====================================================
*/

.worker-status-bar{
padding:12px 16px;
border-radius:6px;
font-size:14px;
font-weight:600;
margin-bottom:12px;
text-align:center;
}

.worker-ready{
background:rgba(34,197,94,.15);
border:1px solid #22c55e;
color:#4ade80;
}

.worker-pending{
background:rgba(251,191,36,.10);
border:1px solid #f59e0b;
color:#fbbf24;
}

.worker-paused{
background:rgba(180,83,9,.15);
border:1px solid #b45309;
color:#fbbf24;
}

/*
=====================================================
WORK TIME BADGE (worker view)
=====================================================
*/

.work-time-badge{
display:inline-flex;
align-items:center;
gap:6px;
background:#0f2744;
border:1px solid #1e3a5f;
color:#94a3b8;
font-size:12px;
font-weight:600;
padding:6px 12px;
border-radius:5px;
margin-bottom:12px;
}

.work-time-badge span{
color:#e2e8f0;
}

/*
=====================================================
USER BOX
=====================================================
*/

.tab-btn{
border-bottom:3px solid transparent !important;
transition:border-color 0.15s, opacity 0.15s;
opacity:0.75;
}
.tab-btn.active{
border-bottom:3px solid #60a5fa !important;
opacity:1 !important;
}
.tab-btn:hover:not(.active){ opacity:0.9; }
.userbox{
background:#162033;
padding:20px;
margin:20px;
border-radius:10px;
display:none;
}

.userbox h2{
color:#fff;
margin-bottom:15px;
}

.userbox input,
.userbox select{
width:100%;
padding:10px;
margin-bottom:10px;
border:none;
outline:none;
}

.userbox button{
padding:10px 15px;
background:#2563eb;
border:none;
color:#fff;
cursor:pointer;
}

/*
=====================================================
ADMIN PANEL
=====================================================
*/

.admin-cols{
display:grid;
grid-template-columns:minmax(320px,1fr) minmax(420px,480px);
gap:30px;
align-items:flex-start;
}

.admin-col-left{
min-width:0;
}

.admin-col-right{
min-width:0;
overflow:hidden;
}

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

table{
width:100%;
border-collapse:collapse;
margin-top:20px;
table-layout:fixed;
}

table th,
table td{
padding:10px 12px;
border-bottom:1px solid #334155;
color:#fff;
text-align:left;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
vertical-align:middle;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1){
width:40%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2){
width:34%;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3){
width:96px;
text-align:right;
overflow:visible;
}

.users-table button{
width:auto;
min-width:64px;
padding:8px 10px;
font-size:12px;
border-radius:4px;
}

/*
=====================================================
INVOICE / PAYROLL PANELS
=====================================================
*/

.inv-panel{
background:#162033;
padding:24px;
margin:16px;
border-radius:10px;
display:none;
}

.inv-panel h2{
color:#fff;
margin-bottom:16px;
font-size:18px;
}

.inv-panel h3{
color:#94a3b8;
font-size:14px;
margin-bottom:12px;
margin-top:20px;
border-top:1px solid #1e3a5f;
padding-top:14px;
}

.inv-section{
background:#0d1f36;
border:1px solid #1e3a5f;
border-radius:8px;
padding:18px;
margin-bottom:18px;
}

.inv-row{
display:flex;
gap:10px;
align-items:center;
flex-wrap:wrap;
margin-bottom:10px;
}

.inv-row label{
color:#94a3b8;
font-size:13px;
min-width:80px;
}

.inv-input{
padding:8px 12px;
background:#0a1628;
border:1px solid #334155;
border-radius:5px;
color:#e2e8f0;
font-size:13px;
outline:none;
}

.inv-select{
padding:8px 12px;
background:#0a1628;
border:1px solid #334155;
border-radius:5px;
color:#e2e8f0;
font-size:13px;
outline:none;
min-width:160px;
}

.inv-btn{
padding:9px 18px;
border:none;
border-radius:5px;
font-size:13px;
font-weight:bold;
cursor:pointer;
white-space:nowrap;
}

.inv-btn-blue{ background:#2563eb; color:#fff; }
.inv-btn-green{ background:#16a34a; color:#fff; }
.inv-btn-red{ background:#dc2626; color:#fff; }
.inv-btn-gray{ background:#475569; color:#fff; }

.inv-table{
width:100%;
border-collapse:collapse;
margin-top:10px;
font-size:13px;
}

.inv-table th{
background:#0a1628;
color:#94a3b8;
padding:8px 10px;
text-align:left;
border-bottom:1px solid #1e3a5f;
font-weight:600;
}

.inv-table td{
padding:8px 10px;
color:#e2e8f0;
border-bottom:1px solid #1e3a5f;
vertical-align:middle;
}

.inv-table tr:last-child td{
border-bottom:none;
}

.inv-product-list{
overflow-y:visible;
}
.inv-filter-bar{
display:flex;
align-items:center;
gap:12px;
margin-bottom:10px;
flex-wrap:wrap;
}
#inv-table-wrap{
max-height:320px;
overflow-y:auto;
border:1px solid #1e3a5f;
border-radius:6px;
}

.inv-product-row{
display:flex;
align-items:center;
gap:10px;
padding:8px 0;
border-bottom:1px solid #1e3a5f;
}

.inv-product-row:last-child{
border-bottom:none;
}

.inv-product-row input[type="checkbox"]{
width:16px;
height:16px;
cursor:pointer;
flex-shrink:0;
}

.inv-product-label{
flex:1;
color:#e2e8f0;
font-size:12px;
line-height:1.4;
}

.inv-price-input{
width:100px;
padding:5px 8px;
background:#0a1628;
border:1px solid #334155;
border-radius:4px;
color:#e2e8f0;
font-size:12px;
outline:none;
text-align:right;
}

.inv-status-badge{
display:inline-block;
padding:3px 10px;
border-radius:12px;
font-size:11px;
font-weight:bold;
}

.inv-status-pending{ background:#92400e; color:#fde68a; }
.inv-status-paid{ background:#14532d; color:#86efac; }
.inv-status-generated{ background:#1e3a5f; color:#93c5fd; }

.inv-detail-box{
background:#0a1628;
border:1px solid #2563eb;
border-radius:8px;
padding:18px;
margin-top:14px;
display:none;
}

.inv-detail-box.open{ display:block; }

.inv-total-row td{
font-weight:bold;
color:#4ade80;
font-size:14px;
border-top:2px solid #1e3a5f;
}

.inv-badge-invoiced{
display:inline-block;
padding:2px 7px;
border-radius:10px;
font-size:10px;
font-weight:bold;
background:#1e3a5f;
color:#93c5fd;
margin-left:4px;
vertical-align:middle;
}

.inv-badge-paid{
display:inline-block;
padding:2px 7px;
border-radius:10px;
font-size:10px;
font-weight:bold;
background:#14532d;
color:#86efac;
margin-left:4px;
vertical-align:middle;
}

.type-badge-info{
display:inline-block;
padding:2px 7px;
border-radius:10px;
font-size:10px;
font-weight:bold;
background:#7c3aed;
color:#fff;
margin-left:4px;
vertical-align:middle;
}

.type-badge-infographics{
display:inline-block;
padding:2px 7px;
border-radius:10px;
font-size:10px;
font-weight:bold;
background:#d97706;
color:#fff;
margin-left:4px;
vertical-align:middle;
}

.type-badge-aplus{
display:inline-block;
padding:2px 7px;
border-radius:10px;
font-size:10px;
font-weight:bold;
background:#0284c7;
color:#fff;
margin-left:4px;
vertical-align:middle;
}

.product-research-link{
display:inline-flex;
align-items:center;
gap:4px;
padding:2px 8px;
background:#1e3a5f;
color:#93c5fd;
border:1px solid #3b82f6;
border-radius:6px;
font-size:11px;
font-weight:500;
text-decoration:none;
margin-left:8px;
vertical-align:middle;
transition:all 0.2s ease;
}

.product-research-link:hover{
background:#2563eb;
color:#ffffff;
border-color:#60a5fa;
box-shadow:0 0 8px rgba(37, 99, 235, 0.4);
}

/* Invoice preview modal */
.inv-preview-modal{
display:none;
position:fixed;
inset:0;
background:rgba(0,0,0,.7);
z-index:99999;
overflow-y:auto;
padding:30px 16px;
}
.inv-preview-modal.open{ display:flex; justify-content:center; align-items:flex-start; }
.inv-preview-inner{
background:#fff;
color:#111;
border-radius:10px;
padding:36px 40px;
max-width:700px;
width:100%;
font-family:Arial,sans-serif;
position:relative;
}
.inv-preview-close{
position:absolute;
top:12px;right:16px;
background:none;border:none;font-size:22px;cursor:pointer;color:#64748b;
}
.inv-preview-header{
display:flex;justify-content:space-between;align-items:flex-start;
margin-bottom:28px;border-bottom:2px solid #e2e8f0;padding-bottom:20px;
}
.inv-preview-company{
font-size:22px;font-weight:bold;color:#0f172a;
}
.inv-preview-meta{
text-align:right;font-size:13px;color:#475569;line-height:1.8;
}
.inv-preview-meta strong{ color:#0f172a; }
.inv-preview-to{
margin-bottom:20px;font-size:13px;
}
.inv-preview-to strong{ font-size:14px;color:#0f172a; }
.inv-preview-table{
width:100%;border-collapse:collapse;margin-bottom:0;font-size:13px;
}
.inv-preview-table th{
background:#f1f5f9;color:#475569;padding:9px 12px;
text-align:left;border-bottom:2px solid #e2e8f0;
}
.inv-preview-table td{
padding:9px 12px;border-bottom:1px solid #f1f5f9;color:#111;
}
.inv-preview-total-row td{
font-weight:bold;font-size:14px;background:#f8fafc;border-top:2px solid #e2e8f0;
}
.inv-preview-notes{
margin-top:18px;padding:12px;background:#f8fafc;border-radius:6px;
font-size:12px;color:#475569;
}
.inv-preview-footer{
margin-top:24px;text-align:center;font-size:11px;color:#94a3b8;border-top:1px solid #e2e8f0;padding-top:14px;
}

.rate-input{
width:90px;
padding:5px 8px;
background:#0a1628;
border:1px solid #334155;
border-radius:4px;
color:#e2e8f0;
font-size:13px;
outline:none;
text-align:right;
}

/*
=====================================================
TABLET
=====================================================
*/

@media(max-width:768px){

.top{
align-items:stretch;
padding:10px;
}

.top select{
width:130px;
height:40px;
font-size:13px;
}

#search{
flex:1;
height:40px;
font-size:13px;
min-width:0;
}

.logout,
.adminbtn{
height:40px;
padding:0 12px;
font-size:13px;
}

.wrap{
padding:10px;
}

.head{
min-height:52px;
}

.pid{
width:72px;
min-width:72px;
min-height:52px;
font-size:14px;
}

.title{
font-size:12px;
padding:9px 10px;
line-height:1.5;
flex:0 1 36%;
max-width:36%;
}

.status{
width:88px;
padding:8px;
font-size:11px;
}

.card-meta{
gap:5px;
padding:0 5px;
}

.card-meta.admin-meta{
flex-wrap:nowrap;
}

.inline-assign-sel{
width:112px;
}

.inline-assign-btn{
width:110px;
}

.top-meta{
flex-wrap:wrap;
}

.toggle{
width:46px;
min-width:46px;
min-height:52px;
font-size:14px;
}

.body{
padding:12px;
}

.actions{
gap:8px;
margin-top:12px;
margin-bottom:0;
order:2;
}

.actionbtn{
flex:1;
font-size:13px;
padding:12px 10px;
}

.qa-submit-box{
grid-template-columns:90px 1fr 120px;
}

.qa-labels{
font-size:16px;
}

.editor{
min-height:240px;
padding:15px;
font-size:15px;
line-height:1.9;
order:1;
}

.userbox{
margin:10px;
padding:15px;
}

.admin-cols{
grid-template-columns:1fr;
gap:20px;
}

.admin-col-right{
min-width:0;
width:100%;
overflow-x:auto;
}

}

/*
=====================================================
MOBILE
=====================================================
*/

@media(max-width:480px){

.top{
padding:8px;
gap:6px;
}

.top select{
width:100px;
height:36px;
font-size:12px;
padding:6px 6px;
}

#search{
flex:1;
height:36px;
font-size:12px;
padding:6px 8px;
min-width:80px;
}

.logout,
.adminbtn{
height:36px;
font-size:12px;
padding:0 10px;
}

/* Admin top-meta wraps to second row on mobile */
.top-meta{
width:100%;
margin-left:0;
flex-wrap:wrap;
justify-content:flex-end;
gap:6px;
}

.wrap{
padding:6px;
}

.card{
margin-bottom:20px;
border-bottom:6px solid #2563eb;
scroll-margin-top:110px;
}

.head{
min-height:44px;
flex-wrap:wrap;
align-items:stretch;
}

.pid{
order:1;
width:54px;
min-width:54px;
height:auto;
min-height:44px;
font-size:13px;
align-self:stretch;
}

.title{
order:2;
font-size:11.5px;
padding:8px 10px;
line-height:1.5;
}

.toggle{
order:3;
width:40px;
min-width:40px;
height:auto;
min-height:44px;
font-size:13px;
padding:0 8px;
align-self:stretch;
}

/* card-meta: second row on mobile */
.card-meta{
order:4;
width:100%;
display:flex !important;
flex-direction:row;
flex-wrap:wrap;
gap:6px;
padding:6px 8px 8px;
border-top:1px solid #1e3a5f;
align-items:center;
}

.card-meta.admin-meta{
display:flex !important;
}

.status{
width:auto !important;
flex-shrink:0;
padding:5px 12px;
font-size:10px;
border-radius:4px;
margin:0;
}

.inline-assign-sel{
flex:1;
min-width:0;
max-width:160px;
font-size:10px;
padding:4px 6px;
}

.inline-assign-btn{
flex-shrink:0;
width:auto;
font-size:10px;
padding:5px 10px;
}

.body{
padding:10px 8px;
display:flex;
flex-direction:column;
}

.assign-row{
padding:6px 8px;
gap:6px;
}

.assign-row select{
font-size:11px;
padding:5px 7px;
}

.btn-assign{
font-size:11px;
padding:6px 10px;
}

.inline-assign-sel{
width:84px;
font-size:10px;
padding:3px 4px;
}

.inline-assign-btn{
font-size:10px;
padding:4px 7px;
width:84px;
}

.actions{
gap:8px;
margin-top:12px;
margin-bottom:0;
order:2;
}

.actionbtn{
font-size:13px;
padding:13px 8px;
flex:1;
border-radius:6px;
}

.perform-row,.reset-row{
display:flex;
align-items:center;
gap:6px;
flex-wrap:wrap;
margin-top:4px;
width:100%;
}

.perform-sel{
flex:1;
min-width:0;
background:linear-gradient(135deg,#1c1a2e 0%,#2d1b4e 100%);
color:#e2e8f0;
border:2px solid #f59e0b;
border-radius:8px;
padding:6px 10px;
font-size:12px;
font-weight:600;
cursor:pointer;
outline:none;
box-shadow:0 0 8px rgba(245,158,11,0.25);
}

.perform-sel:focus{
border-color:#fbbf24;
box-shadow:0 0 12px rgba(251,191,36,0.4);
}

.perform-apply-btn{
background:linear-gradient(135deg,#d97706,#ea580c);
color:#fff;
border:none;
border-radius:8px;
padding:6px 14px;
font-size:12px;
font-weight:700;
cursor:pointer;
white-space:nowrap;
box-shadow:0 2px 8px rgba(234,88,12,0.4);
transition:opacity 0.15s,transform 0.1s;
}

.perform-apply-btn:hover{
opacity:0.9;
transform:translateY(-1px);
}

.reset-sel{
flex:1;
min-width:0;
background:linear-gradient(135deg,#1a1a2e 0%,#16213e 100%);
color:#e2e8f0;
border:2px solid #6366f1;
border-radius:8px;
padding:6px 10px;
font-size:12px;
font-weight:600;
cursor:pointer;
outline:none;
box-shadow:0 0 8px rgba(99,102,241,0.25);
}

.reset-sel:focus{
border-color:#818cf8;
box-shadow:0 0 12px rgba(129,140,248,0.4);
}

.reset-apply-btn{
background:linear-gradient(135deg,#4f46e5,#7c3aed);
color:#fff;
border:none;
border-radius:8px;
padding:6px 14px;
font-size:12px;
font-weight:700;
cursor:pointer;
white-space:nowrap;
box-shadow:0 2px 8px rgba(124,58,237,0.4);
transition:opacity 0.15s,transform 0.1s;
}

.reset-apply-btn:hover{
opacity:0.9;
transform:translateY(-1px);
}

.qa-submit-box{
grid-template-columns:1fr;
gap:8px;
}

.qa-labels{
display:none;
}

.qa-fields input{
height:42px;
}

.qa-submit-btn{
height:50px;
}

.editor{
min-height:calc(100dvh - 250px);
height:calc(100dvh - 250px);
font-size:16px;
padding:14px;
line-height:2;
order:1;
overflow-y:auto;
}

.card{
scroll-margin-top:110px;
}

.diff-label{
order:3;
font-size:12px;
margin-top:10px;
}

.diff-preview{
order:4;
font-size:14px;
line-height:1.9;
}

.userbox{
margin:6px;
padding:12px;
}

.userbox h2{
font-size:18px;
}

table th,
table td{
font-size:12px;
padding:8px;
}

}

/* ──────────────────────────────────────────────────
   STITCH MOBILE UI DESIGN SYSTEM OVERRIDES (<= 640px)
   ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* ── Body ── */
    body {
        background: #0b1326 !important;
        font-family: 'Geist', sans-serif !important;
    }

    /* ── Topbar / Header ── */
    #topbar {
        background: rgba(11, 19, 38, 0.85) !important;
        border-bottom: 1px solid #424754 !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        height: 48px !important;
        padding: 0 16px !important;
        box-shadow: none !important;
    }
    #header-spacer {
        height: 48px !important;
    }
    
    #topbar .nav-left {
        gap: 0 !important;
    }
    #topbar .nav-left .tab-btn {
        display: none !important; /* Hide tabs in topbar on mobile */
    }
    
    #topbar .nav-logo-container {
        border-right: none !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
    
    #topbar .nav-logo {
        font-family: 'Geist', sans-serif !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        letter-spacing: -0.02em !important;
    }
    
    #topbar .nav-user,
    #topbar #theme-toggle-btn {
        display: none !important; /* Hide username and theme toggle from header on mobile */
    }
    
    #topbar .nav-logout {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        color: #adc6ff !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    #topbar .nav-logout .logout-text {
        display: none !important;
    }
    #topbar .nav-logout .logout-icon {
        display: inline-block !important;
        font-size: 22px !important;
    }

    /* ── Filter Bar ── */
    .filter-bar {
        background: #0b1326 !important;
        border-bottom: 1px solid #424754 !important;
        padding: 12px 16px !important;
        top: 48px !important;
        gap: 8px !important;
    }
    
    .filter-input,
    .filter-select {
        background: #171f33 !important;
        border: 1px solid #424754 !important;
        border-radius: 8px !important;
        color: #dae2fd !important;
        font-family: 'Geist', sans-serif !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
        height: 38px !important;
    }
    
    #search {
        height: 38px !important;
    }
    
    /* Mobile scrolling pills */
    #mobile-filter-pills {
        margin-top: 4px;
        padding-bottom: 4px;
    }
    .no-scrollbar::-webkit-scrollbar {
        display: none !important;
    }
    .no-scrollbar {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    /* ── Task Cards ── */
    .card {
        background: #171f33 !important;
        border: 1px solid #424754 !important;
        border-radius: 12px !important;
        margin: 0 12px 12px 12px !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15) !important;
        border-bottom: 1px solid #424754 !important; /* Remove solid bottom border */
        overflow: hidden !important;
    }
    
    .card.urgent-card {
        border: 1px solid #ffb4ab !important;
        box-shadow: 0 0 12px rgba(255, 180, 171, 0.15) !important;
        animation: none !important; /* Stop aggressive blinking */
    }
    
    .head {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px !important;
        min-height: auto !important;
        background: transparent !important;
    }
    
    .pid {
        order: 1 !important;
        width: 100% !important;
        background: transparent !important;
        color: #c2c6d6 !important;
        font-size: 11px !important;
        font-family: 'JetBrains Mono', monospace !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: auto !important;
        min-height: auto !important;
        padding: 0 0 6px 0 !important;
        border-bottom: 1px solid #2d3449 !important;
        margin-bottom: 8px !important;
        letter-spacing: 0.05em !important;
    }
    .pid div:first-child {
        font-weight: 600 !important;
    }
    /* Move typeBadge inside pid row */
    .pid div:last-child {
        position: static !important;
        width: auto !important;
        display: inline-block !important;
    }
    
    .title {
        order: 2 !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        padding: 0 !important;
        color: #adc6ff !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
        font-family: 'Geist', sans-serif !important;
    }
    
    .card-meta {
        order: 3 !important;
        width: 100% !important;
        border-top: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        margin-top: 4px !important;
    }
    
    .toggle {
        display: none !important; /* Hide the arrow button */
    }

    /* ── Status Badges (Soft Palette) ── */
    .status {
        font-size: 10px !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-weight: 600 !important;
        padding: 3px 10px !important;
        border-radius: 9999px !important; /* Capsule shape */
        width: auto !important;
        min-width: 0 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        margin: 0 !important;
        border: 1px solid transparent !important;
    }
    
    .Pending {
        background: rgba(140, 144, 159, 0.15) !important;
        border-color: #8c909f !important;
        color: #c2c6d6 !important;
    }
    .Generated {
        background: rgba(255, 180, 171, 0.15) !important;
        border-color: #ffb4ab !important;
        color: #ffb4ab !important;
    }
    .Approved, .Updated {
        background: rgba(78, 222, 163, 0.15) !important;
        border-color: #4edea3 !important;
        color: #4edea3 !important;
    }
    .Working, .Changing {
        background: rgba(236, 106, 6, 0.15) !important;
        border-color: #ec6a06 !important;
        color: #ffb690 !important;
    }
    .Paused {
        background: rgba(180, 83, 9, 0.15) !important;
        border-color: #b45309 !important;
        color: #ffb690 !important;
    }
    .WorkDone {
        background: rgba(0, 165, 114, 0.15) !important;
        border-color: #00a572 !important;
        color: #4edea3 !important;
    }
    .Published {
        background: rgba(77, 142, 255, 0.15) !important;
        border-color: #4d8eff !important;
        color: #adc6ff !important;
    }
    .InfoWork {
        background: rgba(194, 65, 12, 0.15) !important;
        border-color: #c2410c !important;
        color: #ffb690 !important;
    }
    .ContentPending {
        background: rgba(109, 40, 217, 0.15) !important;
        border-color: #6d28d9 !important;
        color: #c2c6d6 !important;
    }
    .InQA {
        background: rgba(124, 58, 237, 0.15) !important;
        border-color: #7c3aed !important;
        color: #c2c6d6 !important;
    }
    .SEOReview {
        background: rgba(8, 145, 178, 0.15) !important;
        border-color: #0891b2 !important;
        color: #adc6ff !important;
    }
    .Hold {
        background: rgba(146, 64, 14, 0.15) !important;
        border-color: #92400e !important;
        color: #ffb690 !important;
    }
    .Changes {
        background: rgba(217, 119, 6, 0.15) !important;
        border-color: #d97706 !important;
        color: #ffb690 !important;
    }
    .ChangesInContent {
        background: rgba(219, 39, 119, 0.15) !important;
        border-color: #db2777 !important;
        color: #ffb4ab !important;
    }
    .Republish {
        background: rgba(13, 148, 136, 0.15) !important;
        border-color: #0d9488 !important;
        color: #4edea3 !important;
    }

    /* ── Card Body ── */
    .body {
        background: #131b2e !important;
        border-top: 1px solid #2d3449 !important;
        padding: 16px !important;
    }
    
    /* ── Content Editors ── */
    .editor {
        background: #ffffff !important;
        border: 1px solid #424754 !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        padding: 12px !important;
    }
    
    /* ── Admin Action / Perform Dropdowns ── */
    .inline-assign-sel,
    select[id^="performSel_"],
    select[id^="resetSel_"] {
        background: #171f33 !important;
        border: 1px solid #424754 !important;
        border-radius: 8px !important;
        color: #dae2fd !important;
        font-size: 11px !important;
        height: 34px !important;
        padding: 6px 10px !important;
    }
    
    .inline-assign-btn,
    button[onclick^="applyPerform"],
    button[onclick^="applyReset"] {
        border-radius: 8px !important;
        font-size: 11px !important;
        height: 34px !important;
        padding: 0 14px !important;
    }

    /* Floating action buttons and primary actions */
    .adminbtn, #addProductBtn {
        border-radius: 8px !important;
        font-family: 'Geist', sans-serif !important;
        font-weight: 600 !important;
    }
    
    /* Action Buttons in card body */
    .actionbtn {
        border-radius: 8px !important;
        font-family: 'Geist', sans-serif !important;
        font-weight: 600 !important;
        padding: 10px 14px !important;
    }
}


