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

body {
    font-family: 'Jersey 10', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #eee;
    min-height: 100vh;
    padding: 20px;
}

/* Login Card */
#loginCard {
    max-width: 400px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(238, 17, 17, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
}

#loginCard h2 {
    color: #e11;
    margin-bottom: 30px;
    font-size: 2em;
}

input {
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1em;
}

input:focus {
    outline: none;
    border-color: #e11;
}

button {
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    border: none;
    background: #e11;
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(238, 17, 17, 0.5);
}

/* Panel */
#panel {
    max-width: 1400px;
    margin: 20px auto;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-section h2 {
    color: #e11;
    font-size: 2em;
}

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

.nav-links a,
.nav-links button {
    padding: 10px 20px;
    background: rgba(238, 17, 17, 0.1);
    border: 1px solid #e11;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    display: inline-block;
    width: auto;
}

.nav-links a:hover,
.nav-links button:hover {
    background: #e11;
    transform: translateY(-2px);
}

.section-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(238, 17, 17, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.section-card h3 {
    color: #e11;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    margin: 0;
}

.table-container {
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    table-layout: auto;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(238, 17, 17, 0.2);
    color: #e11;
    font-weight: bold;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.action-btn {
    padding: 6px 8px;
    /* Reduced from 12px to 8px horizontally */
    margin: 2px;
    font-size: 0.85em;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.action-btn.activate {
    background: #0a0;
    color: #fff;
}

.action-btn.deactivate {
    background: #f90;
    color: #fff;
}

.action-btn.delete {
    background: #c00;
    color: #fff;
}

.action-btn:hover {
    transform: scale(1.05);
}

/* Portfolio Action Buttons - Compact Square Style */
.portfolio-action-btn {
    padding: 6px;
    margin: 1px;
    font-size: 1.1em;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portfolio-action-btn.edit {
    background: #09f;
    color: #fff;
}

.portfolio-action-btn.activate {
    background: #0a0;
    color: #fff;
}

.portfolio-action-btn.deactivate {
    background: #f90;
    color: #fff;
}

.portfolio-action-btn.delete {
    background: #c00;
    color: #fff;
}

.portfolio-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* User Action Buttons - Same compact style as portfolio */
.user-action-btn {
    padding: 6px;
    margin: 1px;
    font-size: 1.1em;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.user-action-btn.edit-coins {
    background: #0a0;
    color: #fff;
}

.user-action-btn:not(.delete-user):not(.edit-coins) {
    background: #09f;
    color: #fff;
}

.user-action-btn.delete-user {
    background: #c00;
    color: #fff;
}

.user-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.status {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
}

.status.active {
    background: rgba(0, 255, 0, 0.2);
    color: #0f0;
}

.status.inactive {
    background: rgba(255, 0, 0, 0.2);
    color: #f00;
}

.message {
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    text-align: center;
}

.message.success {
    background: rgba(0, 255, 0, 0.2);
    color: #0f0;
    border: 1px solid #0f0;
}

.message.error {
    background: rgba(255, 0, 0, 0.2);
    color: #f00;
    border: 1px solid #f00;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    #loginCard {
        margin: 50px auto;
        padding: 30px 20px;
    }

    .header-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-card {
        padding: 20px 15px;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.85em;
    }

    th,
    td {
        padding: 8px;
    }

    .nav-links {
        width: 100%;
    }

    .nav-links a,
    .nav-links button {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #loginCard h2 {
        font-size: 1.5em;
    }

    .header-section h2 {
        font-size: 1.5em;
    }

    .section-card h3 {
        font-size: 1.2em;
    }

    button,
    input {
        padding: 12px;
        font-size: 0.9em;
    }

    table {
        font-size: 0.75em;
        min-width: 100%;
    }

    .action-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #e11;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(30px);
}