/* Multi-App License Manager - 前端样式 */
.mal-product-info,
.mal-user-licenses,
.mal-license-query {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    margin: 10px 0;
}

.mal-license-code {
    background: #f4f4f4;
    padding: 5px 10px;
    border-radius: 3px;
    font-family: monospace;
    border: 1px solid #ddd;
    font-size: 14px;
}

.mal-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mal-btn-primary {
    background: #007cba;
    color: white;
}

.mal-btn-primary:hover {
    background: #005a87;
    color: white;
}

.mal-btn-secondary {
    background: #6c757d;
    color: white;
}

.mal-btn-secondary:hover {
    background: #545b62;
    color: white;
}

.mal-btn-outline {
    background: transparent;
    border: 2px solid #007cba;
    color: #007cba;
}

.mal-btn-outline:hover {
    background: #007cba;
    color: white;
}

.mal-btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.mal-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.mal-status-active {
    color: #28a745;
    font-weight: bold;
}

.mal-status-revoked {
    color: #dc3545;
    font-weight: bold;
}

.mal-status-expired {
    color: #ffc107;
    font-weight: bold;
}

.mal-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.mal-status-badge.mal-status-active {
    background: #d4edda;
    color: #155724;
}

.mal-status-badge.mal-status-revoked {
    background: #f8d7da;
    color: #721c24;
}

.mal-status-badge.mal-status-expired {
    background: #fff3cd;
    color: #856404;
}

/* 用户授权页面样式 */
.mal-user-licenses {
    max-width: 1200px;
    margin: 20px auto;
}

.mal-licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mal-license-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.mal-license-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.mal-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mal-license-title {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.mal-license-body {
    margin-bottom: 15px;
}

.mal-license-key {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mal-license-key label {
    font-weight: 600;
    color: #555;
    margin: 0;
}

.mal-license-meta {
    display: grid;
    gap: 8px;
}

.mal-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.mal-meta-label {
    color: #666;
    font-size: 14px;
}

.mal-meta-value {
    color: #333;
    font-weight: 500;
}

.mal-license-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mal-domains-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.mal-domains-list h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.mal-domains {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mal-domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
}

.mal-domain {
    font-family: monospace;
    color: #495057;
}

.mal-domain-status {
    font-size: 12px;
    color: #28a745;
    font-weight: 500;
}

.mal-no-licenses,
.mal-no-products,
.mal-no-domains {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.mal-no-licenses p,
.mal-no-products p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* 模态框样式 */
.mal-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.mal-modal.mal-modal-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mal-modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: mal-modal-appear 0.3s ease;
}

@keyframes mal-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.mal-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.mal-close {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
}

.mal-close:hover {
    color: #333;
}

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

.mal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.mal-form-group input,
.mal-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.mal-form-group input:focus,
.mal-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

.mal-form-actions {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mal-description {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* 通知样式 */
.mal-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.mal-notification-show {
    transform: translateX(0);
    opacity: 1;
}

.mal-notification-success {
    border-left: 4px solid #28a745;
}

.mal-notification-error {
    border-left: 4px solid #dc3545;
}

.mal-notification-info {
    border-left: 4px solid #17a2b8;
}

.mal-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
}

.mal-notification-content i {
    font-size: 18px;
}

.mal-notification-success i {
    color: #28a745;
}

.mal-notification-error i {
    color: #dc3545;
}

.mal-notification-info i {
    color: #17a2b8;
}

/* 加载状态 */
.mal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.mal-loading i {
    margin-right: 10px;
    animation: mal-spin 1s linear infinite;
}

@keyframes mal-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mal-licenses-grid {
        grid-template-columns: 1fr;
    }
    
    .mal-license-key {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mal-license-actions {
        flex-direction: column;
    }
    
    .mal-domain-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .mal-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .mal-form-actions {
        flex-direction: column;
    }
    
    .mal-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* 图标样式 */
.mal-icon {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.mal-icon-success:before { content: "✓"; }
.mal-icon-error:before { content: "✗"; }
.mal-icon-loading:before { content: "⟳"; }
.mal-icon-copy:before { content: "📋"; }
.mal-icon-link:before { content: "🔗"; }
.mal-icon-check:before { content: "✅"; }
.mal-icon-contact:before { content: "📞"; }
.mal-icon-buy:before { content: "🛒"; }

/* 表单验证样式 */
.mal-form-error {
    border-color: #dc3545 !important;
}

.mal-form-valid {
    border-color: #28a745 !important;
}

.mal-form-error-text {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}