:root {
    --bd-primary-dark: #111827;
    --bd-primary-purple: #6D28D9;
    --bd-primary-deep-purple: #4C1D95;
    --bd-gradient-start: #FF7A33;
    --bd-gradient-end: #FFB733;
    --bd-success-bg: #d1fae5;
    --bd-success-border: #10b981;
    --bd-success-text: #065f46;
    --bd-error-bg: #fee2e2;
    --bd-error-border: #ef4444;
    --bd-error-text: #991b1b;
    --bd-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --bd-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --bd-radius: 20px;
    --bd-radius-sm: 12px;
}

.bd-auth-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.bd-auth-input-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: var(--bd-radius);
    padding: 40px 35px;
    box-shadow: var(--bd-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bd-auth-input-card:hover {
    box-shadow: var(--bd-shadow-hover);
    transform: translateY(-2px);
}

.bd-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.bd-auth-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--bd-gradient-start) 0%, var(--bd-gradient-end) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 122, 51, 0.35);
}

.bd-auth-icon svg {
    width: 35px;
    height: 35px;
    color: white;
}

.bd-auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--bd-primary-dark);
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.bd-auth-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.bd-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bd-auth-input-wrapper {
    position: relative;
}

.bd-auth-input {
    width: 100%;
    padding: 18px 22px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--bd-radius-sm);
    outline: none;
    transition: all 0.3s ease;
    background: #ffffff;
    color: var(--bd-primary-dark);
    box-sizing: border-box;
}

.bd-auth-input::placeholder {
    color: #9ca3af;
}

.bd-auth-input:focus {
    border-color: var(--bd-gradient-start);
    box-shadow: 0 0 0 4px rgba(255, 122, 51, 0.1);
}

.bd-auth-button {
    width: 100%;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--bd-gradient-start) 0%, var(--bd-gradient-end) 100%);
    border: none;
    border-radius: var(--bd-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 122, 51, 0.4);
}

.bd-auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 51, 0.5);
}

.bd-auth-button:active {
    transform: translateY(0);
}

.bd-auth-button.loading {
    pointer-events: none;
}

.bd-auth-button.loading .bd-auth-btn-text {
    opacity: 0;
}

.bd-auth-button.loading .bd-auth-btn-loader {
    opacity: 1;
}

.bd-auth-btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: bd-spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes bd-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.bd-auth-result {
    margin-top: 25px;
}

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

.bd-auth-success-card,
.bd-auth-error-card {
    border-radius: var(--bd-radius);
    padding: 35px;
    animation: bd-fadeIn 0.5s ease-out forwards;
    box-shadow: var(--bd-shadow);
}

.bd-auth-success-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid var(--bd-success-border);
}

.bd-auth-error-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid var(--bd-error-border);
}

.bd-auth-success-header,
.bd-auth-error-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.bd-auth-status-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bd-auth-success-card .bd-auth-status-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.bd-auth-error-card .bd-auth-status-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.bd-auth-status-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.bd-auth-status-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.bd-auth-success-card .bd-auth-status-title {
    color: var(--bd-success-text);
}

.bd-auth-error-card .bd-auth-status-title {
    color: var(--bd-error-text);
}

.bd-auth-status-subtitle {
    font-size: 14px;
    margin: 0;
}

.bd-auth-success-card .bd-auth-status-subtitle {
    color: #047857;
}

.bd-auth-error-card .bd-auth-status-subtitle {
    color: #b91c1c;
}

.bd-auth-product-card {
    background: white;
    border-radius: var(--bd-radius-sm);
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.bd-auth-product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.bd-auth-product-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bd-auth-product-image {
    width: 100px;
    height: 100px;
    border-radius: var(--bd-radius-sm);
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.bd-auth-product-details {
    flex: 1;
}

.bd-auth-product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--bd-primary-dark);
    margin: 0 0 10px 0;
}

.bd-auth-view-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--bd-gradient-start) 0%, var(--bd-gradient-end) 100%);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 122, 51, 0.3);
}

.bd-auth-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 122, 51, 0.4);
    color: white;
}

.bd-auth-info-section {
    background: white;
    border-radius: var(--bd-radius-sm);
    padding: 25px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.bd-auth-info-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bd-primary-purple);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bd-auth-info-section-title svg {
    width: 20px;
    height: 20px;
}

.bd-auth-info-section-content {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.bd-auth-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bd-success-text);
    margin-top: 8px;
}

.bd-auth-expiry-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--bd-error-text);
}

.bd-auth-expiry-badge svg {
    width: 16px;
    height: 16px;
}

.bd-auth-error-message {
    font-size: 15px;
    color: var(--bd-error-text);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 480px) {
    .bd-auth-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .bd-auth-input-card {
        padding: 30px 25px;
    }

    .bd-auth-title {
        font-size: 24px;
    }

    .bd-auth-product-info {
        flex-direction: column;
        text-align: center;
    }

    .bd-auth-product-image {
        width: 120px;
        height: 120px;
    }
}
