:root {
    --primary-color: #d32f2f;
    --secondary-color: #f5f5f5;
    --accent-color: #424242;
    --text-color: #333;
    --sidebar-bg: #e0e0e0;
    --white: #ffffff;
    --border-color: #ccc;
}
body { font-family: 'Poppins', sans-serif; margin: 0; padding: 0; background-color: var(--secondary-color); height: 100vh; display: flex; flex-direction: column; }
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(135deg, var(--primary-color) 0%, #a01d1d 100%); }
.login-box { background: var(--white); padding: 2rem; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); width: 100%; max-width: 400px; text-align: center; }
.login-box img { max-width: 150px; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; }
.form-group input { width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 4px; box-sizing: border-box; }
.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01a1a 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #a01a1a 0%, var(--primary-color) 100%);
}
.login-btn:active {
    transform: translateY(0);
}
.dashboard-wrapper { display: flex; height: 100vh; overflow: hidden; position: relative; }
.sidebar { width: 280px; height: 100vh; box-sizing: border-box; background-color: var(--sidebar-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 1.5rem; overflow-y: auto; overflow-x: hidden; flex-shrink: 0; scrollbar-width: thin; scrollbar-color: var(--primary-color) var(--sidebar-bg); transition: transform 0.3s ease; z-index: 1000; min-height: 0; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 10px; }
.sidebar-header { text-align: center; margin-bottom: 1.25rem; flex: 0 0 auto; }
.sidebar-header img { max-width: 120px; }
.nav-menu { list-style: none; padding: 0; margin: 0; flex: 0 0 auto; min-height: 0; overflow: visible; }
.sidebar-footer { flex: 0 0 auto; margin-top: 1rem !important; background: transparent; }
.nav-item { padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-radius: 4px; cursor: pointer; transition: background 0.2s; }
.nav-item:hover, .nav-item.active { background-color: var(--white); color: var(--primary-color); font-weight: bold; }
.main-content { flex-grow: 1; overflow-y: auto; background-color: var(--white); display: flex; flex-direction: column; }
.top-bar { padding: 1rem 2rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.content-area { padding: 2rem; }
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.chat-container { display: flex; flex-direction: column; height: 400px; border: 1px solid var(--border-color); }
.chat-messages { flex-grow: 1; padding: 1rem; overflow-y: auto; background: #fafafa; }
.chat-input { display: flex; padding: 1rem; border-top: 1px solid var(--border-color); position: relative; gap: 10px; }
.chat-input input { flex-grow: 1; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 20px; outline: none; box-sizing: border-box; }
.message { margin-bottom: 1rem; padding: 0.5rem; border-radius: 8px; max-width: 80%; }
.message.sent { margin-left: auto; background: var(--primary-color); color: white; }
.message.received { background: #eee; }
.hidden { display: none !important; }

/* Shine/Skeleton Loading Effect */
.shine-loading {
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 5px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.8s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Improved Top Navigation */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-btn-secondary {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #444 0%, #222 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-btn-secondary:hover {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.site-footer {
    background: #2f2f2f;
    color: #f7f7f7;
    padding: 2rem 1rem;
    margin-top: auto;
}
.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-footer-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.site-footer-title {
    margin: 0;
    font-weight: 600;
}
.site-footer-note {
    margin: 0.2rem 0 0 0;
    color: #d7d7d7;
    font-size: 0.85rem;
}
.site-footer-links {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}
.site-footer-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}
.site-footer-links a:hover,
.site-footer-links a:focus {
    border-bottom-color: #fff;
}

.info-page {
    min-height: 100vh;
    height: auto;
    background: #f7f7f7;
}
.info-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01d1d 100%);
    color: var(--white);
    padding: 3.5rem 1rem;
}
.info-hero-inner,
.info-content {
    width: min(100% - 2rem, 960px);
    margin: 0 auto;
}
.info-kicker {
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.85;
}
.info-hero h1 {
    margin: 0;
    font-size: 2.4rem;
    line-height: 1.15;
}
.info-hero p {
    max-width: 720px;
    margin: 1rem 0 0 0;
    line-height: 1.7;
    opacity: 0.95;
}
.info-content {
    padding: 2rem 0 3rem;
}
.info-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: 6px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.info-card section + section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.info-card h2 {
    color: var(--primary-color);
    margin: 0 0 0.8rem 0;
    font-size: 1.35rem;
}
.info-card h3 {
    margin: 1.2rem 0 0.4rem;
    color: #222;
    font-size: 1.05rem;
}
.info-card p,
.info-card li {
    line-height: 1.75;
}
.info-card ul,
.info-card ol {
    padding-left: 1.25rem;
}
.info-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.info-callout {
    background: #fff7f7;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
}

.support-console {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    min-height: 620px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.support-queue {
    border-right: 1px solid var(--border-color);
    background: #fafafa;
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}
.support-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.support-toolbar input,
.support-toolbar select,
.support-actions select,
.support-reply-row textarea {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    min-width: 0;
}
.support-ticket-list {
    overflow-y: auto;
    padding: 10px;
    display: grid;
    align-content: start;
    gap: 8px;
}
.support-ticket-btn {
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 6px;
}
.support-ticket-btn:hover,
.support-ticket-btn.active {
    border-color: var(--primary-color);
    background: #fff7f7;
}
.support-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.support-ticket-row strong,
.support-ticket-btn p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.support-ticket-btn p {
    margin: 0;
    color: #666;
    font-size: 0.88rem;
}
.support-ticket-btn small {
    color: #777;
    font-size: 0.76rem;
}
.support-status {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #eef2f6;
    color: #666;
    text-transform: uppercase;
}
.support-status.open { background: #e9f7ef; color: #147d55; }
.support-status.escalated { background: #fff4e5; color: #b54708; }
.support-status.active { background: #e8f5fb; color: #0f6b8f; }
.support-status.closed { background: #eef2f6; color: #667085; }
.support-workspace {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}
.support-workspace-head {
    padding: 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.support-workspace-head h3 {
    margin: 0;
    color: var(--primary-color);
}
.support-workspace-head p {
    margin: 4px 0 0;
    color: #666;
    font-size: 0.86rem;
}
.support-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.support-small-btn {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: #222;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
}
.support-small-btn:hover {
    border-color: var(--primary-color);
}
.support-small-btn.danger {
    color: var(--primary-color);
    border-color: #f0c4c4;
}
.support-conversation {
    overflow-y: auto;
    padding: 18px;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.support-empty {
    margin: auto;
    max-width: 360px;
    text-align: center;
    color: #666;
}
.support-empty h3 {
    color: #222;
}
.support-message {
    max-width: min(720px, 78%);
    display: grid;
    gap: 4px;
}
.support-message.user {
    align-self: flex-start;
}
.support-message.support,
.support-message.officer {
    align-self: flex-end;
}
.support-bubble {
    border-radius: 16px;
    padding: 10px 12px;
    line-height: 1.45;
    background: #e9e9e9;
    white-space: pre-wrap;
}
.support-message.officer .support-bubble {
    background: var(--primary-color);
    color: #fff;
}
.support-message.support .support-bubble {
    background: #e8f5fb;
    color: #0f4f6b;
}
.support-message small {
    color: #777;
    font-size: 0.72rem;
}
.support-reply-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #eee;
}
.support-reply-row textarea {
    resize: vertical;
}

/* Dashboard & Management Enhancements */
.scrollable-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.scrollable-tabs::-webkit-scrollbar { display: none; }
.tab-btn { width: auto !important; min-width: fit-content; }
.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
}
.manage-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1rem;
}
.manage-list {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logout-link { display: inline !important; }
    .landing-header {
        padding: 0.75rem 1rem;
    }
    .landing-header h2 {
        font-size: 1rem !important;
    }
    .page-header {
        padding: 2.5rem 1rem;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
    .container-narrow, .container-wide {
        margin: 1.5rem auto;
    }
    .dashboard-wrapper { flex-direction: column; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        max-height: 100dvh;
        transform: translateX(-100%);
        width: 250px;
        display: flex;
        overflow-y: auto;
        padding-bottom: 2rem;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    }
    .main-content { width: 100%; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.active { display: block; }
    .top-bar { padding: 1rem; }
    .content-area { padding: 1rem; }
    .card { padding: 1rem; }
    .manage-grid { grid-template-columns: 1fr; }
    .login-box { padding: 1.5rem; width: 90%; }
    .user-welcome h2 { font-size: 1.1rem; }
    .user-welcome p { font-size: 0.75rem; }
    .chat-container { height: calc(100vh - 250px); min-height: 300px; }
    .site-footer-inner {
        align-items: flex-start;
    }
    .site-footer-links {
        flex-direction: column;
        gap: 0.65rem;
    }
    .info-hero h1 {
        font-size: 1.8rem;
    }
    .info-card {
        padding: 1.25rem;
    }
    .support-console {
        grid-template-columns: 1fr;
        min-height: 760px;
    }
    .support-queue {
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
        max-height: 320px;
    }
    .support-workspace-head {
        flex-direction: column;
    }
    .support-actions,
    .support-reply-row {
        width: 100%;
        grid-template-columns: 1fr;
    }
    .support-message {
        max-width: 92%;
    }
}

/* Chat Enhancements */
.message-wrapper { display: flex; align-items: flex-end; margin-bottom: 1rem; gap: 10px; }
.message-wrapper.sent { flex-direction: row-reverse; }
.profile-pic-circle { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; background: #ccc; flex-shrink: 0; border: 1px solid var(--border-color); }
.message-bubble { padding: 0.75rem 1rem; border-radius: 18px; max-width: 70%; position: relative; font-size: 0.95rem; line-height: 1.4; }
.message-wrapper.sent .message-bubble { background: var(--primary-color); color: white; border-bottom-right-radius: 4px; }
.message-wrapper.received .message-bubble { background: #e4e6eb; color: var(--text-color); border-bottom-left-radius: 4px; }

/* System Message Style */
.message-wrapper.system { justify-content: center; margin: 10px 0; }
.message-wrapper.system .message-bubble {
    background: none;
    color: var(--primary-color);
    font-size: 0.75rem;
    text-align: center;
    padding: 0;
    max-width: 90%;
    opacity: 0.8;
    font-weight: 600;
}

.mention-autocomplete {
    position: absolute;
    bottom: 100%;
    left: 1rem;
    width: calc(100% - 2rem);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}
.mention-item { padding: 0.5rem 1rem; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.mention-item:hover { background: #f0f0f0; }
.mention-item.grayed { opacity: 0.5; color: #888; }

.dm-preview { font-size: 0.75rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.nav-item.active .dm-preview { color: var(--primary-color); opacity: 0.8; }
.dm-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.65rem 0 0.35rem 0;
    padding: 0 0.25rem;
    color: #777;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.dm-search-wrap {
    padding: 0 0.25rem 0.5rem;
}
.dm-search-wrap input {
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 0.45rem 0.55rem;
    background: rgba(255,255,255,0.78);
    font: inherit;
    font-size: 0.78rem;
    outline: none;
}
.dm-search-wrap input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(211,47,47,0.12);
}
.dm-list {
    display: grid;
    gap: 0.35rem;
    max-height: min(24vh, 170px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.1rem 0.2rem 0.35rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}
.dm-list::-webkit-scrollbar {
    width: 6px;
}
.dm-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 999px;
}
.dm-user-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    width: 100%;
    min-height: 54px;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.5);
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-sizing: border-box;
}
.dm-user-row:hover,
.dm-user-row.active {
    background: #fff;
    color: var(--primary-color);
}
.dm-user-row.grayed {
    opacity: 0.65;
}
.dm-user-meta {
    min-width: 0;
}
.dm-user-name,
.dm-user-role {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dm-user-name {
    font-size: 0.82rem;
    font-weight: 700;
}
.dm-user-role {
    color: #777;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.25;
}
.dm-empty-state {
    padding: 0.75rem;
    color: #777;
    font-size: 0.78rem;
    text-align: center;
}
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 0.35rem;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}
.admin-view-stats div {
    display: grid;
    gap: 0.25rem;
    align-content: center;
    min-height: 58px;
}

@keyframes flash-orange {
    0% { background-color: transparent; }
    50% { background-color: rgba(255, 165, 0, 0.3); }
    100% { background-color: transparent; }
}
.flash-mention { animation: flash-orange 2s ease; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.message-wrapper.new-msg { animation: slideIn 0.3s ease-out; }

.privacy-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.45);
}
.privacy-modal.hidden { display: none; }
.privacy-modal__panel {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}
.privacy-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}
.privacy-modal__hint {
    margin: 0.5rem 0 1rem;
    color: #555;
    font-size: 0.95rem;
}
.privacy-modal label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.privacy-modal input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}
.privacy-modal__error {
    min-height: 1.2rem;
    color: #d33;
    font-size: 0.9rem;
}
.privacy-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}
.privacy-modal__actions button {
    border: 0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
}
.privacy-modal__actions button[type="button"] { background: #eee; color: #333; }
.privacy-modal__actions button[type="submit"] { background: var(--primary-color); color: #fff; }
.settlement-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff7f7;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.admin-view-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1rem;
}
.admin-view-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.admin-view-head h3 {
    margin: 0 0 0.35rem;
}
.admin-view-head p {
    margin: 0;
    color: #666;
}
.admin-view-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 0.5rem;
    min-width: min(320px, 100%);
}
.admin-view-stats div {
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.admin-view-stats span {
    display: block;
    color: var(--primary-color);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}
.admin-view-stats small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}
.admin-user-list,
.admin-detail-panel {
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fdfdfd;
    min-height: 420px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.admin-user-list {
    padding: 1rem;
}
.admin-user-search-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}
.admin-user-list input,
.admin-action-form input,
.admin-action-form select,
.admin-action-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: inherit;
}
.admin-user-search-wrap button {
    border: 0;
    border-radius: 6px;
    padding: 0 0.85rem;
    background: #666;
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}
.admin-users-status {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: #fff7f7;
    color: #7b1113;
    font-size: 0.82rem;
    font-weight: 600;
}
.admin-user-list-items {
    max-height: 520px;
    overflow-y: auto;
    margin-top: 1rem;
}
.admin-user-row {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    border: 0;
    border-bottom: 1px solid #eee;
    background: transparent;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.2s;
}
.admin-user-row:hover,
.admin-user-row.active {
    background: #fff7f7;
}
.admin-user-row:hover {
    transform: translateY(-1px);
}
.admin-user-row img,
.admin-detail-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: #fff;
}
.admin-user-row img {
    width: 34px;
    height: 34px;
}
.admin-user-row strong,
.admin-user-row small {
    display: block;
}
.admin-user-row small {
    color: #666;
}
.admin-detail-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    color: #888;
    text-align: center;
    padding: 2rem;
}
.admin-detail-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #fff, #fff7f7);
}
.admin-detail-avatar {
    width: 64px;
    height: 64px;
}
.admin-status-badge {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #eee;
    color: #555;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.admin-status-badge.suspended {
    background: #fff7f7;
    color: var(--primary-color);
}
.admin-tabs {
    display: flex;
    gap: 8px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}
.admin-tabs button {
    border: 0;
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    background: #666;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}
.admin-tabs button.active {
    background: var(--primary-color);
}
.admin-tab-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: 540px;
}
.admin-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}
.admin-info-item,
.admin-log-item,
.admin-chat-item {
    padding: 0.85rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}
.admin-info-item span,
.admin-log-item small,
.admin-chat-item small {
    display: block;
    color: #777;
    font-size: 0.78rem;
}
.admin-info-item strong {
    display: block;
    margin-top: 0.25rem;
}
.admin-chat-item,
.admin-log-item {
    margin-bottom: 0.75rem;
}
.admin-action-form {
    display: grid;
    gap: 0.85rem;
    max-width: 520px;
}
.admin-restriction-summary {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
    border: 1px solid #dfe6df;
    border-radius: 8px;
    background: #f7fbf7;
    color: #245b2b;
}
.admin-restriction-summary.active {
    border-color: #f0c2c2;
    background: #fff7f7;
    color: #7b1113;
}
.admin-restriction-summary span {
    color: #666;
    font-size: 0.86rem;
}
.admin-action-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 0.75rem;
}
.admin-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.admin-action-buttons .login-btn {
    width: auto;
    min-width: 220px;
    margin: 0;
}
.admin-secondary-btn {
    border: 1px solid #d33;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    background: #fff;
    color: #a01a1a;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.admin-secondary-btn:hover {
    background: #fff7f7;
}
.account-suspended-active > *:not(.account-suspended-overlay) {
    filter: blur(3px);
    pointer-events: none;
    user-select: none;
}
.account-suspended-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 15%, rgba(249, 226, 125, 0.18), transparent 32%),
        rgba(0, 0, 0, 0.48);
}
.account-suspended-panel {
    position: relative;
    width: min(520px, 100%);
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(0,0,0,0.22);
    backdrop-filter: blur(8px);
    text-align: center;
    animation: suspendedSlideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.account-suspended-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: linear-gradient(90deg, #a01a1a, var(--primary-color), #d4af37, #f9e27d);
    background-size: 300% 100%;
    animation: suspendedGradientMove 8s ease infinite;
}
@keyframes suspendedGradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes suspendedSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.account-suspended-head {
    padding: clamp(1.65rem, 5vw, 2rem) clamp(1.25rem, 5vw, 2rem) 1rem;
}
.account-suspended-logo-ring {
    width: clamp(88px, 24vw, 112px);
    height: clamp(88px, 24vw, 112px);
    margin: 0 auto 1.25rem;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(160, 26, 26, 0.12), rgba(212, 175, 55, 0.2));
}
.account-suspended-logo-ring::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px dashed rgba(160, 26, 26, 0.28);
    animation: suspendedRotate 18s linear infinite;
}
@keyframes suspendedRotate {
    to { transform: rotate(360deg); }
}
.account-suspended-logo-ring img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.14));
}
.account-suspended-panel h1 {
    margin: 0 0 0.75rem;
    color: #7b1113;
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.15;
}
.account-suspended-status {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 4px 11px;
    border-radius: 12px;
    background: #fff7f7;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.account-suspended-panel p {
    max-width: 420px;
    margin: 0.85rem auto 0;
    color: #444;
    font-size: 0.98rem;
    line-height: 1.65;
}
.account-suspended-meta {
    margin: 1rem clamp(1.25rem, 5vw, 2rem) 0;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    background: #fff7f7;
    text-align: left;
    color: #444;
    font-size: 0.92rem;
    line-height: 1.55;
}
.account-suspended-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(211, 47, 47, 0.12);
}
.account-suspended-row:last-child {
    border-bottom: 0;
}
.account-suspended-row span:first-child {
    color: #777;
    font-weight: 600;
}
.account-suspended-row span:last-child {
    color: #7b1113;
    font-weight: 700;
    text-align: right;
}
.account-suspended-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding: 1.25rem clamp(1.25rem, 5vw, 2rem) 2rem;
}
.account-suspended-actions .login-btn {
    width: auto;
    min-height: 44px;
    padding: 0 1rem;
}
.account-suspended-secondary {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    padding: 0 1rem;
    background: #eee;
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}
@media (max-width: 760px) {
    .account-suspended-panel {
        border-radius: 14px;
    }
    .account-suspended-row {
        display: block;
    }
    .account-suspended-row span {
        display: block;
        text-align: left !important;
    }
    .account-suspended-actions {
        flex-direction: column;
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }
    .account-suspended-actions .login-btn,
    .account-suspended-secondary {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .admin-view-head {
        display: block;
    }
    .admin-view-stats {
        margin-top: 1rem;
    }
    .admin-view-layout,
    .admin-action-row {
        grid-template-columns: 1fr;
    }
    .admin-action-buttons,
    .admin-action-buttons .login-btn,
    .admin-secondary-btn {
        width: 100%;
    }
    .admin-user-search-wrap {
        grid-template-columns: 1fr;
    }
    .admin-detail-header {
        align-items: flex-start;
    }
}

.typing-indicator {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    padding-left: 10px;
    font-style: italic;
    min-height: 1.2rem;
}

.msg-actions {
    display: none;
    position: absolute;
    top: -10px;
    right: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 5px;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}
.message-bubble:hover .msg-actions { display: flex; }
.msg-action-btn {
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px;
    border-radius: 3px;
    transition: background 0.2s;
}
.msg-action-btn:hover { background: #f0f0f0; }

.hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary-color); }
@media (max-width: 768px) {
    .hamburger { display: block; padding: 0.5rem; }
}

/* Print Jobs & ShareCal Common Styles */
.page-header {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01d1d 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    z-index: 1;
}
.container-narrow {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
}
.container-wide {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
}
.auth-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d1ecf1; color: #0c5460; }
.status-printing { background: #cce5ff; color: #004085; }
.status-ready { background: #d4edda; color: #155724; }
.status-completed { background: #e2e3e5; color: #383d41; }
.status-rejected { background: #f8d7da; color: #721c24; }

.status-available { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.status-reserved { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.status-taken { background: #e2e3e5; color: #383d41; border-color: #d6d8db; }
.status-overdue { background: #f8d7da; color: #721c24; border-color: #f5c6cb; animation: pulse-red 2s infinite; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.job-card {
    border-left: 5px solid var(--primary-color);
    position: relative;
    transition: transform 0.2s;
}
.job-card:hover {
    transform: scale(1.02);
}
.job-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.progress-tracker {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    position: relative;
    padding: 0 10px;
}
.progress-step {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ddd;
    z-index: 2;
}
.progress-step.active { background: var(--primary-color); box-shadow: 0 0 5px var(--primary-color); }
.progress-line {
    position: absolute;
    top: 7px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #ddd;
    z-index: 1;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}
.calc-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    border-top: 5px solid var(--primary-color);
    transition: transform 0.2s;
}
.calc-card:hover { transform: translateY(-5px); }
.calc-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f0f0f0;
}

/* Submission Form Styles */
.submission-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 2rem;
}
.submission-form h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.calc-body { padding: 1.25rem; }
.unit-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.unit-pill {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #ddd;
}

/* Guide Section Styles */
.guide-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.video-container {
    width: 100%;
    max-width: 800px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    margin-bottom: 1.5rem;
    position: relative;
    border: 12px solid #2a2a2a;
    background: #000;
    outline: 1px solid rgba(255,255,255,0.1);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 2;
}

.video-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 1;
}

.video-glow {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #d32f2f, #ffeb3b, #d32f2f);
    z-index: -1;
    filter: blur(10px);
    opacity: 0.3;
    border-radius: 18px;
    animation: borderGlow 5s infinite linear;
}

@keyframes borderGlow {
    0% { filter: blur(10px) hue-rotate(0deg); }
    100% { filter: blur(10px) hue-rotate(360deg); }
}

.guide-info {
    background: #fcfcfc;
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid #ebebeb;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.guide-info h3 {
    margin-top: 0;
    font-size: 1.8rem;
    border-bottom: 4px solid var(--primary-color);
    padding-bottom: 12px;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
}

.guide-topic-item {
    background: white;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f0f0f0;
    border-left: 6px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.guide-topic-item:hover {
    border-left-color: var(--primary-color);
    background: #fff;
    transform: scale(1.03) translateX(10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #ffe0e0;
}

.guide-topic-item span {
    font-weight: 500;
}

@media (max-width: 992px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }
}
