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

body {
    font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(to bottom, #e8e8e8 0%, #c4c4c4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    border: 1px solid #b8b8b8;
}

.header {
    background: linear-gradient(to bottom, #f9f9f9 0%, #e3e3e3 100%);
    border-bottom: 1px solid #c0c0c0;
    padding: 28px 30px 26px;
    text-align: center;
}

.header-logo-wrap {
    margin-bottom: 18px;
}

.header .brand-logo {
    display: block;
    margin: 0 auto;
    height: auto;
    max-height: 110px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}

.header h1 {
    font-size: 26px;
    font-weight: 400;
    color: #333;
    margin-bottom: 8px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.subtitle {
    font-size: 13px;
    color: #666;
    font-weight: 300;
}

.token-form {
    padding: 30px;
}

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

.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.input-field {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #b8b8b8;
    border-radius: 5px;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

.input-field.with-icon {
    padding-left: 38px;
}

.input-field.with-toggle {
    padding-right: 45px;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .input-field {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 15px;
    transition: color 0.2s ease;
    user-select: none;
}

.toggle-password:hover {
    color: #4a90e2;
}

.input-field:focus {
    outline: none;
    border-color: #5897fb;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(88, 151, 251, 0.2);
}

.input-field::placeholder {
    color: #999;
}

.input-field.input-error {
    border-color: #d9534f;
    background-color: #fff5f5;
    box-shadow: 
        inset 0 1px 2px rgba(217, 83, 79, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8);
}

.input-field.input-error:focus {
    border-color: #d9534f;
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(217, 83, 79, 0.15);
}

.error-message {
    display: none;
    align-items: center;
    gap: 6px;
    color: #d9534f;
    font-size: 12px;
    margin-top: 6px;
    animation: slideDown 0.3s ease;
}

.error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.button-group {
    margin-top: 30px;
    display: flex;
    gap: 12px;
}

.btn {
    flex: 1;
    min-width: 0;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
    font-family: inherit;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active {
    text-decoration: none;
}

a.btn:focus-visible {
    outline: 2px solid #5897fb;
    outline-offset: 2px;
    z-index: 1;
}

a.btn-primary {
    color: #fff;
}

a.btn-secondary {
    color: #333;
}

.btn i {
    font-size: 13px;
    flex-shrink: 0;
}

.btn span {
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to bottom, #6da8ff 0%, #4a90e2 100%);
    color: white;
    border: 1px solid #3a7bc8;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #7db4ff 0%, #5a9fe8 100%);
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:active {
    background: linear-gradient(to bottom, #4a90e2 0%, #3a7bc8 100%);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 100%);
    color: #333;
    border: 1px solid #b8b8b8;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%);
}

.btn-secondary:active {
    background: linear-gradient(to bottom, #e8e8e8 0%, #d8d8d8 100%);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-copy {
    width: 100%;
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #7dd87d 0%, #5cb85c 100%);
    color: white;
    border: 1px solid #4a9d4a;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-copy:hover {
    background: linear-gradient(to bottom, #8de38d 0%, #6cc76c 100%);
}

.token-result {
    padding: 30px;
    animation: fadeIn 0.4s ease;
}

.success-message {
    text-align: center;
    margin-bottom: 25px;
}

.checkmark {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 40px;
    color: white;
    background: linear-gradient(to bottom, #7dd87d 0%, #5cb85c 100%);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(92, 184, 92, 0.4);
    margin-bottom: 15px;
}

.success-message h2 {
    font-size: 20px;
    font-weight: 400;
    color: #333;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.token-display {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.token-display label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.token-display label i {
    color: #5cb85c;
    font-size: 14px;
}

.token-box {
    background: white;
    border: 1px solid #c0c0c0;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #333;
    letter-spacing: 1px;
    word-break: break-all;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
}

.warning-text {
    font-size: 12px;
    color: #d9534f;
    margin: 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.warning-text i {
    font-size: 13px;
}

@media (max-width: 580px) {
    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .header h1 {
        font-size: 22px;
    }

    .header .brand-logo {
        max-height: 88px;
        max-width: 88px;
    }

    .card {
        border-radius: 8px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.token-result--success {
    padding-top: 28px;
    padding-bottom: 32px;
}

.token-result--success .flash-success {
    margin-bottom: 22px;
}

.flash-error {
    background: rgba(200, 60, 60, 0.12);
    color: #a93226;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid rgba(180, 70, 70, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.flash-success {
    background: linear-gradient(to bottom, rgba(220, 245, 225, 0.95) 0%, rgba(200, 235, 208, 0.88) 100%);
    color: #1a5c28;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid rgba(80, 150, 95, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.flash-success--centered {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.button-group--balanced {
    margin-top: 0;
    align-items: stretch;
}

.button-group--balanced .btn {
    flex: 1 1 0;
    min-height: 44px;
}
