@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

:root {
    --bg: #0a0514;
    --acc: #8a2be2;
    --glow: 0 0 20px rgba(138, 43, 226, 0.7);
    --txt: #e0e2e4;
    --pnl: rgba(15, 10, 30, 0.98);
    --brd: 1px solid #553b82;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--acc) var(--bg); }
body, html { margin: 0; padding: 0; height: 100%; background: var(--bg); font-family: 'Montserrat', sans-serif; color: var(--txt); font-size: 15px; overflow: hidden; }

.navbar { position: fixed; top: 0; left: 0; width: 100%; height: 70px; background: #0a0514; border-bottom: 2px solid var(--acc); z-index: 2000; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; box-shadow: var(--glow); }
.nav-brand { font-family: 'Cinzel', serif; font-size: 24px; color: #d4afff; font-weight: bold; letter-spacing: 2px; display: flex; align-items: center; gap: 15px; }
.nav-logo { height: 45px; filter: drop-shadow(0 0 5px var(--acc)); }

.sidebar { position: absolute; top: 90px; left: 20px; width: 250px; height: calc(100% - 110px); background: var(--pnl); border-radius: 12px; border: var(--brd); display: flex; flex-direction: column; backdrop-filter: blur(15px); }
.sidebar h3 { font-family: 'Cinzel', serif; margin: 0; padding: 20px; font-size: 18px; color: #d4afff; border-bottom: 1px solid #332152; text-align: center; }
.sidebar-nav { flex-grow: 1; display: flex; flex-direction: column; }
.nav-item { padding: 15px 25px; color: var(--txt); text-decoration: none; border-bottom: 1px solid rgba(85,59,130,0.1); transition: 0.3s; display: flex; align-items: center; gap: 12px; font-weight: 500; }
.nav-item:hover, .nav-item.active { background: rgba(138, 43, 226, 0.2); color: #d4afff; border-left: 5px solid var(--acc); }
.nav-logout { margin-top: auto; color: #ff3333; border-top: 1px solid #332152; border-bottom: none; border-radius: 0 0 12px 12px; }

.main-content {
    margin-left: 300px;
    margin-top: 90px;
    padding: 20px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    max-width: none; 
    width: calc(100% - 300px);
}
.m-card {
    width: 100%;
    background: var(--pnl);
    border: var(--brd);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.m-card h2 { font-family: 'Cinzel', serif; font-size: 20px; color: #d4afff; margin: 0 0 20px 0; border-bottom: 1px solid #332152; padding-bottom: 12px; }

input, select, textarea, button { width: 100%; padding: 12px; margin: 10px 0; background: rgba(0,0,0,0.6); border: var(--brd); color: white; border-radius: 8px; font-size: 15px; outline: none; transition: 0.3s; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: var(--glow); }

textarea { resize: none; font-family: 'Montserrat', sans-serif; overflow-y: auto; }

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23d4afff' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: calc(100% - 12px);
    background-position-y: center;
    padding-right: 40px;
    cursor: pointer;
}
select option { background: #0f0a1e; color: #d4afff; font-weight: bold; padding: 10px; }

input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

button { cursor: pointer; font-weight: 600; color: #d4afff; border: 1px solid var(--acc); background: transparent; text-transform: uppercase; letter-spacing: 1px; }
button:hover { background: var(--acc); color: white; box-shadow: var(--glow); }
.btn-red { border-color: #ff3333; color: #ff3333; }
.btn-red:hover { background: #ff3333; }
.btn-sm { padding: 6px 12px; width: auto; font-size: 12px; margin: 2px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: #a64dff; padding: 15px; border-bottom: 2px solid #332152; font-family: 'Cinzel', serif; font-size: 14px; }
td { padding: 15px; border-bottom: 1px solid rgba(85,59,130,0.1); vertical-align: middle; }

.av-nav { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--acc); object-fit: cover; }
.av-tiny { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--acc); object-fit: cover; vertical-align: middle; margin-right: 5px; }
.av-big { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--acc); object-fit: cover; margin-bottom: 20px; box-shadow: var(--glow); }

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #332152;
    padding-bottom: 15px;
}
.dashboard-controls h2 { border-bottom: none !important; margin: 0 !important; padding: 0 !important; }
.tf-select { width: 250px; margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mini-card { background: var(--pnl); border: var(--brd); border-radius: 12px; padding: 20px; text-align: center; }
.mini-card small { color: #a64dff; text-transform: uppercase; font-size: 12px; }
.mini-card .val { display: block; font-size: 22px; font-weight: bold; margin-top: 5px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.page-link { padding: 8px 15px; background: rgba(0,0,0,0.6); border: var(--brd); color: #d4afff; text-decoration: none; border-radius: 8px; transition: 0.3s; font-weight: bold; }
.page-link:hover, .page-link.active { background: var(--acc); color: white; box-shadow: var(--glow); }

.status-dot { height: 12px; width: 12px; border-radius: 50%; display: inline-block; margin-right: 10px; }
.dot-red { background: #ff3333; box-shadow: 0 0 12px #ff3333; }
.dot-green { background: #00ff00; box-shadow: 0 0 12px #00ff00; }
.dot-yellow { background: #ffff00; box-shadow: 0 0 12px #ffff00; }
.dot-orange { background: #ff8000; box-shadow: 0 0 12px #ff8000; }

.badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; border: 1px solid; background: rgba(0,0,0,0.3); }
.b-red { color: #ff3333; border-color: #ff3333; }
.b-green { color: #00ff00; border-color: #00ff00; }
.b-yellow { color: #ffff00; border-color: #ffff00; }
.b-orange { color: #ff8000; border-color: #ff8000; }

.search-input {
    margin-bottom: 20px;
    border-color: var(--acc);
    width: 100%;
    max-width: 400px;
    background: rgba(138,43,226,0.05);
}
.live-sum { font-size: 22px; font-weight: bold; color: #ba68c8; text-align: right; margin: 15px 0; }

.swal2-container { z-index: 99999 !important; }

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    object-fit: cover; 
    filter: brightness(0.3); 
}

.login-logo {
    display: block;
    margin: 0 auto 25px auto;
    max-height: 120px;
    filter: drop-shadow(0 0 10px var(--acc));
}

#loginCard {
    position: relative;
    z-index: 10;
}

.fade-out-up {
    animation: fadeOutUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.navbar, .sidebar, .main-content {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeOutUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-50px) scale(0.95); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

th:last-child, td:last-child {
    text-align: right;
}

