/**
 * Lendexed Frontend Styles
 */

:root {
    --lx-primary: #074439;
    --lx-primary-light: #0d9668;
    --lx-primary-dark: #053029;
    --lx-success: #10b981;
    --lx-warning: #f59e0b;
    --lx-danger: #ef4444;
    --lx-gray-50: #f9fafb;
    --lx-gray-100: #f3f4f6;
    --lx-gray-200: #e5e7eb;
    --lx-gray-300: #d1d5db;
    --lx-gray-600: #6b7280;
    --lx-gray-700: #374151;
    --lx-gray-900: #1f2937;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lendexed-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 20px;
}

.lendexed-login-container {
    background: white;
    border-radius: 12px;
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lendexed-login-container h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: var(--lx-gray-900);
    text-align: center;
}

.lendexed-login-subtitle {
    text-align: center;
    color: var(--lx-gray-600);
    font-size: 14px;
    margin: 0 0 32px 0;
}

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

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

.lendexed-form-group input,
.lendexed-form-group select,
.lendexed-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--lx-gray-200);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.lendexed-form-group input:focus,
.lendexed-form-group select:focus,
.lendexed-form-group textarea:focus {
    outline: none;
    border-color: var(--lx-primary-light);
    box-shadow: 0 0 0 3px rgba(13, 150, 104, 0.15);
}

.lendexed-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.lendexed-btn-primary {
    background: var(--lx-primary);
    color: white;
}

.lendexed-btn-primary:hover {
    background: var(--lx-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 68, 57, 0.3);
}

.lendexed-btn-secondary {
    background: var(--lx-gray-200);
    color: var(--lx-gray-700);
}

.lendexed-btn-secondary:hover {
    background: var(--lx-gray-300);
}

.lendexed-btn-full {
    width: 100%;
}

.lendexed-login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--lx-gray-600);
}

.lendexed-navigation {
    background: white;
    border-bottom: 1px solid var(--lx-gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lendexed-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lendexed-logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--lx-primary);
}

.lendexed-logo a {
    text-decoration: none;
}

.lendexed-nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lendexed-nav-links a {
    padding: 12px 20px;
    color: var(--lx-gray-700);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.lendexed-nav-links a:hover,
.lendexed-nav-links a.active {
    background: var(--lx-gray-100);
    color: var(--lx-primary);
}

.lendexed-logout {
    color: var(--lx-danger) !important;
}

.lendexed-licenses-wrapper,
.lendexed-dashboard-wrapper,
.lendexed-add-license-wrapper,
.lendexed-insights-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.lendexed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.lendexed-header h2 {
    margin: 0;
    font-size: 32px;
    color: var(--lx-gray-900);
}

.lendexed-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.lendexed-search-input {
    padding: 10px 16px;
    border: 2px solid var(--lx-gray-200);
    border-radius: 8px;
    font-size: 14px;
    min-width: 250px;
}

.lendexed-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.lendexed-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--lx-gray-200);
}

.lendexed-stat-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.lendexed-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--lx-primary);
    margin-bottom: 8px;
}

.lendexed-stat-label {
    font-size: 14px;
    color: var(--lx-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lendexed-quick-actions {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--lx-gray-200);
}

.lendexed-quick-actions h3 {
    margin: 0 0 24px 0;
    font-size: 20px;
    color: var(--lx-gray-900);
}

.lendexed-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.lendexed-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--lx-gray-50);
    border: 2px solid var(--lx-gray-200);
    border-radius: 8px;
    text-decoration: none;
    color: var(--lx-gray-700);
    transition: all 0.2s;
}

.lendexed-action-card:hover {
    border-color: var(--lx-primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lendexed-action-icon {
    font-size: 32px;
}

.lendexed-action-label {
    font-weight: 600;
    text-align: center;
}

.lendexed-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.lendexed-select {
    padding: 10px 16px;
    border: 2px solid var(--lx-gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 180px;
}

.lendexed-licenses-list {
    display: grid;
    gap: 16px;
}

.lendexed-license-card {
    background: white;
    border: 1px solid var(--lx-gray-200);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lendexed-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--lx-gray-600);
}

.lendexed-spinner {
    border: 3px solid var(--lx-gray-200);
    border-top-color: var(--lx-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.lendexed-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.lendexed-message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.lendexed-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

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

.lendexed-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.lendexed-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.lendexed-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.lendexed-insight-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--lx-gray-200);
}

.lendexed-insight-card h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--lx-gray-900);
}

.lendexed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.lendexed-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lendexed-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--lx-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lendexed-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--lx-gray-900);
}

.lendexed-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--lx-gray-600);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.lendexed-modal-close:hover {
    color: var(--lx-gray-900);
}

.lendexed-modal-body {
    padding: 32px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.lendexed-detail-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--lx-gray-200);
}

.lendexed-detail-section:last-of-type {
    border-bottom: none;
}

.lendexed-detail-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--lx-gray-900);
    font-weight: 600;
}

.lendexed-license-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.2s;
}

.lx-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lx-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.lx-badge.inactive {
    background: var(--lx-gray-200);
    color: var(--lx-gray-700);
}

.lx-badge.expired {
    background: #fee2e2;
    color: #991b1b;
}

.lx-badge.suspended {
    background: #fef3c7;
    color: #92400e;
}

.lx-badge.revoked {
    background: #fee2e2;
    color: #7f1d1d;
}

.lx-badge.pending {
    background: #dbeafe;
    color: #1e40af;
}

.lendexed-btn-danger {
    background: var(--lx-danger);
    color: white;
    margin-left: auto;
}

.lendexed-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .lendexed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .lendexed-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .lendexed-search-input {
        width: 100%;
    }
    
    .lendexed-nav-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
    
    .lendexed-form-grid {
        grid-template-columns: 1fr;
    }
    
    .lendexed-modal {
        padding: 0;
    }
    
    .lendexed-modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .lendexed-modal-header,
    .lendexed-modal-body {
        padding: 20px;
    }
}

