@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

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

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Generic containers and cards */

.container {
    max-width: 900px;
    margin: 0 auto;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container-narrow {
    max-width: 500px;
    margin: 0 auto;
}

.card {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.card-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Page headers */

h1 {
    color: #00ff88;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 12px;
    text-align: center;
}

.subtitle {
    color: #888888;
    font-size: 12px;
    text-align: center;
    margin-bottom: 32px;
}

/* Forms */

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

label {
    display: block;
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

/* Buttons */

.btn,
button,
input[type="submit"] {
    padding: 10px 18px;
    background: #00ff88;
    color: #000000;
    border: none;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: #00ffaa;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transform: translateY(-1px);
}

.btn:active,
button:active,
input[type="submit"]:active {
    transform: translateY(0);
}

.btn:disabled,
button:disabled,
input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger {
    background: transparent;
    border: 1px solid #ff5555;
    color: #ff8888;
}

.btn-danger:hover {
    background: #ff5555;
    color: #000000;
}

.btn-secondary {
    background: #1a1a1a;
    border: 1px solid #444444;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #2a2a2a;
}

/* Messages */

.error {
    background: #2a1a1a;
    border: 1px solid #ff4444;
    color: #ff8888;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 12px;
}

.warning {
    background: #2a2a1a;
    border: 1px solid #ffaa00;
    color: #ffcc88;
    padding: 12px;
    border-radius: 4px;
    margin-top: 16px;
    font-size: 11px;
}

.loading {
    text-align: center;
    color: #888888;
    padding: 40px 20px;
}

.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: #888888;
    font-size: 14px;
}

.links {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #666666;
}

/* Dashboard-specific */

.header {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-card {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px 32px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #888888;
    font-size: 12px;
    text-transform: uppercase;
}

.info-value {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.api-key-display {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 16px;
    border-radius: 4px;
    margin-top: 16px;
    word-break: break-all;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

.api-key-value {
    color: #00ff88;
    font-weight: 500;
}

.copy-btn {
    margin-top: 12px;
}

/* Admin dashboard: stats and tables */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px;
}

.stat-label {
    color: #888888;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-value {
    color: #ff5555;
    font-size: 28px;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #2a2a2a;
    color: #888888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 13px;
    vertical-align: top;
}

tr:hover {
    background: #1a1a1a;
}

.email {
    color: #e0e0e0;
}

.date {
    color: #888888;
    font-size: 12px;
}

.code {
    font-family: 'JetBrains Mono', monospace;
    color: #00ff88;
    font-size: 12px;
    word-break: break-all;
}

.api-key-cell {
    max-width: 400px;
    min-width: 300px;
    word-break: break-all;
    white-space: normal;
}

.code-clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #00ff88;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.code-clickable:hover {
    color: #00ffaa;
    text-decoration-color: #00ffaa;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-active {
    background: #1a2a1a;
    color: #88ffaa;
    border: 1px solid #00ff88;
}

.badge-inactive {
    background: #2a1a1a;
    color: #ffaaaa;
    border: 1px solid #ff5555;
}

.badge-used {
    background: #2a2a1a;
    color: #888888;
    border: 1px solid #444444;
}

.badge-unused {
    background: #1a2a1a;
    color: #88ffaa;
    border: 1px solid #00ff88;
}

/* Modal */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 22px;
    cursor: pointer;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


