/* ============================================
   SISTEMA DE LICENCIAMENTO - WORDPRESS
   ============================================ */

:root {
    --license-primary: #667eea;
    --license-secondary: #764ba2;
    --license-success: #10b981;
    --license-danger: #ef4444;
    --license-warning: #f59e0b;
    --license-light: #f3f4f6;
    --license-border: #e5e7eb;
    --license-text: #374151;
    --license-text-light: #6b7280;
}

/* ============================================
   CONTÊINER PRINCIPAL
   ============================================ */

.license-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.license-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */

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

.license-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--license-text);
    font-size: 14px;
}

.license-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--license-border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.license-form-group input:focus {
    outline: none;
    border-color: var(--license-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================
   BOTÕES
   ============================================ */

.license-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: inline-block;
}

.license-btn-primary {
    background: linear-gradient(135deg, var(--license-primary) 0%, var(--license-secondary) 100%);
    color: white;
    width: 100%;
    padding: 14px;
    margin-top: 10px;
}

.license-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.license-btn-secondary {
    background: var(--license-light);
    color: var(--license-text);
}

.license-btn-secondary:hover {
    background: #e5e7eb;
}

.license-btn-logout {
    background: var(--license-danger);
    color: white;
    padding: 10px 20px;
}

.license-btn-logout:hover {
    background: #dc2626;
}

/* ============================================
   MENSAGENS
   ============================================ */

.license-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.license-message.hidden {
    display: none;
}

.license-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.license-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.license-message.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ============================================
   LOGIN/REGISTRO
   ============================================ */

.license-toggle {
    text-align: center;
    margin-top: 20px;
    color: var(--license-text-light);
    font-size: 14px;
}

.license-toggle a {
    color: var(--license-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.license-toggle a:hover {
    text-decoration: underline;
}

/* ============================================
   DASHBOARD
   ============================================ */

.license-dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.license-dashboard-header h2 {
    color: var(--license-text);
    margin: 0 0 8px 0;
    font-size: 24px;
}

.license-user-info {
    color: var(--license-text-light);
    font-size: 14px;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.license-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.license-card h3 {
    color: var(--license-text);
    margin-bottom: 20px;
    font-size: 18px;
}

/* ============================================
   OPÇÕES DE PREÇO
   ============================================ */

.license-pricing-option {
    border: 2px solid var(--license-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.license-pricing-option:hover {
    border-color: var(--license-primary);
    background: rgba(102, 126, 234, 0.05);
}

.license-pricing-option.selected {
    border-color: var(--license-primary);
    background: rgba(102, 126, 234, 0.1);
}

.license-option-title {
    font-weight: 600;
    color: var(--license-text);
    font-size: 16px;
    margin-bottom: 8px;
}

.license-option-price {
    color: var(--license-primary);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.license-option-desc {
    color: var(--license-text-light);
    font-size: 13px;
}

/* ============================================
   LICENÇAS
   ============================================ */

.license-item {
    background: var(--license-light);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--license-primary);
}

.license-item strong {
    color: var(--license-text);
    display: block;
    margin-bottom: 10px;
}

.license-key {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    word-break: break-all;
    color: var(--license-primary);
    font-weight: 600;
    font-size: 13px;
}

.license-info {
    color: var(--license-text-light);
    font-size: 13px;
    margin: 8px 0;
}

.license-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.license-status-active {
    background: #dcfce7;
    color: #166534;
}

.license-status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.license-copy-btn {
    background: var(--license-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    transition: background 0.3s;
}

.license-copy-btn:hover {
    background: var(--license-secondary);
}

/* ============================================
   LOADING
   ============================================ */

.license-loading {
    text-align: center;
    color: var(--license-text-light);
    padding: 20px;
}

.license-spinner {
    border: 4px solid var(--license-light);
    border-top: 4px solid var(--license-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: license-spin 1s linear infinite;
    margin: 0 auto;
}

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

/* ============================================
   ADMIN SETTINGS
   ============================================ */

.license-admin-settings {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.license-admin-settings h2 {
    color: var(--license-text);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
}

.license-admin-settings table {
    width: 100%;
}

.license-admin-settings th {
    text-align: left;
    padding: 10px;
    background: var(--license-light);
    font-weight: 600;
}

.license-admin-settings td {
    padding: 10px;
    border-bottom: 1px solid var(--license-border);
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
    .license-container {
        padding: 15px;
    }

    .license-box {
        padding: 20px;
    }

    .license-dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .license-dashboard-header button {
        margin-top: 15px;
    }

    .license-grid {
        grid-template-columns: 1fr;
    }

    .license-btn {
        font-size: 13px;
        padding: 10px 15px;
    }

    .license-card {
        padding: 20px;
    }
}

/* ============================================
   COMPATIBILIDADE COM WORDPRESS
   ============================================ */

.wp-block-column .license-container,
.entry .license-container {
    margin-left: 0;
    margin-right: 0;
}

/* Compatibilidade com temas WordPress populares */
.twentytwentythree .license-container {
    padding-left: 0;
    padding-right: 0;
}

/* Garantir que os inputs do plugin funcionem */
.license-form-group input[type="email"],
.license-form-group input[type="password"],
.license-form-group input[type="text"] {
    max-width: 100%;
}

/* Botões com tema WordPress */
body .license-btn-primary {
    text-decoration: none;
}

body .license-btn-primary:focus {
    outline: 2px solid var(--license-primary);
}
