/* 
 * AMS License Manager - Portal Wrapper CSS
 * Isolated from active theme styles
 */

 .amslm-portal-wrapper {
    all: initial; /* Reset all inherited styles to ensure isolation */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #334155;
    background-color: transparent;
    display: block;
    box-sizing: border-box;
}

.amslm-portal-wrapper * {
    box-sizing: border-box;
}

/* RTL Support */
.amslm-portal-wrapper[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Login Box */
.amslm-login-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.amslm-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}

.amslm-subtitle {
    margin: 0 0 30px;
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

/* Form Elements */
.amslm-form-group {
    margin-bottom: 20px;
}

.amslm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}

.amslm-form-group input[type="email"],
.amslm-form-group input[type="password"],
.amslm-form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.amslm-form-group input[type="email"]:focus,
.amslm-form-group input[type="password"]:focus,
.amslm-form-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.amslm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.amslm-btn-primary {
    color: #ffffff;
    background-color: #2563eb;
    border-color: #2563eb;
    width: 100%;
}

.amslm-btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.amslm-btn-danger {
    color: #ffffff;
    background-color: #ef4444;
    border-color: #ef4444;
}

.amslm-btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

/* Notices */
.amslm-notice {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

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

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

/* Page Titles */
.amslm-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

/* Dashboard Grid */
.amslm-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.amslm-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.amslm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.amslm-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amslm-stat {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

/* Tables */
.amslm-table-responsive {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.amslm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.amslm-table th,
.amslm-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.amslm-table th {
    background-color: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amslm-table tr:last-child td {
    border-bottom: none;
}

.amslm-table code {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    color: #0f172a;
}

/* Badges */
.amslm-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.amslm-badge-suspended,
.amslm-badge-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Utilities */
.amslm-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.amslm-text-muted {
    color: #64748b;
}
