/* Auth Guardian Dashboard Styles  * Version: 0.3.0
 */

:root {
    --ag-primary: #ef4444;
    --ag-secondary: #f97316;
    --ag-dark: #0f0a0a;
    --ag-darker: #080505;
    --ag-light: #1a1515;
    --ag-border: #2a2020;
    --ag-success: #10b981;
    --ag-warning: #f59e0b;
    --ag-danger: #dc2626;
    --ag-info: #3b82f6;
}

/* Main Container  * Version: 0.3.0
 */
.auth-guardian-container {
    background: linear-gradient(135deg, var(--ag-dark) 0%, var(--ag-darker) 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Header */
.auth-guardian-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ag-border);
}

.auth-guardian-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ag-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-guardian-title::before {
    content: "🔑";
    font-size: 28px;
}

/* Stats Grid */
.auth-guardian-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--ag-light);
    border: 1px solid var(--ag-border);
    border-radius: 8px;
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ag-primary);
}

.stat-icon {
    font-size: 24px;
    float: right;
    opacity: 0.6;
}

/* Portal Configuration */
.portal-config {
    background: var(--ag-light);
    border: 1px solid var(--ag-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.portal-preview {
    background: white;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-top: 16px;
}

.portal-logo {
    max-width: 200px;
    max-height: 100px;
    margin-bottom: 20px;
}

.portal-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.portal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

/* OAuth Buttons */
.oauth-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.oauth-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.oauth-google {
    background: #4285f4;
    color: white;
}

.oauth-github {
    background: #333;
    color: white;
}

.oauth-facebook {
    background: #1877f2;
    color: white;
}

.oauth-twitter {
    background: #1da1f2;
    color: white;
}

/* Voucher System */
.voucher-list {
    display: grid;
    gap: 12px;
}

.voucher-item {
    background: var(--ag-light);
    border: 1px solid var(--ag-border);
    border-left: 4px solid var(--ag-primary);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voucher-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--ag-primary);
    letter-spacing: 2px;
}

.voucher-details {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.voucher-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.voucher-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--ag-success);
}

.voucher-status.expired {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.voucher-status.used {
    background: rgba(59, 130, 246, 0.2);
    color: var(--ag-info);
}

/* Session Management */
.session-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.session-table th {
    background: var(--ag-light);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--ag-primary);
    border-bottom: 2px solid var(--ag-border);
}

.session-table td {
    padding: 12px;
    border-bottom: 1px solid var(--ag-border);
}

.session-table tr:hover {
    background: var(--ag-light);
}

.session-active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ag-success);
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Bypass Rules */
.bypass-rules {
    display: grid;
    gap: 12px;
}

.bypass-rule {
    background: var(--ag-light);
    border: 1px solid var(--ag-border);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bypass-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 12px;
}

.bypass-type.mac {
    background: rgba(59, 130, 246, 0.2);
    color: var(--ag-info);
}

.bypass-type.ip {
    background: rgba(16, 185, 129, 0.2);
    color: var(--ag-success);
}

.bypass-type.domain {
    background: rgba(245, 158, 11, 0.2);
    color: var(--ag-warning);
}

/* Action Buttons */
.ag-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.ag-btn-primary:hover {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.ag-btn-secondary {
    background: var(--ag-light);
    color: #ccc;
    border: 1px solid var(--ag-border);
}

.ag-btn-secondary:hover {
    background: var(--ag-border);
}

.ag-btn-danger {
    background: var(--ag-danger);
    color: white;
}

.ag-btn-danger:hover {
    background: #b91c1c;
}

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

.ag-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ccc;
}

.ag-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--ag-light);
    border: 1px solid var(--ag-border);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ag-input:focus {
    outline: none;
    border-color: var(--ag-primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.ag-textarea {
    min-height: 100px;
    resize: vertical;
}

.ag-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--ag-light);
    border: 1px solid var(--ag-border);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-guardian-stats {
        grid-template-columns: 1fr;
    }

    .oauth-buttons {
        grid-template-columns: 1fr;
    }

    .session-table {
        font-size: 12px;
    }

    .session-table th,
    .session-table td {
        padding: 8px;
    }
}

/* Loading State */
.ag-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.ag-loading::before {
    content: "⏳";
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    animation: spin 2s linear infinite;
}

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