:root {
    --bg: #000000;
    --bg-card: rgba(10, 10, 20, 0.9);
    --text: #d0d4ec;
    --text2: #4a4f70;
    --text3: #22263a;
    --accent: #d63030;
    --blue: #5b4fcf;
    --green: #1a9e7a;
    --yellow: #d4a820;
    --purple: #8c3fd6;
    --border: rgba(255, 255, 255, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== STARFIELD CANVAS ===== */
#starfield {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== HEADER ===== */
header {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    animation: headerSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes headerSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(212, 168, 32, 0.25);
    box-shadow: 0 0 12px rgba(212, 168, 32, 0.12);
    transition: transform 0.3s, box-shadow 0.3s;
    object-fit: cover;
}

.logo:hover .logo-icon {
    transform: scale(1.12) rotate(-3deg);
    box-shadow: 0 0 22px rgba(212, 168, 32, 0.3);
    border-color: rgba(212, 168, 32, 0.45);
}

.logo-text h1 {
    font-size: 16px; font-weight: 800;
    color: var(--text);
}

.logo-text span {
    font-size: 10px;
    color: var(--text3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.header-right { display: flex; align-items: center; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-info > span { font-weight: 600; font-size: 13px; }

.avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(140, 63, 214, 0.35);
    transition: border-color 0.3s, transform 0.3s;
}
.avatar:hover {
    border-color: var(--purple);
    transform: scale(1.1);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 600;
    text-decoration: none; border: none; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login {
    background: rgba(91, 79, 207, 0.1);
    color: #8570e6;
    border: 1px solid rgba(91, 79, 207, 0.18);
}
.btn-login:hover {
    background: rgba(91, 79, 207, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(91, 79, 207, 0.2);
}

.btn-login-big {
    display: inline-flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    color: white;
    padding: 16px 44px; font-size: 16px; font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(88, 101, 242, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    animation: fadeInUp 0.8s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.btn-login-big::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-login-big:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 40px rgba(88, 101, 242, 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-login-big:hover::before { opacity: 1; }
.btn-login-big:active { transform: translateY(-1px) scale(0.99); }
.btn-login-big svg {
    width: 22px; height: 22px;
    flex-shrink: 0;
}

.btn-logout {
    background: rgba(214, 48, 48, 0.07);
    color: rgba(214, 48, 48, 0.65);
    border: 1px solid rgba(214, 48, 48, 0.1);
    padding: 6px 12px; font-size: 11.5px;
}
.btn-logout:hover {
    background: rgba(214, 48, 48, 0.15);
    color: var(--accent);
}

/* ===== HERO ===== */
.hero {
    position: relative; z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    gap: 20px;
}

.hero-icon {
    width: 100px; height: 100px;
    border-radius: 50%;
    border: 1.5px solid rgba(212, 168, 32, 0.2);
    box-shadow: 0 0 30px rgba(212, 168, 32, 0.1), 0 0 60px rgba(212, 168, 32, 0.05);
    animation: heroFloat 4s ease-in-out infinite, fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    object-fit: cover;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.hero h2 {
    font-size: 40px; font-weight: 800; letter-spacing: -0.8px;
    color: var(--text);
    animation: fadeInUp 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero p {
    font-size: 16px; color: var(--text2);
    max-width: 360px; line-height: 1.5;
    animation: fadeInUp 0.7s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* ===== LAYOUT ===== */
.app-layout {
    position: relative; z-index: 5;
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
    gap: 24px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 28px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 210px;
    padding: 10px;
    background: rgba(10, 10, 20, 0.5);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: inherit;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 12px;
}

.sidebar-btn[data-action="empty"]::before { background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent); }
.sidebar-btn[data-action="promotion"]::before { background: linear-gradient(135deg, rgba(26, 158, 122, 0.1), transparent 70%); }
.sidebar-btn[data-action="dismissal"]::before { background: linear-gradient(135deg, rgba(214, 48, 48, 0.1), transparent 70%); }
.sidebar-btn[data-action="vacation"]::before { background: linear-gradient(135deg, rgba(91, 79, 207, 0.1), transparent 70%); }
.sidebar-btn[data-action="appeal"]::before { background: linear-gradient(135deg, rgba(212, 168, 32, 0.1), transparent 70%); }
.sidebar-btn[data-action="vacations-list"]::before { background: linear-gradient(135deg, rgba(140, 63, 214, 0.08), transparent 70%); }
.sidebar-btn[data-action="certificates"]::before { background: linear-gradient(135deg, rgba(232, 168, 56, 0.1), transparent 70%); }

.sidebar-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.04);
}
.sidebar-btn:hover::before { opacity: 1; }

.sidebar-btn img {
    width: 18px; height: 18px;
    opacity: 0.4;
    transition: all 0.25s;
    position: relative;
    z-index: 1;
}

.sidebar-btn span,
.sidebar-btn { position: relative; z-index: 1; }

.sidebar-btn:hover img { opacity: 0.9; filter: drop-shadow(0 0 4px rgba(255,255,255,0.15)); }

.sidebar-btn.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}
.sidebar-btn.active::before { opacity: 1; }
.sidebar-btn.active img { opacity: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,0.2)); }

.sidebar-btn[data-action="promotion"].active { border-left: 2px solid rgba(26, 158, 122, 0.5); }
.sidebar-btn[data-action="dismissal"].active { border-left: 2px solid rgba(214, 48, 48, 0.5); }
.sidebar-btn[data-action="vacation"].active { border-left: 2px solid rgba(91, 79, 207, 0.5); }
.sidebar-btn[data-action="appeal"].active { border-left: 2px solid rgba(212, 168, 32, 0.5); }
.sidebar-btn[data-action="vacations-list"].active { border-left: 2px solid rgba(140, 63, 214, 0.5); }
.sidebar-btn[data-action="certificates"].active { border-left: 2px solid rgba(232, 168, 56, 0.5); }

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 6px 8px;
}

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; min-width: 0; }

/* ===== FORM PANEL ===== */
.form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(8px);
    animation: panelIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.form-panel h3 {
    font-size: 20px; font-weight: 700;
    margin-bottom: 22px;
}

.form-panel h3.promotion { color: var(--green); }
.form-panel h3.dismissal { color: var(--accent); }
.form-panel h3.vacation { color: var(--blue); }
.form-panel h3.appeal { color: var(--yellow); }

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

.form-group label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--text2); margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%; padding: 11px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-size: 13.5px; font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text3); }

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(91, 79, 207, 0.45);
    box-shadow: 0 0 0 3px rgba(91, 79, 207, 0.06), 0 0 20px rgba(91, 79, 207, 0.05);
    background: rgba(255, 255, 255, 0.03);
}

.form-group textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

.btn-submit {
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, #4a3fb5, #6c52c7);
    color: white; border: none;
    border-radius: 10px; font-size: 14px; font-weight: 700;
    cursor: pointer; margin-top: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(74, 63, 181, 0.35);
}
.btn-submit:hover::after { opacity: 1; }
.btn-submit:active { transform: translateY(0) scale(0.98); }
.btn-submit:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 80px 20px; gap: 14px;
    opacity: 0.35; text-align: center;
}
.empty-state img { width: 52px; height: 52px; opacity: 0.3; animation: heroFloat 5s ease-in-out infinite; }
.empty-state p { color: var(--text2); font-size: 14px; }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px; border-radius: 10px;
    font-weight: 600; font-size: 13px; z-index: 200;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(16px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success {
    background: rgba(26, 158, 122, 0.12);
    border: 1px solid rgba(26, 158, 122, 0.25);
    color: var(--green);
}
.toast.error {
    background: rgba(214, 48, 48, 0.12);
    border: 1px solid rgba(214, 48, 48, 0.25);
    color: var(--accent);
}

/* ===== VACATIONS LIST ===== */
.vacations-list { display: flex; flex-direction: column; gap: 8px; }

.vacation-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
}
.vacation-item:hover { border-color: rgba(91, 79, 207, 0.2); }

.vacation-info { display: flex; flex-direction: column; gap: 2px; }
.vacation-info strong { font-size: 14px; color: var(--text); }
.vacation-info span { font-size: 12px; color: var(--text2); }



.vacation-empty {
    color: var(--text3); font-size: 13px;
    text-align: center; padding: 32px;
}

.vacation-reason {
    font-size: 11.5px; color: var(--text2);
    font-style: italic; margin-top: 2px;
}

.vacation-by {
    font-size: 11px; color: var(--text3); margin-top: 1px;
}

.vacation-actions { display: flex; align-items: center; }

.btn-vacation-cancel {
    padding: 6px 14px; border-radius: 8px;
    background: rgba(214, 48, 48, 0.1);
    border: 1px solid rgba(214, 48, 48, 0.15);
    color: rgba(214, 48, 48, 0.8);
    font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.2s;
}
.btn-vacation-cancel:hover {
    background: rgba(214, 48, 48, 0.2);
    color: var(--accent);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 500;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-card {
    background: rgba(15, 15, 30, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 380px; width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.show .modal-card {
    transform: scale(1) translateY(0);
}

.modal-icon { font-size: 36px; margin-bottom: 12px; }

.modal-card h4 {
    font-size: 18px; font-weight: 700;
    color: var(--text); margin-bottom: 8px;
}

.modal-card p {
    font-size: 13px; color: var(--text2);
    margin-bottom: 24px; line-height: 1.5;
}

.modal-buttons { display: flex; gap: 10px; }

.modal-btn {
    flex: 1; padding: 10px 16px;
    border-radius: 10px; border: none;
    font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text2);
}
.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.modal-btn-confirm {
    background: rgba(214, 48, 48, 0.15);
    border: 1px solid rgba(214, 48, 48, 0.2);
    color: var(--accent);
}
.modal-btn-confirm:hover {
    background: rgba(214, 48, 48, 0.25);
}

/* ===== CERTIFICATES ===== */
.form-panel h3.certificates { color: #e8a838; }

.cert-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
    margin-bottom: 8px;
}
.cert-item:hover { border-color: rgba(232, 168, 56, 0.2); }

.cert-info { display: flex; flex-direction: column; gap: 3px; }
.cert-info strong { font-size: 14px; color: var(--text); }
.cert-type {
    display: inline-block; font-size: 11px; font-weight: 600;
    color: #e8a838; background: rgba(232, 168, 56, 0.1);
    padding: 2px 8px; border-radius: 6px; width: fit-content;
}
.cert-date { font-size: 12px; color: var(--text2); }
.cert-desc { font-size: 12px; color: var(--text2); font-style: italic; }
.cert-by { font-size: 11px; color: var(--text3); }

.cert-actions { display: flex; align-items: center; }

.btn-cert-delete {
    padding: 6px 14px; border-radius: 8px;
    background: rgba(214, 48, 48, 0.1);
    border: 1px solid rgba(214, 48, 48, 0.15);
    color: rgba(214, 48, 48, 0.8);
    font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.2s;
}
.btn-cert-delete:hover {
    background: rgba(214, 48, 48, 0.2);
    color: var(--accent);
}

.certs-items { display: flex; flex-direction: column; gap: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-layout { flex-direction: column; padding: 16px; }
    .sidebar {
        position: static; flex-direction: row;
        overflow-x: auto; gap: 5px; min-width: 0;
        padding: 8px;
        border-radius: 14px;
    }
    .sidebar-btn { white-space: nowrap; padding: 10px 14px; font-size: 12px; }
    .sidebar-btn.active { border-left: none; border-bottom: 2px solid rgba(91, 79, 207, 0.5); }
    .sidebar-btn img { width: 16px; height: 16px; }
    .sidebar-divider { display: none; }
    .hero h2 { font-size: 28px; }
    .hero-icon { width: 72px; height: 72px; }
    .form-panel { padding: 20px; }
    .header-inner { height: 52px; }
    .logo-text h1 { font-size: 14px; }
    .logo-icon { width: 28px; height: 28px; }
}
