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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    margin: 0 auto;
}

.dashboard {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-height: 600px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.3em;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.switch-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.switch-form a:hover {
    text-decoration: underline;
}

#message {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

#message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.header h1 {
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
    font-weight: 500;
}

.create-key-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.keys-section {
    margin-top: 30px;
}

.key-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.key-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.key-token {
    background: white;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.key-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.key-date {
    font-style: italic;
}

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

.empty-state {
    text-align: center;
    color: #666;
    padding: 40px;
}

.empty-state p {
    font-size: 16px;
}



.modal {
    display: none;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    z-index: 101;
    position: absolute;
}
.modal-backdrop {
    display: none;
    position: fixed;
    background: hsl(000 000 010 / 65%);
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal.modal-md {
    min-width: 500px;
}

.modal button.close {
    font-size: 22px;
    line-height: 27px;
    color: #555;
    padding: 0px 7px;
    background: #00000014;
    border: 2px solid #00000014;
    border-radius: 50%;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
}

.modal button.close:hover {
    background: #00000030;
    border: 2px solid #00000030;
    color: #333;
}

.modal-backdrop.show {
    display: block;
}

.modal.show {
    display: block;
}

button.btn.btn-create {
    width: auto;
}

a svg,
.btn svg {
    align-self: center;
    margin-right: 6px;
    align-self: center;
    place-self: center;
}

a {
    display: inline-flex;
    align-items: baseline;
    color: #667de9;
    text-decoration: none;
    font-weight: 500;
}

a:hover,
a:focus {
    color: #6c69cc;
}

.key-description {
    margin: 0 0 15px 10px;
}