/* === 全局變數 (Midnight Blue Theme) === */
:root {
    --bg-dark: #05080f;       /* 深午夜藍背景 */
    --card-bg: #101623;       /* 卡片背景 */
    --sidebar-bg: #0b0f19;    /* 側邊欄背景 */
    --accent-green: #3ba55d;  /* 軍綠色 */
    --accent-red: #ef4444;    /* 危險操作色 */
    --accent-gold: #d9822b;   /* 金色 (Owner/VIP) */
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --border-color: #1e2639;
    --nav-bg: rgba(5, 8, 15, 0.95);
    --accent-blue: #60a5fa;
}

body {
    margin: 0;
    font-family: 'Segoe UI', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 100vh = 100% of Viewport Height */
    margin: 0;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* === 導航欄 Navbar === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 70px;
    background-color: var(--nav-bg);
    position: fixed;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex; align-items: center; gap: 12px;
    font-weight: 800; font-size: 1.2rem; letter-spacing: 1px; color: white;
}

.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); text-shadow: 0 0 10px rgba(59, 165, 93, 0.5); }

.staff-login-btn {
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
}
.staff-login-btn:hover { background: var(--accent-green); color: white; }

/* === 頁面通用設定 === */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(5, 8, 15, 0.7), rgba(5, 8, 15, 0.7)), url('https://tr.rbxcdn.com/53704253163473177656683526788884/768/432/Image/Png');
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 900; }
.hero-content p { font-size: 1.2rem; color: #ccc; margin-bottom: 30px; }
.cta-btn { background: var(--accent-green); color: white; padding: 15px 40px; border-radius: 6px; font-weight: bold; }

.page-container { padding: 120px 10% 50px; min-height: 80vh; }
.section-title { font-size: 2rem; margin-bottom: 10px; border-left: 4px solid var(--accent-green); padding-left: 15px; }
.section-desc { color: var(--text-muted); margin-bottom: 40px; }

/* === 卡片系統 === */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}
.card:hover { border-color: var(--accent-green); transform: translateY(-5px); }
.card img { width: 80px; height: 80px; border-radius: 50%; border: 2px solid var(--accent-green); margin-bottom: 15px; }

/* === Dashboard 專用 === */
.dash-layout { display: flex; height: 100vh; background: var(--bg-dark); }
.dash-sidebar { width: 260px; background: var(--sidebar-bg); border-right: 1px solid var(--border-color); padding: 30px 20px; display: flex; flex-direction: column; }
.dash-logo { font-size: 1.1rem; font-weight: bold; color: white; margin-bottom: 40px; letter-spacing: 2px; text-align: center; }
.dash-menu-btn { background: transparent; border: none; color: var(--text-muted); padding: 12px; text-align: left; font-size: 0.95rem; cursor: pointer; border-radius: 8px; margin-bottom: 5px; display: flex; align-items: center; gap: 12px; width: 100%; }
.dash-menu-btn:hover, .dash-menu-btn.active { background: rgba(255,255,255,0.05); color: white; }
.dash-content { flex: 1; padding: 50px; overflow-y: auto; }

/* 權限按鈕 */
.permission-btn {
    display: none; /* JS 控制顯示 */
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    border-left-width: 5px;
    cursor: pointer;
    transition: 0.3s;
}
.permission-btn:hover { background: #1a2332; }
.permission-btn h3 { margin: 0 0 5px; font-size: 1.1rem; color: white; }
.permission-btn p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

/* Login */
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-dark); }
.login-box { width: 350px; padding: 40px; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border-color); text-align: center; }
.login-input { width: 100%; padding: 12px; margin: 10px 0; background: #0b0f19; border: 1px solid var(--border-color); color: white; border-radius: 6px; box-sizing: border-box; }
.login-submit { width: 100%; padding: 12px; background: var(--accent-green); color: white; border: none; font-weight: bold; border-radius: 6px; cursor: pointer; margin-top: 10px; }

/* === FOOTER STYLES === */
.site-footer {
    background-color: #0b0f19; /* Same dark tone as Navbar */
    border-top: 1px solid var(--border-color);
    padding: 60px 10% 20px;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.footer-col h4 {
    color: var(--accent-green);
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent-green);
    padding-left: 5px; /* Slight movement effect */
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #1a2332;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: #4b5563;
    font-size: 0.8rem;
}

/* === SPECIAL PROFILE CARD STYLES === */
.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0; /* Remove padding to let banner fit */
    text-align: center;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
}

.profile-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Optional Banner Effect behind head */
.card-banner {
    height: 80px;
    background: linear-gradient(45deg, #1a1a1a, #333);
    border-bottom: 1px solid var(--border-color);
}

.profile-img-container {
    margin-top: -50px; /* Pull image up into banner */
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--card-bg); /* Creates a cutout effect */
    background: #000;
    object-fit: cover;
}

.crown-icon {
    position: absolute;
    bottom: 5px;
    right: 0;
    background: var(--accent-gold);
    color: #1a1a1a;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: 3px solid var(--card-bg);
}

.profile-body {
    padding: 15px 25px 30px;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 10px 0 5px;
    color: white;
}

.rank-badge-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Colors for ranks */
.gold-badge { background: rgba(217, 130, 43, 0.15); color: var(--accent-gold); border: 1px solid var(--accent-gold); }
.red-badge { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid var(--accent-red); }

.profile-role { color: #888; font-size: 0.9rem; font-style: italic; margin-bottom: 15px; }

.divider { border: 0; border-top: 1px solid #333; margin: 15px 0; }

.profile-bio { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

.social-btn {
    margin-top: 15px;
    background: transparent;
    border: 1px solid #333;
    color: #ccc;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
}
.social-btn:hover { border-color: white; color: white; }

/* Add this to style.css for the Special Thanks badge color */
.purple-badge { 
    background: rgba(168, 85, 247, 0.15); 
    color: #a855f7; 
    border: 1px solid #a855f7; 
}

/* === GAMEPASS CARD STYLES === */
.gamepass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.gamepass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.pass-header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Gradients for different passes */
.bg-gold { background: linear-gradient(135deg, #b45309, #f59e0b); }
.bg-blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.bg-green { background: linear-gradient(135deg, #14532d, #22c55e); }

.pass-icon-box {
    width: 80px;
    height: 80px;
    background: #111;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--card-bg);
    position: absolute;
    bottom: -40px; /* Pulls icon half down */
    font-size: 2.5rem;
    color: white;
}

.pass-body {
    padding: 50px 25px 25px; /* Top padding clears the icon */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pass-title { font-size: 1.3rem; margin: 0; color: white; font-weight: bold; }
.pass-price { font-size: 1.5rem; font-weight: 800; color: var(--accent-green); margin: 10px 0; }

.pass-benefits {
    list-style: none;
    padding: 0;
    margin: 15px 0 auto; /* Auto margin pushes button to bottom */
    text-align: left;
}

.pass-benefits li {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pass-benefits li i { color: var(--accent-green); }

.buy-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    margin-top: 20px;
}

/* Button variants */
.btn-gold { background: #f59e0b; color: #000; }
.btn-blue { background: #3b82f6; color: white; }
.btn-green { background: #22c55e; color: #000; }
.buy-btn:hover { filter: brightness(1.1); transform: scale(1.02); }

/* === CAREER CARD STYLES === */
.career-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px; /* Ensures all cards are same height */
}

.career-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.job-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.job-icon {
    width: 50px;
    height: 50px;
    background: #1f2937;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    border: 1px solid var(--border-color);
}

.job-info h3 { margin: 0; font-size: 1.2rem; color: white; }
.job-info span { font-size: 0.85rem; color: var(--accent-green); font-weight: bold; }

.job-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.job-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #ccc;
}

.apply-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apply-btn:hover {
    background: var(--accent-green);
    color: white;
}

/* === LOGIN PAGE STYLES === */
.login-wrapper {
    min-height: 80vh; /* Takes up most of the screen */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(circle at center, #101623 0%, #05080f 100%);
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Optional top accent line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-green);
}

.login-header h2 { margin-bottom: 5px; color: white; font-size: 1.8rem; }
.login-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-label {
    display: block;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
    transition: 0.3s;
}

.login-input {
    width: 100%;
    padding: 12px 12px 12px 45px; /* Left padding for icon */
    background: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: 0.3s;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: var(--accent-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 165, 93, 0.1);
}

.login-input:focus + i {
    color: var(--accent-green);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.login-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 165, 93, 0.3);
}

.back-link {
    display: block;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.back-link:hover { color: white; text-decoration: underline; }

/* MODAL STYLES - Force on top */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 10000 !important; /* Force on top of everything */
    backdrop-filter: blur(3px); /* Nice blur effect */
}

.modal-card {
    background: #161b22;
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    border: 1px solid #30363d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header h2 { margin: 0 0 10px 0; color: white; }
.modal-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 25px; }

/* Re-using input styles from Login, but adding Textarea support */
.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; color: #ccc; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; }

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    background: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--accent-green);
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: #ccc;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-post {
    background: var(--accent-green);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel:hover { background: #333; }
.btn-post:hover { filter: brightness(1.1); }

/* Career Status Styles */
.career-card.closed {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.apply-btn.btn-closed {
    background: #333 !important;
    border-color: #444 !important;
    color: #888 !important;
    cursor: not-allowed;
    pointer-events: none; /* Makes the link unclickable */
}

/* === FIX: Center the No Positions Message === */
.no-careers-msg {
    /* 1. FORCE FULL WIDTH IN GRID */
    grid-column: 1 / -1;       /* This tells it to span from the first line to the last */
    width: 100%;               /* Ensures it takes up all available space */
    
    /* 2. CENTER THE CONTENT */
    display: flex;             /* Use Flexbox */
    flex-direction: column;    /* Stack Icon and Text vertically */
    align-items: center;       /* Center items horizontally */
    justify-content: center;   /* Center items vertically */
    text-align: center;        /* Ensure text lines are centered */
    
    /* 3. STYLING */
    padding: 60px 20px;        /* Add breathing room top/bottom */
    background: transparent;   /* Or var(--card-bg) if you want a box look */
    color: var(--text-muted);
    box-sizing: border-box;    /* Prevents padding from breaking width */
}

/* --- PERMISSION BUTTONS (The big dashboard buttons) --- */
.permission-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid transparent; /* Color set inline in HTML */
    padding: 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.permission-btn:hover {
    background: #21262d;
    transform: translateY(-4px);
}

.permission-btn h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.permission-btn p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); /* Darkens background */
    display: none; /* Hidden by default */
    align-items: center; justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px); /* Nice blur effect */
}

.modal-card {
    background: #161b22; /* Card Dark Background */
    border: 1px solid #30363d;
    width: 500px;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    animation: fadeIn 0.2s ease-out;
}
.modal-card.wide { width: 650px; }

/* Header & Close Button */
.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 24px; 
    border-bottom: 1px solid #30363d;
    padding-bottom: 16px;
}

.modal-header h2 { margin: 0; font-size: 1.25rem; color: #ffffff; }

.close-x { 
    background: transparent; 
    border: none; 
    color: #8b949e; 
    font-size: 1.5rem; 
    cursor: pointer; 
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}
.close-x:hover { background: rgba(255,255,255,0.1); color: white; }

/* --- FORM STYLING (The Fix) --- */
.form-group { margin-bottom: 16px; }

/* Side-by-side layout for Dept & Type */
.form-row { 
    display: flex; 
    gap: 16px; 
    width: 100%;
}
.form-row .form-group { flex: 1; } /* Makes them equal width */

label { 
    display: block; 
    margin-bottom: 8px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #8b949e; 
}

/* INPUTS, SELECTS, TEXTAREAS */
input[type="text"], 
select, 
textarea {
    width: 100%;
    background-color: #0d1117; /* Very dark inner background */
    border: 1px solid #30363d;
    color: #e6edf3; /* White text */
    padding: 10px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    box-sizing: border-box; /* IMPORTANT: Fixes width overflow */
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus State (Blue Glow) */
input[type="text"]:focus, 
select:focus, 
textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

/* Placeholder Color */
::placeholder { color: #484f58; opacity: 1; }

/* Footer Buttons */
.modal-footer {
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #30363d;
}

.btn-create {
    background: #238636; /* Green */
    color: white;
    border: 1px solid rgba(240, 246, 252, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-create:hover { background: #2ea043; }

.btn-cancel {
    background: #21262d; /* Dark Grey */
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cancel:hover { background: #30363d; color: white; }

/* Animation for smooth opening */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fix the resizing issue */
textarea {
    resize: vertical; /* Allows changing height, but locks the width */
    min-height: 80px; /* Optional: Stops it from becoming too small */
    max-height: 300px; /* Optional: Stops it from becoming too tall */
}

/* INPUTS, SELECTS, TEXTAREAS */
input[type="text"], 
input[type="password"],  /* <--- I ADDED THIS LINE */
select, 
textarea {
    width: 100%;
    background-color: #0d1117; 
    border: 1px solid #30363d;
    color: #e6edf3;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    box-sizing: border-box; 
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Update Focus State as well */
input[type="text"]:focus, 
input[type="password"]:focus, /* <--- AND THIS LINE */
select:focus, 
textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

/* --- INPUTS WITH ICONS --- */
.input-icon-wrap {
    position: relative; /* Creates the boundary for the icon */
    width: 100%;
}

.input-icon-wrap i {
    position: absolute;
    left: 14px;            
    top: 50%;
    transform: translateY(-50%); 
    color: #8b949e;        
    pointer-events: none; 
    font-size: 1rem;
    z-index: 10;
}

.input-icon-wrap input {
    padding-left: 42px; /* Pushes text to the right so it doesn't hit the icon */
}

/* --- DASHBOARD GRID & CARDS --- */
.grid-3 {
    display: grid;
    /* This creates responsive columns that are at least 300px wide */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* The Card Itself */
.manage-card {
    background: #161b22; /* Dark card background */
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.manage-card:hover {
    border-color: #8b949e;
}

/* Card Header (Icon + Status) */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.icon-box {
    width: 40px;
    height: 40px;
    background: #21262d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #e6edf3;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}
.status-badge.open { background: rgba(35, 134, 54, 0.2); color: #3fb950; border: 1px solid rgba(35, 134, 54, 0.5); }
.status-badge.closed { background: rgba(248, 81, 73, 0.2); color: #f85149; border: 1px solid rgba(248, 81, 73, 0.5); }

/* Card Text */
.manage-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #ffffff;
}

/* Divider Line */
.card-divider {
    height: 1px;
    background: #30363d;
    margin: 15px 0;
}

/* Footer Buttons */
.card-footer {
    display: flex;
    gap: 8px;
    margin-top: auto; /* Pushes buttons to the bottom */
}

/* Small Buttons in Card */
.btn-edit, .btn-icon {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #30363d;
    background: #21262d;
    color: #c9d1d9;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-edit:hover { background: #30363d; color: white; }

.btn-icon.delete:hover {
    background: #da3633;
    border-color: #da3633;
    color: white;
}

/* Public Career Page Grid */
.career-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.career-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    color: white;
}

.apply-btn {
    display: inline-block;
    margin-top: 15px;
    background: #238636;
    color: white;
    padding: 8px 1px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}
.apply-btn:hover { background: #2ea043; }

/* style.css */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center; /* Centers the box */
    align-items: center;     /* Centers the box */
    z-index: 1000;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1; /* Makes them equal width */
}

/* Style for the Closed Button */
.btn-disabled {
    display: inline-block;
    margin-top: 15px;
    background: #484f58; /* Gray color */
    color: #8b949e;       /* Light gray text */
    padding: 8px 1px;
    border-radius: 6px;
    font-weight: bold;
    cursor: not-allowed;  /* Shows a 'stop' symbol on mouse hover */
    pointer-events: none; /* Prevents clicking completely */
    text-align: center;
}

/* === FIX: Switch layout when empty === */
#career-grid.empty-state {
    display: flex !important;       /* Overrides 'display: grid' */
    flex-direction: column;
    align-items: center;            /* Centers horizontally */
    justify-content: center;        /* Centers vertically */
    width: 100%;
    min-height: 300px;              /* Gives it some vertical breathing room */
}

.form-group input[type="checkbox"] {
    accent-color: var(--accent-green);
    transform: scale(1.2);
}

.btn-create-announcement {
    background-color: #4ade80; /* Brighter green like the image */
    color: #000;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-create-announcement:hover {
    background-color: #22c55e;
}

/* Homepage News Card styling */
.news-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.news-card.pinned {
    border-left: 4px solid var(--accent-gold);
}

.badge {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.date {
    color: #8b949e;
    font-size: 0.85rem;
}

/* Announcement Section Layout */
.announcement-section {
    padding: 60px 20px; /* Vertical padding 60px, Horizontal padding 20px */
    background: #0d1117;
}

.announcement-section .container {
    max-width: 900px; /* Prevents cards from being too long */
    margin: 0 auto;   /* Centers the section */
}

.section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: left;
}

/* The News Card Styling */
.news-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    transition: transform 0.2s ease;
}

.news-card:hover {
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.news-card .badge {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.news-card .date {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #8b949e;
    font-size: 0.85rem;
}

.news-card h3 {
    margin-top: 15px;
    color: white;
    font-size: 1.4rem;
}

.news-card p {
    color: #c9d1d9;
    line-height: 1.6;
    margin-top: 10px;
}

.sidebar-status-area {
    padding: 0 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 10px;
}

.side-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #4b5563;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.side-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.side-item i {
    width: 15px;
    font-size: 0.8rem;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: auto;
}

.dot.open { background-color: var(--accent-green); box-shadow: 0 0 5px var(--accent-green); }
.dot.closed { background-color: #ef4444; }

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #8b949e;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.stat-card h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #8b949e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    margin: 5px 0 0 0;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

/* --- SIDEBAR CENTERING FIX --- */
.sidebar {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers all items horizontally */
    text-align: center;  /* Centers the text */
}

.menu-label {
    width: 100%;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #8b949e;
    letter-spacing: 1px;
}

/* The containers for your lists */
#side-career-list, 
#side-announce-list {
    width: 90%;  /* Make them almost full width */
    display: flex;
    flex-direction: column;
    gap: 8px;    /* Space between items */
}

/* The style for the individual cards generated by JS */
.mini-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px;
    width: 100%;          /* Fill the container */
    box-sizing: border-box; /* Prevents padding from breaking width */
    display: flex;
    flex-direction: column;
    align-items: center;  /* Center content inside the card */
    text-align: center;
}