/* ============================================
   Artemis Xair - Main Stylesheet
   PHP 5.5 compatible (no build tools)
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    color: #1e293b;
    background: #f8fafc;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.footer-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.logo-text {
    font-style: italic;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}

.nav-link.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    border-radius: 8px 8px 0 0;
}

.nav-disabled {
    color: #94a3b8 !important;
    cursor: default;
}

.nav-disabled:hover {
    background: transparent !important;
}

.badge-soon {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.65rem;
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    vertical-align: middle;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 40px 0 32px;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.footer-logo .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-links-group {
    text-align: center;
}

.footer-links-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #64748b;
    font-size: 0.875rem;
}

.footer-nav a:hover {
    color: #3b82f6;
}

.footer-copy {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d1b4e 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    padding: 80px 24px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Slideshow */
.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    -webkit-transition: opacity 1s ease-in-out;
    transition: opacity 1s ease-in-out;
}

.hero-slide-active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: #93c5fd;
    margin-bottom: 8px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.hero-title em {
    color: #60a5fa;
    font-style: italic;
}

.hero-desc {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
    line-height: 1.5;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
    color: #fff;
}

.btn-outline {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-white {
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-white:hover {
    background: #f8fafc;
}

.btn-discord {
    background: #5865f2;
    color: #fff;
}

.btn-discord:hover {
    background: #4752c4;
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-danger {
    background: #fff;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fef2f2;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-agree {
    background: #94a3b8;
    color: #fff;
    padding: 10px 32px;
}

.btn-agree.enabled {
    background: #3b82f6;
}

.btn-agree.enabled:hover {
    background: #2563eb;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-blue {
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border-color: #bfdbfe;
}

/* ============================================
   Home Page Sections
   ============================================ */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding: 48px 0;
}

.home-main {
    min-width: 0;
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Info section */
.info-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.8;
}

.info-text a {
    color: #3b82f6;
    font-weight: 500;
}

/* News */
.news-list {
    list-style: none;
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: flex-start;
}

.news-item:last-child {
    border-bottom: none;
}

.news-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

.news-date {
    color: #3b82f6;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.news-content {
    color: #475569;
    font-size: 0.9rem;
}

/* Server Status sidebar */
.sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sidebar-title-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.status-name {
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    color: #94a3b8;
    font-size: 0.8rem;
}

.status-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
}

.status-online {
    background: #ecfdf5;
    color: #059669;
}

.status-online::before {
    content: '● ';
    font-size: 0.6rem;
}

.status-offline {
    background: #fef2f2;
    color: #dc2626;
}

.status-offline::before {
    content: '● ';
    font-size: 0.6rem;
}

/* Recruit banner */
.recruit-banner {
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.recruit-banner h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.recruit-banner p {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 16px;
}

/* Community link */
.community-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.community-icon {
    width: 36px;
    height: 36px;
    background: #5865f2;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.community-icon-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.community-text strong {
    display: block;
    font-size: 0.9rem;
}

.community-text span {
    font-size: 0.75rem;
    color: #64748b;
}

/* Reference link */
.reference-link {
    display: block;
    color: #475569;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.reference-link:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.reference-link:first-of-type {
    padding-top: 0;
}

.reference-link:hover {
    color: #3b82f6;
}

/* Welcome section */
.welcome-section {
    padding: 48px 0;
}

.welcome-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.welcome-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.welcome-title .section-icon {
    background: #fef3c7;
    color: #d97706;
}

.welcome-text {
    color: #475569;
    line-height: 2;
    font-size: 0.95rem;
}

.welcome-note {
    margin-top: 24px;
    padding: 16px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #d97706;
    font-size: 0.9rem;
}

/* ============================================
   Page Header (for subpages)
   ============================================ */
.page-header {
    padding: 48px 0 24px;
}

.page-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* ============================================
   Spec Page
   ============================================ */
.spec-section {
    margin-bottom: 32px;
}

.spec-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.spec-category {
    margin-bottom: 4px;
}

.spec-category-name {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 0 4px 12px;
    border-left: 3px solid #3b82f6;
    margin-bottom: 4px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.spec-table td {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.spec-table td:first-child {
    color: #64748b;
    width: 35%;
    white-space: nowrap;
}

.spec-table td:last-child {
    text-align: right;
}

/* NPC table (3 columns) */
.npc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.npc-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.npc-table td {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

/* Command table (2 columns) */
.cmd-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.cmd-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.cmd-table td {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.cmd-table td:first-child {
    font-family: monospace;
    color: #6366f1;
    white-space: nowrap;
}

/* ============================================
   Install / Rules Page
   ============================================ */
.rules-section {
    padding-bottom: 48px;
}

.rule-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: flex-start;
}

.rule-number {
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 28px;
    flex-shrink: 0;
}

.rule-text {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.7;
}

.rules-footer-note {
    margin-top: 24px;
    padding: 20px 24px;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.8;
}

.agree-section {
    text-align: left;
    padding: 32px;
}

.agree-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.agree-section p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.agree-checkbox {
    margin: 20px 0;
}

.agree-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.agree-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-section {
    padding-bottom: 48px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-icon-discord {
    background: #5865f2;
    color: #fff;
}

.contact-icon-mail {
    background: #eff6ff;
    color: #3b82f6;
}

.contact-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.contact-notes {
    margin-top: 16px;
    padding: 20px 24px;
    background: #f8fafc;
    border-radius: 12px;
}

.contact-note-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.875rem;
    color: #64748b;
    align-items: flex-start;
}

.contact-note-icon {
    color: #94a3b8;
    flex-shrink: 0;
    margin-top: 2px;
}

.email-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 0.9rem;
    margin-top: 8px;
}

.discord-btn-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.discord-username {
    color: #64748b;
    font-size: 0.9rem;
}

/* ============================================
   Download Page
   ============================================ */
.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 14px;
    transition: border-color 0.15s;
}

.download-item:hover {
    border-color: #93c5fd;
}

.download-item-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.download-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.download-icon-main {
    background: #eff6ff;
    color: #3b82f6;
}

.download-icon-mirror {
    background: #f0fdf4;
    color: #16a34a;
}

.download-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.download-info p {
    font-size: 0.8rem;
    color: #64748b;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.install-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.install-step:last-child {
    border-bottom: none;
}

.step-number {
    color: #3b82f6;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 32px;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.875rem;
    color: #64748b;
}

.step-note {
    margin-top: 8px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ============================================
   Recruit Page
   ============================================ */
.recruit-section {
    padding-bottom: 48px;
}

.common-qual {
    padding: 24px 28px;
}

.common-qual h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.common-qual-icon {
    width: 32px;
    height: 32px;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.common-qual p {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.qual-list {
    list-style: none;
}

.qual-list li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qual-check {
    color: #3b82f6;
    font-size: 0.8rem;
}

/* Position card */
.position-card {
    padding: 28px 32px;
}

.position-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.position-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.position-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    padding: 2px 10px;
    border-radius: 20px;
}

.position-detail {
    display: flex;
    gap: 16px;
    padding: 6px 0;
    font-size: 0.875rem;
}

.position-label {
    color: #64748b;
    min-width: 70px;
    flex-shrink: 0;
    font-weight: 500;
}

.position-value {
    color: #334155;
}

.position-value ul {
    list-style: disc;
    padding-left: 16px;
}

.position-value li {
    padding: 2px 0;
}

/* Apply section */
.apply-section {
    background: linear-gradient(135deg, #1e3a5f, #2d1b4e);
    border-radius: 20px;
    padding: 32px;
    color: #fff;
    margin-top: 16px;
}

.apply-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.apply-section p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.apply-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ============================================
   Staff Page
   ============================================ */
.staff-notice {
    margin-top: 20px;
    padding: 16px 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1d4ed8;
    font-size: 0.9rem;
    line-height: 1.8;
}

.staff-index-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-index-list li::before {
    content: '・';
    color: #3b82f6;
}

.staff-index-list a {
    color: #3b82f6;
    font-size: 0.9rem;
}

.staff-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.staff-empty {
    color: #94a3b8;
    font-size: 0.9rem;
}

.staff-profile-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.staff-profile-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 10px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.staff-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.staff-profile-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.staff-profile-body {
    display: flex;
    gap: 24px;
    padding: 20px 24px;
    align-items: flex-start;
}

.staff-profile-image {
    flex-shrink: 0;
    width: 120px;
}

.staff-profile-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.staff-no-image {
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.staff-profile-table {
    flex: 1;
    border-collapse: collapse;
    width: 100%;
}

.staff-profile-table th {
    text-align: right;
    padding: 6px 16px 6px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    vertical-align: top;
    width: 130px;
}

.staff-profile-table td {
    padding: 6px 0;
    font-size: 0.85rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.staff-highlight {
    color: #2563eb !important;
}

@media (max-width: 600px) {
    .staff-profile-body {
        flex-direction: column;
        align-items: center;
    }
    .staff-profile-table th {
        text-align: left;
    }
}

/* ============================================
   Admin Layout
   ============================================ */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px - 100px);
}

.admin-sidebar {
    width: 200px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    padding: 0 20px 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 8px;
}

.sidebar-title strong {
    display: block;
    font-size: 1rem;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sidebar-nav {
    padding: 8px 12px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #475569;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: background 0.15s;
    text-decoration: none;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.sidebar-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-link {
    color: #94a3b8;
    font-size: 0.8rem;
}

.admin-main {
    flex: 1;
    padding: 32px 40px;
    min-width: 0;
}

.admin-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   Admin Cards & Forms
   ============================================ */
.admin-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.admin-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-row .form-input {
    flex: 1;
}

/* News items in admin */
.news-admin-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
}

.news-admin-content {
    flex: 1;
}

.news-admin-date {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.news-admin-text {
    font-size: 0.85rem;
    color: #64748b;
}

.news-admin-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
    flex-shrink: 0;
}

.link-edit {
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.link-delete {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

/* Spec admin */
.spec-admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-admin-item td {
    padding: 8px 0;
}

/* Rules admin */
.rule-admin-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.rule-admin-number {
    color: #3b82f6;
    font-weight: 700;
    min-width: 28px;
    margin-right: 12px;
}

.rule-admin-text {
    flex: 1;
    font-size: 0.9rem;
    color: #334155;
}

.rule-admin-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
    flex-shrink: 0;
}

/* Recruit admin */
.position-admin-card {
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
}

.position-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.position-admin-title {
    font-weight: 700;
    font-size: 1rem;
}

.position-admin-detail {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.7;
}

.position-admin-detail strong {
    color: #475569;
}

/* ============================================
   Login Page
   ============================================ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px - 100px);
    padding: 48px 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.login-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.login-card p {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* ============================================
   Flash Messages
   ============================================ */
.flash-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ============================================
   Modal / Edit Forms (inline)
   ============================================ */
.edit-form-inline {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.edit-form-inline h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ============================================
   Rich Text Editor
   ============================================ */
.rte-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    flex-wrap: wrap;
}

.rte-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #475569;
    padding: 0;
}

.rte-toolbar button:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.rte-toolbar select {
    height: 30px;
    padding: 0 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.rte-sep {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 4px;
}

.rte-editor {
    min-height: 120px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
    background: #fff;
    font-size: 0.95rem;
    line-height: 1.7;
    outline: none;
    color: #1e293b;
}

.rte-editor:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.rte-editor a {
    color: #3b82f6;
    text-decoration: underline;
}

/* ============================================
   Drag & Drop Sortable
   ============================================ */
.sortable-item {
    cursor: default;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.sort-handle {
    cursor: grab;
    color: #94a3b8;
    font-size: 1.1rem;
    padding: 0 8px;
    user-select: none;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.sort-handle:active {
    cursor: grabbing;
}

.sort-handle:hover {
    color: #475569;
}

.sortable-ghost {
    opacity: 0.4;
    background: #dbeafe !important;
    border-radius: 10px;
}

.sortable-chosen {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    background: #fff;
    border-radius: 10px;
}

.sortable-drag {
    opacity: 0.9;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }

    .header-inner {
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 20px;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .admin-main {
        padding: 24px 16px;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}
