:root {
    /* LIGHT MODE */
    --bg-page: #ffffff;
    --bg-content: #ffffff;
    --bg-navbar: rgb(193, 244, 255);
    --bg-table-header: #f0f0f0;
    --bg-card: #ffffff;
    --text-main: #000000;
    --text-muted: #555555;
    --border-color: #cccccc;
    --shadow-color: #0000009a;
    --input-bg: #ffffff;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --accent-blue: #0004ff;
    --accent-blue-hover: #0004ffbc;
    --accent-green: #28a745;
    --accent-green-hover: #28a745bc;
    --accent-red: #ff7777;
    --accent-red-hover: #ff7777bc;
    --dragdrop-background: #acc9ff;
    --devider: rgba(0, 0, 0, 0.12);
    --border-radio-color: rgb(148 163 184);
    --border-radio-color-hover: rgb(148 163 184);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* DARK MODE */
        --bg-page: #0f172a;
        --bg-content: #0f172a;
        --bg-navbar: #001a33;
        --bg-th: #a4d2ff39;
        --bg-td: #1e293b; 
        --bg-table-header: #2d2d2d;
        --bg-card: #0f172a;
        --text-main: #e0e0e0;
        --text-muted: #94a3b8;
        --border-color: #a4d2ff39;
        --input-bg: #2d2d2d;
        --modal-overlay: rgba(0, 0, 0, 0.8);
        --accent-blue: #4d66ff;
        --accent-blue-hover: #4d66ffbc;
        --dragdrop-background: #6c9fff;
        --devider: rgba(255,255,255,0.12);
        --border-radio-color: rgb(51 65 85);
        --border-radio-color-hover: rgb(100 116 139);
    }
}

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

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);

    display: flex;
    flex-direction: column;
    min-height: 100vh; /* total viewport height */
    margin: 0;

    justify-content: space-between; /* Footer stays down */
}


.content {
    padding: 20px 30px;
}

.std-input {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.role-select {
    composes: std-input;
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.normal-btn {
    padding: 6px 14px;
    width: 100px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
}


.btn-blue {
    background: var(--accent-blue);
}

.btn-blue:hover {
    transition: background 0.3s ease;
    background: var(--accent-blue-hover);
}

.btn-green {
    background: var(--accent-green);
}

.btn-green:hover {
    transition: background 0.3s ease;
    background: var(--accent-green-hover);
}

.btn-red {
    background: var(--accent-red);
}

.btn-red:hover {
    transition: background 0.3s ease;
    background: var(--accent-red-hover);
}


table {
    width: 100%;
    margin-top: 20px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

th,
td {
    padding: 8px 12px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    height: 45px;
    vertical-align: middle;
    color: var(--text-main);
}

th{
    background-color: var(--bg-th);
}

td{
    background-color: var(--bg-td);
}

th:last-child,
td:last-child {
    border-right: none;
}

tr:last-child td {
    border-bottom: none;
}

thead {
    background-color: var(--bg-table-header);
    font-weight: bold;
}


.password-cell {
    font-family: monospace;
}

.action-cell {
    text-align: center;
    white-space: nowrap !important;
}

.action-cell>* {
    display: inline-block;
    vertical-align: middle;
    margin: 0 8px;
}

.icon {
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  .icon {
    filter: none;
  }
}

.del-icon {
    transition: transform 0.3s ease;
}

.del-icon:hover {
    filter: invert(19%) sepia(98%) saturate(7494%) hue-rotate(1deg) brightness(97%) contrast(119%);
    transform: scale(1.3) rotate(-15deg);
}

.select {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-td);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-content);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 25px;
    border-radius: 8px;
    width: 350px;
    text-align: center;
}

.content {
    width: 70%;
    padding: 20px 30px;
    flex: 1; /* pushes the footer all the way down */
    margin: 0 auto;
}

.site-footer {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    background-color: var(--bg-page);
    flex-shrink: 0; /* Prevents the footer from being compressed */
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-divider {
    color: var(--border-color);
    user-select: none;
}

.login-page {
    display: flex;
    flex-direction: column;
    flex: 1; /* Takes up the remaining space between header/content and footer */
}

.login-container {
    flex: 1; /* Fills the available space */
    display: flex;
    justify-content: center; /* centered vertically */
    align-items: center;     /* centered horizontally */
}

@media (max-width: 100rem) {
    .content {
        width: auto;
    }
}

@media (max-width: 70rem) {
    .content {
        width: auto;
    }

    #home-table th:nth-child(6),
    #home-table td:nth-child(6) {
        display: none;
    }

    #events-table th:nth-child(5),
    #events-table td:nth-child(5) {
        display: none;
    }

    #users-table th:nth-child(5),
    #users-table td:nth-child(5) {
        display: none;
    }
}