:root {
    --bg: #f3f7ff;
    --sidebar: #102a43;
    --sidebar-hover: #203a5a;
    --accent: #2563eb;
    --text: #0f172a;
    --muted: #64748b;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #eef4ff, #f8fbff);
    color: var(--text);
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 290px;
    background: var(--sidebar);
    color: var(--white);
    padding: 28px 20px;
    max-height: 100vh;
    overflow-y: auto;
}

.profile-card {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: var(--white);
    border: 3px solid rgba(255,255,255,0.25);
}

.profile-card h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.designation,
.office {
    margin: 2px 0;
    color: #dbeafe;
    font-size: 0.95rem;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu a {
    text-decoration: none;
    color: var(--white);
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.menu a:hover,
.menu a.active {
    background: var(--sidebar-hover);
}

.main-content {
    flex: 1;
    padding: 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.topbar h1 {
    margin: 0;
    font-size: 1.8rem;
}

.profile-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-header-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
}

.primary-btn {
    border: none;
    background: var(--accent);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.highlight-card {
    border-left: 5px solid var(--accent);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.card ul {
    padding-left: 18px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

 .notice-toolbar {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    background: var(--white);
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    align-items: flex-start;
}

.search-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.search-box input,
.location-selectors select {
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    font-size: 0.95rem;
}

.search-box input {
    width: 100%;
}

.location-selectors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.location-selectors select {
    min-width: 140px;
    background: var(--white);
}

.search-box button,
.upload-btn {
    border: none;
    background: var(--accent);
    color: var(--white);
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.upload-card {
    background: var(--white);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.upload-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.upload-card input[type="file"] {
    display: none;
}

.hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr;
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}

.notice-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.status {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.notice-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--white);
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-btn {
    border: 2px solid #e2e8f0;
    background: var(--white);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.filter-group select {
    border: 1px solid #dbeafe;
    background: var(--white);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.directory-list {
    display: grid;
    grid-template-columns: 1fr;
}

.directory-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
}

.directory-item:last-child {
    border-bottom: none;
}

.dir-photo {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: var(--white);
    flex-shrink: 0;
}

.dir-info h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.dir-info p {
    margin: 2px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.dir-info .designation {
    color: var(--accent);
    font-weight: 600;
}

.dir-info .contact {
    font-size: 0.85rem;
    margin-top: 4px;
}

.dir-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dir-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    min-width: 110px;
    min-height: 40px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    background: rgba(59, 130, 246, 0.1);
    color: #1e293b;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.dir-actions a:hover {
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.18);
    box-shadow: 0 12px 18px rgba(15, 23, 42, 0.08);
    border-color: rgba(59, 130, 246, 0.22);
}

.dir-actions a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.dir-actions a.facebook {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.dir-actions a.mail {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.dir-actions a.whatsapp {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.dir-actions a.telegram {
    background: rgba(14, 165, 233, 0.14);
    color: #0369a1;
}

@media (max-width: 800px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn,
    .filter-group {
        width: 100%;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
    }

    .directory-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .location-selectors {
        width: 100%;
    }

    .location-selectors select {
        width: 100%;
        min-width: auto;
    }
}

.profile-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.documents-card,
.education-card,
.other-docs-card,
.office-details-card {
    margin-top: 20px;
}

.office-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.office-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fbff;
}

.office-image-box {
    height: 180px;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border: 1px dashed #93c5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
}

.document-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.education-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.document-preview {
    position: relative;
    height: 120px;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border: 1px dashed #93c5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    overflow: hidden;
}

.document-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.8);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.document-preview:hover::after {
    opacity: 1;
}

.document-preview span {
    position: relative;
    z-index: 1;
}

.download-btn {
    position: absolute;
    z-index: 2;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--accent);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
}

.document-preview:hover .download-btn {
    opacity: 1;
    transform: translateY(0);
}

.document-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .office-details-grid {
        grid-template-columns: 1fr;
    }

    .document-list,
    .education-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .document-list,
    .education-list {
        grid-template-columns: 1fr;
    }
}

.landing-page {
    min-height: 100vh;
    padding: 24px 30px 40px;
    background: linear-gradient(135deg, #eef6ff 0%, #ffffff 45%, #fff4d6 100%);
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
}

.brand h1 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--sidebar);
}

.header-actions,
.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-outline {
    color: var(--accent);
    border: 2px solid var(--accent);
    background: var(--white);
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn:hover {
    transform: translateY(-1px);
}

.large {
    padding: 12px 20px;
}

.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
}

.hero-content {
    background: rgba(255,255,255,0.8);
    padding: 28px;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-content h2 {
    font-size: 2.2rem;
    margin: 0 0 12px;
    color: var(--sidebar);
}

.hero-text {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.hero-card {
    background: linear-gradient(135deg, #102a43, #2563eb);
    color: var(--white);
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.2);
}

.hero-card h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.hero-card ul {
    padding-left: 18px;
    line-height: 1.8;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--white);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--sidebar);
}

.feature-card p {
    color: var(--muted);
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .features-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .landing-page {
        padding: 18px 16px 30px;
    }

    .landing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-content h2 {
        font-size: 1.7rem;
    }
}

.page-shell {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef4ff, #f8fbff);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--sidebar);
}

.back-btn {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

.update-container {
    padding: 30px;
}

.form-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
}

.form-intro {
    color: var(--muted);
    margin-top: -6px;
    margin-bottom: 20px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: Arial, Helvetica, sans-serif;
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fbff;
}

.form-section h3 {
    margin: 0;
    color: var(--sidebar);
}

.upload-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.upload-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px dashed #93c5fd;
    border-radius: 10px;
    background: var(--white);
}

.upload-box input[type="file"] {
    padding: 0;
    border: none;
}

.upload-box small {
    color: var(--muted);
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 1;
}

.otp-btn,
.submit-btn {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.otp-btn {
    background: #e0f2fe;
    color: #0369a1;
    padding: 10px 14px;
}

.submit-btn {
    background: var(--accent);
    color: var(--white);
    padding: 12px 16px;
    margin-top: 8px;
}

@media (max-width: 700px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .form-grid,
    .upload-row {
        grid-template-columns: 1fr;
    }

    .input-row {
        flex-direction: column;
    }

    .update-container {
        padding: 20px;
    }
}

.message-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
}

.contact-panel,
.chat-panel {
    padding: 16px;
}

.panel-header,
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.small-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 560px;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-item:hover,
.contact-item.active {
    background: #f0f7ff;
}

.contact-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: var(--white);
    font-weight: 700;
    flex-shrink: 0;
}

.contact-avatar.large {
    width: 50px;
    height: 50px;
}

.contact-info {
    flex: 1;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.contact-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #22c55e;
}

.status-dot.offline {
    background: #94a3b8;
}

.chat-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 420px;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px 4px;
}

.message {
    max-width: 75%;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.4;
}

.message.received {
    background: #f1f5f9;
    align-self: flex-start;
}

.message.sent {
    background: #2563eb;
    color: var(--white);
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
}

@media (max-width: 900px) {
    .message-layout {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        order: 2;
    }
}

.app-header {
    background: var(--white);
    border-bottom: 2px solid #e2e8f0;
    padding: 16px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.app-title {
    margin: 0;
    font-size: 1.6rem;
    color: var(--sidebar);
}

.discussion-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.post-box {
    padding: 18px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.post-user {
    display: flex;
    gap: 10px;
    align-items: center;
}

.post-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: var(--white);
}

.post-name {
    margin: 0;
    font-weight: 700;
    color: var(--text);
}

.post-time {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.post-input {
    width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 12px;
    outline: none;
}

.post-input:focus {
    border-color: var(--accent);
}

.post-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    border: 1px solid #dbeafe;
    background: var(--white);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f0f7ff;
}

.post-submit {
    border: none;
    background: var(--accent);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.post-item {
    padding: 18px;
}

.post-content {
    margin: 12px 0;
    color: var(--text);
    line-height: 1.6;
}

/* Poll page styles */
.poll-tab { padding-top: 6px; }
#optionsList .input-row { display:flex; gap:8px; margin-bottom:8px }
#optionsList .option-input { flex:1; padding:8px; border:1px solid #dbeafe; border-radius:8px }
.poll-card { display:block; }
#liveArea h4 { margin:6px 0 }
#previousList .card { padding:12px }


.post-interactions {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
}

.interaction-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.interaction-btn:hover {
    background: #f0f7ff;
    color: var(--accent);
}

.post-stats {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 8px;
}