/* Developer License Manager - Frontend Styles */

:root {
    --dlm-primary: #4f46e5;
    --dlm-primary-hover: #4338ca;
    --dlm-secondary: #64748b;
    --dlm-success: #22c55e;
    --dlm-warning: #f59e0b;
    --dlm-danger: #ef4444;
    --dlm-light: #f8fafc;
    --dlm-dark: #1e293b;
    --dlm-border: #e2e8f0;
    --dlm-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --dlm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --dlm-radius: 8px;
}

/* Common Styles */
.dlm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--dlm-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 8px;
}

.dlm-btn-primary {
    background: var(--dlm-primary);
    color: #fff;
}

.dlm-btn-primary:hover {
    background: var(--dlm-primary-hover);
    color: #fff;
}

.dlm-btn-secondary {
    background: var(--dlm-light);
    color: var(--dlm-dark);
    border: 1px solid var(--dlm-border);
}

.dlm-btn-secondary:hover {
    background: #e2e8f0;
}

.dlm-btn-block {
    width: 100%;
}

.dlm-btn-copy {
    padding: 8px 16px;
    background: var(--dlm-light);
    border: 1px solid var(--dlm-border);
}

/* Notice Styles */
.dlm-notice {
    padding: 16px 20px;
    border-radius: var(--dlm-radius);
    margin-bottom: 20px;
}

.dlm-notice-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.dlm-notice-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.dlm-notice-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.dlm-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Registration Form */
.dlm-registration-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: var(--dlm-radius);
    box-shadow: var(--dlm-shadow-lg);
}

.dlm-registration-container h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--dlm-dark);
    text-align: center;
}

.dlm-registration-subtitle {
    text-align: center;
    color: var(--dlm-secondary);
    margin-bottom: 32px;
}

.dlm-auth-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dlm-social-login {
    text-align: center;
}

.dlm-social-login h3 {
    font-size: 14px;
    color: var(--dlm-secondary);
    margin-bottom: 16px;
}

/* Google Login Button */
.dlm-google-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid var(--dlm-border);
    border-radius: var(--dlm-radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--dlm-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dlm-google-login-btn:hover {
    background: var(--dlm-light);
    box-shadow: var(--dlm-shadow);
}

.dlm-google-icon {
    width: 20px;
    height: 20px;
}

/* Divider */
.dlm-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--dlm-secondary);
}

.dlm-divider::before,
.dlm-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--dlm-border);
}

.dlm-divider span {
    padding: 0 16px;
    font-size: 12px;
    text-transform: uppercase;
}

/* Tabs */
.dlm-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--dlm-border);
}

.dlm-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--dlm-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.dlm-tab:hover {
    color: var(--dlm-dark);
}

.dlm-tab.dlm-tab-active {
    color: var(--dlm-primary);
    border-bottom-color: var(--dlm-primary);
}

.dlm-tab-content {
    display: none;
}

.dlm-tab-content.active {
    display: block;
}

/* Form Styles */
.dlm-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dlm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dlm-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dlm-dark);
}

.dlm-form-group input {
    padding: 12px 14px;
    border: 1px solid var(--dlm-border);
    border-radius: var(--dlm-radius);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.dlm-form-group input:focus {
    outline: none;
    border-color: var(--dlm-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dlm-form-footer {
    text-align: center;
    margin-top: 8px;
}

.dlm-form-footer a {
    color: var(--dlm-primary);
    text-decoration: none;
    font-size: 14px;
}

/* Payment Form */
.dlm-payment-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
}

.dlm-payment-container h2 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
}

.dlm-payment-subtitle {
    text-align: center;
    color: var(--dlm-secondary);
    margin-bottom: 24px;
}

.dlm-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.dlm-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dlm-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.dlm-toggle-label.dlm-toggle-active {
    color: var(--dlm-dark);
    font-weight: 600;
}

.dlm-save-badge {
    background: var(--dlm-success);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.dlm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.dlm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dlm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.dlm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dlm-toggle-switch input:checked + .dlm-toggle-slider {
    background-color: var(--dlm-primary);
}

.dlm-toggle-switch input:checked + .dlm-toggle-slider:before {
    transform: translateX(24px);
}

.dlm-plan-description {
    font-size: 13px;
    color: var(--dlm-secondary);
    margin: 0 0 16px;
}

.dlm-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.dlm-plan-card {
    position: relative;
    background: #fff;
    border: 2px solid var(--dlm-border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s ease;
}

.dlm-plan-card:hover {
    border-color: var(--dlm-primary);
    box-shadow: var(--dlm-shadow-lg);
}

.dlm-plan-recommended {
    border-color: var(--dlm-primary);
}

.dlm-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dlm-primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.dlm-plan-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
}

.dlm-plan-price {
    margin-bottom: 8px;
}

.dlm-plan-price .dlm-currency {
    font-size: 24px;
    font-weight: 500;
    vertical-align: top;
}

.dlm-plan-price .dlm-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--dlm-dark);
}

.dlm-plan-price .dlm-period {
    font-size: 16px;
    color: var(--dlm-secondary);
}

.dlm-plan-savings {
    color: var(--dlm-success);
    font-size: 14px;
    margin: 0;
}

.dlm-plan-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}

.dlm-plan-features li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--dlm-secondary);
}

.dlm-plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--dlm-success);
    font-weight: bold;
}

.dlm-select-plan {
    width: 100%;
}

/* Dashboard Styles */
.dlm-dashboard-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.dlm-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--dlm-border);
}

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

.dlm-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.dlm-user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dlm-primary);
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.dlm-user-details h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.dlm-user-details p {
    margin: 4px 0 0;
    color: var(--dlm-secondary);
    font-size: 14px;
}

/* License Card */
.dlm-license-card {
    background: #fff;
    border: 1px solid var(--dlm-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.dlm-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dlm-license-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dlm-license-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.dlm-status-expired {
    background: #fef2f2;
    color: #991b1b;
}

.dlm-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.dlm-status-cancelled {
    background: #f3f4f6;
    color: #4b5563;
}

.dlm-license-key-container {
    margin-bottom: 24px;
}

.dlm-license-key-container label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--dlm-secondary);
    margin-bottom: 8px;
}

.dlm-license-key-wrapper {
    display: flex;
    gap: 8px;
}

.dlm-license-key-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--dlm-border);
    border-radius: var(--dlm-radius);
    font-family: monospace;
    font-size: 14px;
    background: var(--dlm-light);
}

.dlm-license-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    padding: 20px;
    background: var(--dlm-light);
    border-radius: var(--dlm-radius);
    margin-bottom: 24px;
}

.dlm-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dlm-detail-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--dlm-secondary);
}

.dlm-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--dlm-dark);
}

.dlm-expiring-soon {
    color: var(--dlm-warning);
}

.dlm-plan-actions {
    border-top: 1px solid var(--dlm-border);
    padding-top: 24px;
}

.dlm-plan-actions h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.dlm-plan-actions p {
    margin: 0 0 16px;
    color: var(--dlm-secondary);
    font-size: 14px;
}

/* Activations & Payments Cards */
.dlm-activations-card,
.dlm-payments-card {
    background: #fff;
    border: 1px solid var(--dlm-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dlm-activations-card h3,
.dlm-payments-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
}

/* Table Styles */
.dlm-table {
    width: 100%;
    border-collapse: collapse;
}

.dlm-table th,
.dlm-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--dlm-border);
}

.dlm-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--dlm-secondary);
    font-weight: 500;
}

.dlm-table td {
    font-size: 14px;
}

/* Status Badges */
.dlm-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.dlm-status-success {
    background: #dcfce7;
    color: #166534;
}

.dlm-status-failed {
    background: #fef2f2;
    color: #991b1b;
}

.dlm-status-deactivated {
    background: #f3f4f6;
    color: #4b5563;
}

/* Loader */
.dlm-loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--dlm-border);
    border-top-color: var(--dlm-primary);
    border-radius: 50%;
    animation: dlm-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes dlm-spin {
    to {
        transform: rotate(360deg);
    }
}

#dlm-payment-processing {
    text-align: center;
    padding: 40px;
}

/* Message */
.dlm-message {
    padding: 16px;
    border-radius: var(--dlm-radius);
    margin-top: 20px;
    text-align: center;
}

.dlm-message.dlm-success {
    background: #dcfce7;
    color: #166534;
}

.dlm-message.dlm-error {
    background: #fef2f2;
    color: #991b1b;
}

/* Domain Manager Styles */
.dlm-domain-manager {
    background: #fff;
    border: 1px solid var(--dlm-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dlm-domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dlm-border);
}

.dlm-domain-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dlm-domain-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dlm-stat-badge {
    background: var(--dlm-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--dlm-dark);
}

.dlm-plan-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.dlm-plan-lite { background: #6b7280; }
.dlm-plan-pro { background: var(--dlm-primary); }
.dlm-plan-ultimate { background: #7c3aed; }

.dlm-add-domain-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--dlm-light);
    border-radius: var(--dlm-radius);
}

.dlm-add-domain-section h4 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
}

.dlm-inline-form .dlm-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dlm-inline-form input[type="url"],
.dlm-inline-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--dlm-border);
    border-radius: var(--dlm-radius);
    font-size: 14px;
}

.dlm-help-text {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--dlm-secondary);
}

.dlm-domains-list h4,
.dlm-deactivated-domains h4 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
}

.dlm-domains-table {
    width: 100%;
}

.dlm-table-muted {
    opacity: 0.7;
}

.dlm-empty-state {
    text-align: center;
    padding: 32px;
    color: var(--dlm-secondary);
}

.dlm-btn-danger {
    background: var(--dlm-danger);
    color: #fff;
}

.dlm-btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

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

.dlm-text-muted {
    color: var(--dlm-secondary);
    font-size: 12px;
}

.dlm-deactivated-domains {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--dlm-border);
}

/* Plan Features Card */
.dlm-plan-features-card {
    background: #fff;
    border: 1px solid var(--dlm-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dlm-plan-features-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
}

.dlm-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.dlm-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--dlm-light);
    border-radius: var(--dlm-radius);
    font-size: 14px;
}

.dlm-feature-check {
    color: var(--dlm-success);
    font-weight: bold;
}

/* Upgrade Card */
.dlm-upgrade-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dlm-upgrade-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--dlm-dark);
}

.dlm-upgrade-card > p {
    margin: 0 0 16px;
    color: var(--dlm-secondary);
}

.dlm-upgrade-billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px;
    background: #fff;
    border-radius: var(--dlm-radius);
}

.dlm-upgrade-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.dlm-upgrade-option {
    background: #fff;
    border: 1px solid var(--dlm-border);
    border-radius: var(--dlm-radius);
    padding: 20px;
}

.dlm-upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dlm-upgrade-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.dlm-upgrade-price {
    font-weight: 600;
    color: var(--dlm-primary);
}

.dlm-upgrade-option > p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--dlm-secondary);
}

.dlm-upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.dlm-upgrade-features li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--dlm-secondary);
}

.dlm-upgrade-btn {
    width: 100%;
}

/* Responsive */
@media (max-width: 640px) {
    .dlm-registration-container,
    .dlm-payment-container {
        margin: 20px;
        padding: 24px;
    }
    
    .dlm-dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .dlm-user-info {
        flex-direction: column;
    }
    
    .dlm-license-key-wrapper {
        flex-direction: column;
    }
    
    .dlm-license-details {
        grid-template-columns: 1fr;
    }
    
    .dlm-table {
        display: block;
        overflow-x: auto;
    }
}
