/**
 * Lockspire Admin Styles
 */

:root {
    --lockspire-primary: #6366f1;
    --lockspire-primary-hover: #4f46e5;
    --lockspire-secondary: #1e293b;
    --lockspire-success: #10b981;
    --lockspire-warning: #f59e0b;
    --lockspire-danger: #ef4444;
    --lockspire-bg: #f8fafc;
    --lockspire-card-bg: #ffffff;
    --lockspire-text: #1e293b;
    --lockspire-text-muted: #64748b;
    --lockspire-border: #e2e8f0;
    --lockspire-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.lockspire-wrap {
    margin: 20px 20px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--lockspire-text);
}

/* Header */
.lockspire-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--lockspire-secondary);
    padding: 24px 32px;
    border-radius: 12px;
    color: white;
    margin-bottom: 24px;
    box-shadow: var(--lockspire-shadow);
}

.lockspire-header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lockspire-header-title h1 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.lockspire-logo {
    font-size: 32px;
    background: rgba(255,255,255,0.1);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Dashboard Stats */
.lockspire-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.lockspire-stat-card {
    background: var(--lockspire-card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--lockspire-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--lockspire-border);
}

.lockspire-stat-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.stat-blue { background: #e0e7ff; color: #4338ca; }
.stat-green { background: #dcfce7; color: #15803d; }
.stat-red { background: #fee2e2; color: #b91c1c; }
.stat-yellow { background: #fef3c7; color: #b45309; }

.lockspire-stat-data h3 {
    margin: 0;
    font-size: 14px;
    color: var(--lockspire-text-muted);
    font-weight: 500;
}

.lockspire-stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
}

/* One-Click Secure Bar */
.lockspire-secure-mode-bar {
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    padding: 24px;
    border-radius: 12px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--lockspire-shadow);
}

.lockspire-secure-mode-info h2 {
    color: white;
    margin: 0 0 4px 0;
    font-size: 18px;
}

.lockspire-secure-mode-info p {
    margin: 0;
    opacity: 0.9;
}

.lockspire-btn-white {
    background: white;
    color: var(--lockspire-primary);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.lockspire-btn-white:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

/* Cards & Content */
.lockspire-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.lockspire-card {
    background: var(--lockspire-card-bg);
    border-radius: 12px;
    box-shadow: var(--lockspire-shadow);
    border: 1px solid var(--lockspire-border);
    overflow: hidden;
    margin-bottom: 24px;
}

.lockspire-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--lockspire-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lockspire-card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.lockspire-card-body {
    padding: 24px;
}

/* Toggles & Switches */
.lockspire-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.lockspire-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.lockspire-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .lockspire-slider {
    background-color: var(--lockspire-success);
}

input:checked + .lockspire-slider:before {
    transform: translateX(20px);
}

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

.lockspire-table th {
    text-align: left;
    padding: 12px;
    background: var(--lockspire-bg);
    color: var(--lockspire-text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

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

.lockspire-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

/* Responsive */
@media (max-width: 1024px) {
    .lockspire-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .lockspire-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .lockspire-secure-mode-bar {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}
