/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

main {
    margin-left: 220px;
    padding: 30px 40px;
    min-height: 100vh;
}

/* =========================
   NAVBAR
========================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: #020617;
    border-right: 1px solid #1e293b;

    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

/* links */

.navbar a {
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    padding: 14px 20px;
    transition: 0.25s;
    font-weight: 500;
}

.navbar a:hover {
    background: #1e293b;
    color: white;
    padding-left: 26px;
}

.nav-divider {
    height: 2px;
    width: 80%;
    background: #334155;
    margin: 16px auto;
    border-radius: 2px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* =========================
   NAV ICONS
========================= */

.nav-icon-bg {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #38bdf8;

    margin-right: 12px;
    transition: 0.25s;
}

.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.navbar a:hover .nav-icon-bg {
    transform: scale(1.05);
}

/* =========================
   USER LOGIN AREA
========================= */

.nav-top {
    display: flex;
    flex-direction: column;
}

.nav-user {
    margin-top: auto;
    padding: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;

    background: #020617;
    border: 1px solid #1e293b;
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #38bdf8;
}

.login-btn,
.logout-btn {
    display: block;
    text-align: center;

    padding: 10px;
    border-radius: 8px;

    font-weight: 600;
    text-decoration: none;
    transition: 0.25s;
}

.login-btn {
    background: #5865F2;
    color: white;
}

.login-btn:hover {
    background: #4752c4;
}

.logout-btn {
    background: #ef4444;
    color: white;
}

.logout-btn:hover {
    background: #dc2626;
}

/* =========================
   PAGE CONTENT
========================= */

h1 {
    padding: 25px 0;
    font-size: 28px;
    font-weight: 600;
}

h2 {
    margin-bottom: 12px;
    color: #38bdf8;
}

p {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* =========================
   CONTAINER
========================= */

.container {
    padding: 30px;
    background: #020617;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

/* =========================
   DASHBOARD CARDS
========================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #020617;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #1e293b;
    transition: 0.25s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #38bdf8;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.card h3 {
    margin-bottom: 8px;
}

/* =========================
   BUTTONS
========================= */

button {
    background: #38bdf8;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #0ea5e9;
}

button.disabled {
    background: #1e293b;
    cursor: not-allowed;
    pointer-events: all !important;
}

/* =========================
   TABLES
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background: #1e293b;
    color: #94a3b8;
}

tr:nth-child(even) {
    background: #020617;
}

tr:hover {
    background: #1e293b;
}

/* =========================
   LOG BOX
========================= */

.log-box {
    max-height: 300px;
    overflow-y: auto;
    background: #000814;
    padding: 10px;
    border-radius: 8px;
}

.log-entry {
    font-family: monospace;
    color: #38bdf8;
    padding: 4px 0;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 10px;
}

/* =========================
   FLOATING LOGO
========================= */

.floating-logo {
    position: fixed;
    top: 10px;
    right: 15px;
    width: 60px;        /* adjust size */
    height: auto;
    z-index: 9999;      /* stays above everything */
    pointer-events: none; /* optional: makes it unclickable */
}

.floating-logo {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

@media (max-width: 600px) {
    .floating-logo {
        width: 40px;
        top: 8px;
        right: 10px;
    }
}