/* =========================================================
   NOTEX — APPLICATIONS (apply / status / admin-applications)
   Подключается автоматически из inc/applications.php
========================================================= */

/* Атрибут hidden должен работать и для элементов с display из классов (.btn и т.п.) */
[hidden] { display: none !important; }

/* ---------- Доп. кнопки ---------- */
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-success { color: #fff; background: rgba(48, 209, 88, .2); border: 1px solid rgba(48, 209, 88, .4); }
.btn-success:hover { background: rgba(48, 209, 88, .32); }
.btn-danger { color: #fff; background: rgba(255, 69, 58, .18); border: 1px solid rgba(255, 69, 58, .38); }
.btn-danger:hover { background: rgba(255, 69, 58, .3); }
.btn[disabled] { opacity: .5; cursor: default; pointer-events: none; }

/* =========================================================
   APPLY
========================================================= */
.ntx-app-contact-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.ntx-app-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================
   STATUS + общие блоки
========================================================= */
.ntx-app-value { color: #fff; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.ntx-app-value.pre { white-space: pre-wrap; }
.ntx-app-status { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 900; line-height: 1; letter-spacing: -1px; text-transform: uppercase; color: var(--text-primary); }
.ntx-app-desc { margin-bottom: 24px; color: var(--text-secondary); font-size: 15px; line-height: 1.6; }
.ntx-app-notify { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ntx-app-notify p { margin-bottom: 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.ntx-app-notify .btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* используются в админке */
.ntx-app-dl { margin: 0; }
.ntx-app-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ntx-app-row:last-child { border-bottom: 0; }
.ntx-app-row dt { padding-top: 2px; color: var(--text-tertiary); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.ntx-app-row dd { margin: 0; color: #fff; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.ntx-app-row dd .ntx-app-ctype { margin-right: 6px; color: var(--text-tertiary); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ntx-app-row dd .btn { margin-left: 6px; }
.ntx-app-comment { margin-top: 22px; padding: 18px 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius-md); }
.ntx-app-comment-label { display: block; margin-bottom: 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.ntx-app-comment-text { color: #fff; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ntx-app-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ntx-app-center { padding: 100px 0; text-align: center; }
.ntx-app-center h2 { margin-top: 8px; font-size: 2rem; font-weight: 900; }
.ntx-app-center p { margin-top: 12px; color: var(--text-secondary); }

/* =========================================================
   ADMIN
========================================================= */
.ntx-app-admin { width: min(1200px, calc(100% - var(--container-gutter))); margin: 0 auto; padding-top: calc(var(--nav-h) + var(--nav-top) + 80px); padding-bottom: 100px; }
.ntx-app-admin .ntx-page-subtitle { margin-bottom: 32px; }
.ntx-app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ntx-app-toolbar .ntx-tabs-nav { margin-bottom: 0; }
.ntx-app-toolbar .ntx-input { width: 280px; max-width: 100%; height: 44px; }
.ntx-tab-btn .cnt { margin-left: 6px; opacity: .6; font-weight: 600; }

.ntx-app-card { overflow: hidden; border-radius: var(--radius-xl); }
.ntx-app-tablewrap { overflow-x: auto; }
.ntx-app-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ntx-app-table th {
    padding: 18px 20px; text-align: left; background: rgba(255, 255, 255, .03);
    color: var(--text-tertiary); font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.ntx-app-table td { padding: 16px 20px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
.ntx-app-table tbody tr[data-action="open"] { cursor: pointer; transition: background-color var(--t-fast); }
.ntx-app-table tbody tr[data-action="open"]:hover { background: rgba(255, 255, 255, .04); }
.ntx-app-table tbody tr:last-child td { border-bottom: 0; }
.ntx-app-table .muted { color: var(--text-tertiary); font-size: 12px; }
.ntx-app-empty { padding: 48px 20px !important; text-align: center; color: var(--text-secondary) !important; }
.ntx-app-empty.err { color: #ff453a !important; }

.ntx-pill { display: inline-block; padding: 4px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }

.ntx-pill { background: rgba(255, 255, 255, .08); }
.ntx-pill--pending  { color: var(--accent); }
.ntx-pill--accepted { color: var(--text-primary); }
.ntx-pill--rejected { color: var(--text-tertiary); }

.ntx-app-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; color: var(--text-secondary); font-size: 14px; }

.ntx-app-detail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 24px 0; }
.ntx-app-detail-head .ntx-page-eyebrow { margin-bottom: 4px; }
.ntx-app-detail-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; letter-spacing: -1px; overflow-wrap: anywhere; }
.ntx-app-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.ntx-app-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.ntx-app-detail .ntx-form-card { padding: 28px; }
.ntx-app-detail .ntx-form-card-label { margin-bottom: 14px; }
.ntx-app-detail textarea.ntx-input { min-height: 96px; }

.ntx-app-notes { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ntx-app-note { padding: 12px 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--radius-md); }
.ntx-app-note-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--text-tertiary); font-size: 12px; }
.ntx-app-note-head strong { color: #fff; }
.ntx-app-note-text { color: var(--text-secondary); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ntx-app-notes-empty { color: var(--text-tertiary); font-size: 14px; }
.ntx-app-decided { margin-bottom: 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.ntx-app-decided strong { color: #fff; }

.ntx-app-toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 2000; transform: translateX(-50%);
    padding: 12px 20px; color: #fff; font-size: 14px;
    background: rgba(30, 30, 30, .95); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}
.ntx-app-toast.err { border-color: rgba(255, 69, 58, .5); }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
    .ntx-app-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    .ntx-app-admin { width: calc(100% - 32px); padding-top: calc(var(--nav-h) + var(--nav-top) + 52px); padding-bottom: 64px; }
    .ntx-app-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .ntx-app-detail .ntx-form-card { padding: 22px; }
    .ntx-app-toolbar .ntx-input { width: 100%; }
}