.ftds-form{
  background:#fff;
  padding:16px;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.ftds-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
}

.ftds-col{
  display:flex;
  flex-direction:column;
}

.ftds-col.full{
  grid-column:1/-1;
}

.ftds-col label{
  font-weight:600;
  margin-bottom:6px;
  color: #333 !important;
}

#ftds-result, .ftds-modal-box p {
  color: #333 !important;
}

.ftds-col input,
.ftds-col select{
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #ddd;
}

.ftds-btn{
  background:#2563eb;
  color:#fff;
  padding:12px 20px;
  border:none;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  width: 100%;
}

.ftds-btn-new-post{
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px !important;
    font-size: 14px;
    font-weight: 900;
    margin: 0 !important;
    border-radius: 10px;
}

.ftds-panel-actions{
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.ftds-btn-new-post i{
    font-size: 14px;
    line-height: 1;
}

@media(max-width:768px){
  .ftds-row{
    grid-template-columns:1fr;
  }
}

/* ===== RESET FORM WIDTH ===== */
#ftds-form,
#ftds-form * {
    box-sizing: border-box;
}

/* ===== GRID 2 CỘT ===== */
.ftds-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ftds-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== INPUT / SELECT / TEXTAREA ===== */
#ftds-form input,
#ftds-form select,
#ftds-form textarea {
    width: 100%;
    max-width: 100%;
}

/* ===== SELECT2 FIX ===== */
.select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-selection {
    width: 100% !important;
}

/* ===== WP EDITOR FIX ===== */
#ftds-form .wp-editor-wrap,
#ftds-form .wp-editor-container,
#ftds-form iframe {
    max-width: 100%;
}

/* ===== IMAGE PREVIEW ===== */
#ftds-form img {
    max-width: 100%;
    height: auto;
}


/* spinner */
/* ===== LOADING OVERLAY CENTER ===== */
.ftds-loading{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(255, 255, 255, 0.8);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 99999;
}

.ftds-loading > div{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15%;
}

.ftds-spinner{
    width: 52px;
    height: 52px;
    border: 5px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ftds-spin 0.9s linear infinite;
}

.ftds-loading-text{
    margin-top: 14px;
    font-weight: 600;
    color: #374151;
}

@keyframes ftds-spin {
    to { transform: rotate(360deg); }
}



/* ===== SUCCESS MODAL ===== */
.ftds-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);

    display: flex;              /* 👈 LUÔN FLEX */
    align-items: center;
    justify-content: center;

    visibility: hidden;         /* 👈 Ẩn bằng visibility */
    opacity: 0;

    z-index: 100000;
    transition: opacity .2s ease, visibility .2s ease;
}


.ftds-modal-box{
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: ftds-pop .25s ease;
}

.ftds-modal-icon{
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftds-modal-actions{
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ftds-modal-actions button{
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

#ftds-close-modal{
    background: grey;
}

#ftds-new-post{
    background: #2563eb;
    color: #fff;
}

.ftds-modal.is-active{
    visibility: visible;
    opacity: 1;
}


@keyframes ftds-pop{
    from{ transform: scale(.9); opacity:0 }
    to{ transform: scale(1); opacity:1 }
}

/* ===== AUTH CALLOUT ===== */
.ftds-auth-callout{
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 14px;
    margin-bottom: 16px;
}

.ftds-auth-callout-title{
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}

.ftds-auth-callout-actions{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ftds-auth-link{
    border: 1px solid #dbeafe;
    background: #ffffff;
    color: #2563eb;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.ftds-auth-link:hover{
    background: #eff6ff;
}

/* ===== AUTH MODAL ===== */
#ftds-auth-modal .ftds-modal-box{
    max-width: 520px;
    width: 94%;
    text-align: left;
}

.ftds-auth-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ftds-auth-header-main{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.ftds-auth-back-btn{
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    cursor: pointer;
    color: #1e40af;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
}

.ftds-auth-back-btn:hover{
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ftds-auth-title{
    font-weight: 900;
    color: #111827;
    font-size: 16px;
    min-width: 0;
}

.ftds-auth-close-btn{
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    color: #374151;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 16px;
    padding: 0;
}

.ftds-auth-tabs{
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.ftds-auth-tab{
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    color: #374151;
    font-weight: 900;
}

.ftds-auth-tab.is-active{
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.ftds-auth-panel{
    display: none;
}

.ftds-auth-panel.is-active{
    display: block;
}

.ftds-auth-form-title{
    font-weight: 900;
    color: #111827;
    margin-bottom: 10px;
}

.ftds-auth-form input{
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    color: #111827;
    background: #fff;
}

.ftds-auth-required{
    font-weight: 900;
    color: #111827;
    margin: 0 0 8px;
}

.ftds-req-star{
    color: #ef4444;
}

.ftds-auth-form input::placeholder{
    color: #6b7280;
    opacity: 1;
}

.ftds-auth-actions{
    margin-top: 6px;
}

.ftds-auth-login-extras{
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 10px;
}

.ftds-auth-forgot-trigger{
    border: none;
    background: none;
    padding: 4px 0;
    margin: 0;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ftds-auth-forgot-trigger:hover{
    color: #1d4ed8;
}

.ftds-auth-panel-forgot .ftds-auth-form-title{
    text-align: center;
}

.ftds-auth-forgot-icon{
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ftds-auth-forgot-lead{
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
    font-weight: 500;
}

#ftds-auth-modal.ftds-auth-modal--forgot .ftds-auth-modal-box{
    max-width: 440px;
}

#ftds-auth-success{
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
}

#ftds-auth-error{
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-weight: 700;
}

/* ===== TOPBAR (logout) ===== */
.ftds-topbar{
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.ftds-logout{
    font-weight: 900;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    background: #111827;
    border: 1px solid #111827;
}

.ftds-logout:hover{
    background: #0f172a;
    border-color: #0f172a;
}

/* ===== ACCOUNT SCREEN ===== */
.ftds-posting-area{
    margin-top: 16px;
}

.ftds-account-screen{
    margin-bottom: 12px;
}

.ftds-account-greeting{
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 900;
    color: #111827;
    margin-bottom: 12px;
}

.ftds-account-greeting-name{
    color: #2563eb;
}

.ftds-account-layout{
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
}

.ftds-account-menu{
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ftds-account-menu-title{
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
    font-size: 14px;
}

.ftds-account-menu-item{
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: transparent;
    font-weight: 800;
    color: #111827;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 8px;
    border-left: 3px solid transparent;
}

.ftds-menu-icon{
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #111827;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.ftds-account-menu-item:link,
.ftds-account-menu-item:visited,
.ftds-account-menu-item:hover,
.ftds-account-menu-item:active{
    color: #374151 !important;
    text-decoration: none;
}

.ftds-account-menu-item:last-child{
    margin-bottom: 0;
}

.ftds-account-menu-item:hover{
    background: #f8fafc;
    border-color: #dbeafe;
    border-left-color: #93c5fd;
}

.ftds-account-menu-item.is-active{
    color: #2563eb;
    border-left-color: #2563eb;
    background: #f8fafc;
    border-color: #dbeafe;
}

.ftds-account-menu-item.is-active:link,
.ftds-account-menu-item.is-active:visited,
.ftds-account-menu-item.is-active:hover,
.ftds-account-menu-item.is-active:active{
    color: #2563eb !important;
    text-decoration: none;
}

.ftds-account-menu-item.is-active .ftds-menu-icon{
    background: #2563eb;
    color: #ffffff;
}

.ftds-account-logout:visited{
    color: #dc2626;
}

.ftds-account-logout{
    background: transparent !important;
    border-color: #e5e7eb !important;
    color: #dc2626 !important;
}

.ftds-account-logout:hover{
    background: #fff1f2 !important;
    color: #b91c1c !important;
    border-left-color: #dc2626 !important;
    border-color: #fecaca !important;
}

.ftds-account-logout:link,
.ftds-account-logout:visited,
.ftds-account-logout:hover,
.ftds-account-logout:active{
    color: #dc2626 !important;
    text-decoration: none;
}

.ftds-account-logout .ftds-menu-icon{
    background: #ffe4e6;
    color: #dc2626;
}


.ftds-account-content{
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    min-height: 220px;
}

.ftds-account-panel{
    display: none;
}

.ftds-account-panel.is-active{
    display: block;
}

.ftds-btn-new-post{
    margin-bottom: 8px;
}

.ftds-posts-list{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.ftds-pagination{
    margin-top: 14px;
}

.ftds-pagination-wrap{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.ftds-page-btn{
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 900;
    cursor: pointer;
}

.ftds-page-btn:hover{
    background: #f8fafc;
    border-color: #dbeafe;
}

.ftds-page-btn.is-active{
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    cursor: default;
}

.ftds-page-btn:disabled,
.ftds-page-btn.is-disabled{
    opacity: 0.6;
    cursor: not-allowed;
}

.ftds-post-row{
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ftds-post-row:hover{
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

.ftds-post-thumb{
    flex: 0 0 auto;
    width: 76px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftds-post-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.05) contrast(1.05);
}

.ftds-post-meta{
    min-width: 0;
    flex: 1;
}

.ftds-post-title{
    display: block;
    color: #0f172a;
    font-weight: 900;
    text-decoration: none;
    line-height: 1.25;
}

.ftds-post-title:hover{
    text-decoration: underline;
}

.ftds-post-author{
    margin-top: 4px;
    font-weight: 900;
    color: #1d4ed8;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ftds-post-status{
    margin-top: 6px;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
    font-size: 12px;
}

.ftds-post-date{
    margin-top: 6px;
    color: #374151;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.ftds-empty-state{
    margin-top: 12px;
    color: #6b7280;
    font-weight: 900;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #e5e7eb;
}

.ftds-loading-inline{
    color: #6b7280;
    font-weight: 900;
    padding: 12px 0;
}

@media (max-width: 768px) {
    .ftds-account-layout{
        grid-template-columns: 1fr;
    }
}
