/* ============================================================
   Trust Care System — Admin Panel
   ============================================================ */

.admin-body,
.auth-body {
    background: #f2f7f5;
    color: var(--ink);
    min-height: 100vh;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* ------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------ */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 24px 16px 18px;
    background:
        radial-gradient(400px 220px at 0% 0%, rgba(14, 159, 142, 0.18), transparent 65%),
        linear-gradient(180deg, #0b1727, #08131e);
    color: #9db4c1;
    transition: transform 0.28s ease;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
    color: #fff;
}

.admin-brand .logo-mark {
    width: 40px;
    height: 40px;
}

.admin-brand .brand-text strong {
    color: #fff;
}

.admin-brand .brand-text strong span {
    color: #3ed6c4;
}

.admin-brand .brand-text small {
    color: #6d8796;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    margin-top: 28px;
    overflow-y: auto;
}

.admin-nav-label {
    padding: 0 12px;
    margin-bottom: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #55707f;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #9db4c1;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-nav a .icon {
    width: 18px;
    height: 18px;
    opacity: 0.85;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-nav a.is-active {
    background: linear-gradient(135deg, rgba(18, 179, 160, 0.24), rgba(18, 179, 160, 0.08));
    color: #4fe0cf;
    box-shadow: inset 0 0 0 1px rgba(79, 224, 207, 0.2);
}

.nav-count {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--amber);
    color: #3a2500;
    font-size: 0.64rem;
    font-weight: 800;
    font-style: normal;
}

.admin-sidebar-footer {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-site-link,
.admin-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #93aab8;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-site-link .icon,
.admin-logout .icon {
    width: 16px;
    height: 16px;
}

.admin-site-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.admin-overlay {
    display: none;
}

/* ------------------------------------------------------------
   Main area
   ------------------------------------------------------------ */
.admin-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    min-width: 0;
    margin-left: 264px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-kicker {
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted-light);
    line-height: 1.4;
}

.admin-topbar h1 {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy-900);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle {
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}

.sidebar-toggle .icon {
    width: 20px;
    height: 20px;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: none;
}

.admin-topbar-site {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #526b7a;
    transition: all 0.2s ease;
}

.admin-topbar-site:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.admin-topbar-site .icon {
    width: 14px;
    height: 14px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 5px 5px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.admin-user:hover {
    background: #f2f8f6;
}

.admin-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #12b3a0, #0a7c6f);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.admin-user-text strong {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
}

.admin-user-text small {
    font-size: 0.66rem;
    color: var(--muted-light);
}

.admin-toasts {
    position: fixed;
    top: 82px;
    right: 24px;
    z-index: 500;
    width: min(380px, calc(100vw - 32px));
    display: grid;
    gap: 10px;
}

.admin-content {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 32px 40px;
}

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 32px 26px;
    margin-top: auto;
    font-size: 0.72rem;
    color: var(--muted-light);
}

/* ------------------------------------------------------------
   Page head & dashboard
   ------------------------------------------------------------ */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.page-head h2 {
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--navy-900);
    line-height: 1.25;
    margin-bottom: 3px;
}

.page-head p {
    font-size: 0.82rem;
    color: var(--muted);
}

.page-head .btn {
    flex: none;
    margin-top: 3px;
}

.panel-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
    padding: 30px 34px;
    border-radius: 22px;
    background:
        radial-gradient(600px 240px at 95% 0%, rgba(20, 184, 166, 0.3), transparent 60%),
        linear-gradient(120deg, #0b1727 0%, #0c3b3b 60%, #0a7c6f 100%);
    color: #fff;
    box-shadow: 0 30px 60px -38px rgba(7, 19, 31, 0.85);
}

.panel-hero .admin-kicker {
    color: #9ed7cd;
}

.panel-hero h2 {
    margin: 2px 0 5px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.panel-hero p {
    max-width: 620px;
    font-size: 0.82rem;
    color: rgba(222, 243, 240, 0.76);
}

.panel-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    flex: none;
}

.panel-hero-actions .btn {
    font-size: 0.8rem;
    padding: 11px 17px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #cfe6e1;
    box-shadow: var(--shadow-sm);
}

.stat-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 13px;
}

.stat-card-icon .icon {
    width: 22px;
    height: 22px;
}

.icon-teal { background: #e7f7f4; color: #0a7c6f; }
.icon-blue { background: #e8f1fd; color: #2f6ec4; }
.icon-amber { background: #fdf1dc; color: #b9741a; }
.icon-violet { background: #f0ebfe; color: #6d4cd1; }

.stat-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card-body small {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted-light);
}

.stat-card-body strong {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--navy-900);
    line-height: 1.25;
}

.stat-card-body em {
    font-size: 0.68rem;
    font-style: normal;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.dashboard-side {
    display: grid;
    gap: 20px;
}

.quick-links {
    display: grid;
    gap: 4px;
}

.quick-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #42596a;
    transition: background 0.2s ease, color 0.2s ease;
}

.quick-links a .icon {
    width: 16px;
    height: 16px;
    color: var(--teal-dark);
}

.quick-links a span {
    flex: 1;
}

.quick-links a:hover {
    background: #f1f9f7;
    color: var(--teal-dark);
}

.mini-project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-project {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.mini-project:hover {
    border-color: #cfe6e1;
    background: #fafdfc;
}

.mini-project-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.mini-project-icon .icon {
    width: 17px;
    height: 17px;
}

.mini-project > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.mini-project strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-project small {
    display: block;
    font-size: 0.68rem;
    color: var(--muted-light);
}

.mini-project > .icon {
    width: 14px;
    height: 14px;
    color: var(--muted-light);
    flex: none;
}

/* ------------------------------------------------------------
   Cards, tables, badges
   ------------------------------------------------------------ */
.admin-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    margin-bottom: 20px;
}

.dashboard-grid .admin-card,
.dashboard-side .admin-card,
.form-layout .admin-card,
.message-layout .admin-card,
.profile-grid .admin-card {
    margin-bottom: 0;
}

.admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-card-head h2 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy-900);
}

.admin-card-head p {
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--muted);
}

.admin-card-head .btn {
    flex: none;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.admin-table th {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-light);
    text-align: left;
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #edf3f1;
    font-size: 0.81rem;
    color: #42596a;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover td {
    background: #fafdfc;
}

.admin-table .row-unread td {
    background: #f3fbf9;
}

.admin-table .row-unread td:first-child {
    box-shadow: inset 3px 0 0 var(--teal);
}

.text-right {
    text-align: right;
}

.table-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.table-person > span:last-child {
    min-width: 0;
}

.table-person strong {
    display: block;
    font-size: 0.81rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}

.table-person small {
    display: block;
    font-size: 0.7rem;
    color: var(--muted-light);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-xs {
    width: 34px;
    height: 34px;
    font-size: 0.66rem;
}

.avatar-img {
    object-fit: cover;
    border-radius: 50%;
}

.table-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.table-item > span:nth-child(2) {
    min-width: 0;
}

.table-item strong {
    display: block;
    font-size: 0.81rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}

.table-item small {
    display: block;
    font-size: 0.69rem;
    color: var(--muted-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.table-item-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 10px;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.table-item-icon .icon {
    width: 19px;
    height: 19px;
}

.thumb-cover {
    display: grid;
    place-items: center;
    width: 52px;
    height: 40px;
    flex: none;
    overflow: hidden;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.thumb-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-title {
    display: block;
    font-size: 0.81rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
}

.table-excerpt {
    display: block;
    max-width: 380px;
    margin-top: 2px;
    font-size: 0.7rem;
    color: var(--muted-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-order {
    display: block;
    margin-top: 3px;
    font-size: 0.64rem;
    color: var(--muted-light);
}

.price-text {
    color: var(--navy-900);
    font-weight: 800;
    white-space: nowrap;
}

.chip-sm {
    padding: 4px 10px;
    font-size: 0.68rem;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #5d7382;
    transition: all 0.18s ease;
}

.btn-icon .icon {
    width: 15px;
    height: 15px;
}

.btn-icon:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
    background: #f4fbf9;
}

.btn-icon-danger:hover {
    border-color: #f2b8b8;
    color: #c0392b;
    background: #fdf3f3;
}

.btn-danger {
    background: #d64545;
    color: #fff;
    box-shadow: 0 10px 22px -14px rgba(214, 69, 69, 0.7);
}

.btn-danger:hover {
    background: #bf3939;
    transform: translateY(-1px);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-active { background: #e6f8ee; color: #15803d; }
.badge-draft { background: #eef3f2; color: #647786; }
.badge-featured { background: #fdf1dc; color: #9a5b00; }
.badge-baru { background: #fdf1dc; color: #9a5b00; }
.badge-dibaca { background: #e8f1fd; color: #2563eb; }
.badge-dibalas { background: #e6f8ee; color: #15803d; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 54px 20px;
    text-align: center;
}

.empty-state > .icon {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    color: #b9cdc9;
}

.empty-state h3 {
    margin-bottom: 4px;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--navy-900);
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--muted);
}

.details-list {
    display: grid;
    gap: 0;
    margin-bottom: 16px;
}

.details-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #edf3f1;
}

.details-list > div:last-child {
    border-bottom: 0;
}

.details-list dt {
    flex: none;
    font-size: 0.72rem;
    color: var(--muted-light);
}

.details-list dd {
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--ink);
    text-align: right;
    overflow-wrap: anywhere;
}

.details-list dd a {
    color: var(--teal-dark);
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 20px;
    align-items: start;
}

.form-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.form-side {
    min-width: 0;
}

.form-side-card {
    position: sticky;
    top: 92px;
}

.form-layout .field {
    margin-bottom: 15px;
}

.form-layout .field:last-child {
    margin-bottom: 0;
}

.form-grid {
    gap: 14px;
}

.form-grid-tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.form-grid .field {
    margin-bottom: 0;
}

.form-main .form-grid {
    margin-bottom: 15px;
}

.field-hint {
    display: block;
    font-size: 0.68rem;
    line-height: 1.5;
    color: var(--muted-light);
}

.admin-body .field input,
.admin-body .field select,
.admin-body .field textarea {
    background: #fbfdfc;
    font-size: 0.84rem;
    padding: 11px 13px;
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.icon-option {
    position: relative;
    cursor: pointer;
}

.icon-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.icon-option span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 9px 4px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: #5d7382;
    transition: all 0.18s ease;
}

.icon-option span .icon {
    width: 18px;
    height: 18px;
}

.icon-option em {
    font-size: 0.55rem;
    font-style: normal;
    font-weight: 600;
    color: var(--muted-light);
}

.icon-option input:checked + span {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal-dark);
    box-shadow: 0 0 0 3px rgba(14, 159, 142, 0.12);
}

.icon-option input:focus-visible + span {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.switch-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 16px 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f8fbfa;
    cursor: pointer;
}

.switch-field > span {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.switch-field strong {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
}

.switch-field small {
    font-size: 0.68rem;
    color: var(--muted-light);
}

.switch-field input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-ui {
    position: relative;
    width: 42px;
    height: 24px;
    flex: none;
    border-radius: 999px;
    background: #cbd8d5;
    transition: background 0.2s ease;
}

.switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(11, 23, 39, 0.25);
    transition: transform 0.2s ease;
}

.switch-field input:checked + .switch-ui {
    background: var(--teal);
}

.switch-field input:checked + .switch-ui::after {
    transform: translateX(18px);
}

.switch-field input:focus-visible + .switch-ui {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.image-upload {
    margin-bottom: 16px;
}

.image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1.5px dashed var(--line-strong);
    border-radius: 13px;
    background: #f8fbfa;
    color: var(--muted-light);
    font-size: 0.72rem;
}

.image-preview.has-image {
    border-style: solid;
    background: #fff;
}

.image-preview > .icon {
    width: 26px;
    height: 26px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-square {
    aspect-ratio: 1 / 1;
}

.file-btn {
    position: relative;
    overflow: hidden;
}

.file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.72rem;
    color: #a33;
    cursor: pointer;
}

.check-field input {
    accent-color: #d64545;
}

.side-tip {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    background: #f1f8f6;
    color: #4d6a70;
}

.side-tip .icon {
    width: 16px;
    height: 16px;
    flex: none;
    margin-top: 1px;
    color: var(--teal-dark);
}

.side-tip p {
    font-size: 0.7rem;
    line-height: 1.6;
}

.admin-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 0.79rem;
    line-height: 1.55;
}

.admin-alert > .icon {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 1px;
}

.admin-alert ul {
    margin-top: 4px;
    padding-left: 16px;
    list-style: disc;
}

.admin-alert-error {
    border: 1px solid #f8d3d3;
    background: #fdf3f3;
    color: #a12626;
}

.admin-alert-success {
    border: 1px solid #c8ebd8;
    background: #f0fbf5;
    color: #147a48;
}

/* ------------------------------------------------------------
   Messages / toolbar
   ------------------------------------------------------------ */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.18s ease;
}

.filter-tab em {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #eef5f3;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    color: var(--muted);
}

.filter-tab:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.filter-tab.is-active {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.filter-tab.is-active em {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.table-search {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 3px 3px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
}

.table-search > span {
    display: grid;
    place-items: center;
    color: var(--muted-light);
}

.table-search > span .icon {
    width: 15px;
    height: 15px;
}

.table-search input {
    width: 210px;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    font-size: 0.78rem;
    outline: none;
}

.table-search .btn {
    padding: 7px 12px;
}

.message-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.message-card {
    padding: 0;
    overflow: hidden;
}

.message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfc;
}

.message-head .avatar {
    width: 42px;
    height: 42px;
    font-size: 0.76rem;
}

.message-body {
    padding: 26px 24px;
    font-size: 0.89rem;
    line-height: 1.85;
    color: #33475a;
    overflow-wrap: anywhere;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 18px 24px;
    border-top: 1px solid var(--line);
    background: #fbfdfc;
}

.message-actions .btn {
    font-size: 0.78rem;
    padding: 10px 15px;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}

.profile-card {
    text-align: center;
    padding: 30px 24px;
}

.admin-avatar-lg {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    font-size: 1.2rem;
}

.profile-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy-900);
}

.profile-card > p {
    margin-bottom: 10px;
    font-size: 0.76rem;
    color: var(--muted-light);
}

.profile-card .details-list {
    margin-top: 20px;
    text-align: left;
}

/* ------------------------------------------------------------
   Auth / login
   ------------------------------------------------------------ */
.auth-shell {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    min-height: 100vh;
}

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 42px 52px;
    background:
        radial-gradient(600px 360px at 95% 0%, rgba(20, 184, 166, 0.28), transparent 60%),
        radial-gradient(500px 300px at 0% 100%, rgba(244, 176, 74, 0.12), transparent 60%),
        linear-gradient(155deg, #07131f 0%, #0b2e35 58%, #0a7c6f 130%);
    color: #fff;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.09);
    pointer-events: none;
}

.auth-orb-one {
    top: -160px;
    right: -140px;
    width: 420px;
    height: 420px;
}

.auth-orb-two {
    bottom: -180px;
    left: -160px;
    width: 380px;
    height: 380px;
}

.auth-brand {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    padding: 0;
}

.auth-copy {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: auto 0;
    padding: 48px 0;
}

.auth-copy h1 {
    margin: 4px 0 16px;
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.035em;
    color: #fff;
}

.auth-copy > p {
    font-size: 0.94rem;
    color: #a9c4c9;
    line-height: 1.75;
}

.auth-points {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: #c3d8db;
}

.auth-points .icon {
    width: 19px;
    height: 19px;
    color: #4fe0cf;
}

.auth-panel-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.7rem;
    color: #7d99a4;
}

.auth-panel-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b6cfd2;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-panel-footer a:hover {
    color: #4fe0cf;
}

.auth-panel-footer .icon {
    width: 14px;
    height: 14px;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 40px 24px;
    background:
        radial-gradient(700px 400px at 100% 100%, #e7f7f4, transparent 65%),
        #f4f9f7;
}

.auth-card {
    width: min(430px, 100%);
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.auth-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.auth-icon .icon {
    width: 23px;
    height: 23px;
}

.auth-card .eyebrow {
    margin-bottom: 8px;
}

.auth-card h2 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--navy-900);
    line-height: 1.2;
}

.auth-subtitle {
    margin-top: 5px;
    font-size: 0.82rem;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.auth-form .field {
    margin-bottom: 0;
}

.login-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f5faf8;
    color: #5d7370;
    font-size: 0.68rem;
    line-height: 1.6;
}

.login-hint .icon {
    width: 15px;
    height: 15px;
    flex: none;
    margin-top: 1px;
    color: var(--teal-dark);
}

.login-hint code {
    padding: 1px 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-size: 0.68rem;
    color: var(--navy-900);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-layout,
    .profile-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }

    .form-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 244px;
    }

    .admin-main {
        margin-left: 244px;
    }

    .admin-content {
        padding: 24px;
    }

    .panel-hero {
        padding: 26px;
    }
}

@media (max-width: 960px) {
    .admin-sidebar {
        width: 270px;
        transform: translateX(-100%);
        box-shadow: 30px 0 60px -30px rgba(7, 19, 31, 0.6);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: grid;
    }

    body.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .admin-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 250;
        background: rgba(7, 19, 31, 0.45);
        backdrop-filter: blur(2px);
    }

    .dashboard-grid,
    .form-layout,
    .message-layout,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .form-side-card {
        position: static;
    }

    .message-layout aside {
        order: 2;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        padding: 26px 32px;
        min-height: auto;
    }

    .auth-copy,
    .auth-panel-footer {
        display: none;
    }

    .auth-form-panel {
        padding: 34px 20px;
    }

    .admin-topbar {
        padding: 13px 20px;
    }

    .admin-footer {
        padding-inline: 24px;
    }
}

@media (max-width: 720px) {
    .admin-content {
        padding: 18px 16px 32px;
    }

    .admin-topbar-site span {
        display: none;
    }

    .admin-topbar-site {
        padding: 8px;
    }

    .admin-user-text {
        display: none;
    }

    .panel-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .panel-hero-actions {
        width: 100%;
    }

    .panel-hero-actions .btn {
        flex: 1;
    }

    .page-head {
        flex-direction: column;
        gap: 14px;
    }

    .page-head .btn {
        width: 100%;
    }

    .admin-card {
        padding: 18px;
        border-radius: 16px;
    }

    .form-grid,
    .form-grid-tight,
    .form-grid-four {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 10px;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
    }

    .stat-card-body strong {
        font-size: 1.4rem;
    }

    .mini-project-grid {
        grid-template-columns: 1fr;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search input {
        width: 100%;
        min-width: 0;
    }

    .table-search {
        width: 100%;
    }

    .message-actions .btn {
        flex: 1;
    }

    .admin-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .auth-panel {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-kicker {
        display: none;
    }

    .admin-topbar h1 {
        font-size: 0.94rem;
    }

    .filter-tabs {
        gap: 5px;
    }

    .filter-tab {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .icon-picker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
