* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f7fa; color: #1a1a2e; }
.navbar { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; padding: 1rem 0; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; }
.nav-brand { font-size: 1.5rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-link { color: #a0aec0; text-decoration: none; padding: .5rem 1rem; border-radius: 8px; transition: all .2s; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.page { display: none; }
.page.active { display: block; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.5rem; color: #1a1a2e; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border-radius: 12px; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.stat-icon { font-size: 2rem; }
.stat-label { font-size: .875rem; color: #718096; }
.stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card.warning { border-left: 4px solid #ed8936; }
.stat-card.error { border-left: 4px solid #e53e3e; }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.cert-card { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .2s; }
.cert-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.cert-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.cert-card h3 { font-size: 1.125rem; }
.cert-badge { padding: .25rem .75rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-A1 { background: #c6f6d5; color: #22543d; }
.badge-A3 { background: #bee3f8; color: #2a4365; }
.badge-CLOUD { background: #fefcbf; color: #744210; }
.cert-card-body { display: grid; gap: .5rem; }
.cert-card-body p { font-size: .875rem; color: #4a5568; }
.cert-card-body strong { color: #1a1a2e; }
.cert-card-actions { display: flex; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-content { background: #fff; border-radius: 16px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; padding: 2rem; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.btn-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #718096; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .375rem; font-weight: 500; font-size: .875rem; color: #4a5568; }
.input { width: 100%; padding: .625rem .875rem; border: 1px solid #e2e8f0; border-radius: 8px; font-size: .875rem; transition: border-color .2s; }
.input:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,.15); }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem; }
.cert-fields { transition: all .2s; }
.cert-fields.hidden { display: none; }

.btn { padding: .625rem 1.25rem; border: none; border-radius: 8px; font-size: .875rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-primary { background: #4299e1; color: #fff; }
.btn-primary:hover { background: #3182ce; }
.btn-secondary { background: #e2e8f0; color: #4a5568; }
.btn-secondary:hover { background: #cbd5e0; }
.btn-danger { background: #fc8181; color: #fff; }
.btn-danger:hover { background: #f56565; }
.btn-success { background: #68d391; color: #fff; }
.btn-success:hover { background: #48bb78; }

.log-filter { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.log-filter .input { max-width: 400px; }
.log-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.log-table th, .log-table td { padding: .75rem 1rem; text-align: left; }
.log-table th { background: #f7fafc; font-size: .75rem; text-transform: uppercase; color: #718096; }
.log-table td { font-size: .875rem; border-top: 1px solid #e2e8f0; }
.log-table tr:hover td { background: #f7fafc; }

#detail-content { display: grid; gap: 1rem; }
.detail-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #e2e8f0; }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 500; color: #718096; font-size: .875rem; }
.detail-value { color: #1a1a2e; font-size: .875rem; }
.status-active { color: #38a169; font-weight: 600; }
.status-expired { color: #e53e3e; font-weight: 600; }
.status-error { color: #ed8936; font-weight: 600; }
