        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: #ffffff;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .header {
            background: white;
            border-radius: 12px;
            padding: 30px;
            margin-bottom: 20px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .header h1 {
            color: #333;
            font-size: 28px;
            margin-bottom: 10px;
        }

        .header p {
            color: #666;
            font-size: 14px;
        }

        .controls {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            align-items: center;
            margin-top: 20px;
        }

        .btn {
            padding: 12px 24px;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: white;
            color: #333;
        }

        .btn:hover {
            border-color: #999;
            background: #f9f9f9;
        }

        .btn-primary {
            border-color: #667eea;
            background: white;
            color: #667eea;
        }

        .btn-primary:hover {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .btn-secondary {
            border-color: #ccc;
            background: white;
            color: #333;
        }

        .btn-secondary:hover {
            border-color: #999;
            background: #f9f9f9;
        }

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

        .btn-danger:hover {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
        }

        .btn-success {
            border-color: #10b981;
            background: white;
            color: #10b981;
        }

        .btn-success:hover {
            background: #10b981;
            color: white;
            border-color: #10b981;
        }

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

        .stat-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
        }

        .stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        }

        .stat-card.active {
            border: 2px solid #667eea;
            background: #f8f7ff;
        }

        .stat-card .label {
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .stat-card .value {
            font-size: 32px;
            font-weight: 700;
            color: #333;
            margin-top: 5px;
        }

        .view-toggle {
            display: flex;
            gap: 8px;
            background: #f0f0f0;
            padding: 4px;
            border-radius: 8px;
        }

        .view-toggle button {
            padding: 8px 12px;
            border: none;
            background: transparent;
            border-radius: 6px;
            cursor: pointer;
            color: #666;
            transition: all 0.2s;
        }

        .view-toggle button:hover {
            color: #333;
        }

        .view-toggle button.active {
            background: white;
            color: #667eea;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .view-toggle button svg {
            width: 18px;
            height: 18px;
        }

        .search-bar {
            flex: 1;
            max-width: 300px;
            position: relative;
        }

        .search-bar input {
            width: 100%;
            padding: 12px 16px 12px 40px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.3s;
            background: white;
        }

        .search-bar input:focus {
            outline: none;
            border-color: #667eea;
        }

        .search-bar svg {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            color: #999;
            pointer-events: none;
        }

        .search-bar.active input {
            padding-left: 40px;
        }

        .filter-bar {
            background: white;
            border-radius: 10px;
            padding: 15px 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            display: none;
            align-items: center;
            justify-content: space-between;
        }

        .filter-bar.active {
            display: flex;
        }

        .filter-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .filter-label {
            color: #666;
            font-size: 14px;
        }

        .filter-tag {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .filter-tag.all {
            background: #e0e7ff;
            color: #4338ca;
        }

        .filter-tag.valid {
            background: #d1fae5;
            color: #065f46;
        }

        .filter-tag.warning {
            background: #fef3c7;
            color: #92400e;
        }

        .filter-tag.expired {
            background: #fee2e2;
            color: #991b1b;
        }

        .cert-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
            gap: 20px;
        }

        .cert-grid.hidden {
            display: none;
        }

        .cert-list {
            display: none;
            flex-direction: column;
            gap: 12px;
        }

        .cert-list.active {
            display: flex;
        }

        .cert-list-item {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: all 0.3s;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr 1fr 120px;
            gap: 20px;
            align-items: center;
        }

        .cert-list-item:hover {
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .cert-list-item.status-valid {
            border-left: 4px solid #10b981;
        }

        .cert-list-item.status-warning {
            border-left: 4px solid #f59e0b;
        }

        .cert-list-item.status-critical {
            border-left: 4px solid #ef4444;
        }

        .cert-list-item.status-expired {
            border-left: 4px solid #6b7280;
        }

        .cert-list-domain {
            font-weight: 600;
            color: #333;
            font-size: 15px;
        }

        .cert-list-source {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .cert-list-source.letsencrypt {
            background: #e0f2fe;
            color: #0369a1;
        }

        .cert-list-source.nginx {
            background: #fef3c7;
            color: #92400e;
        }

        .cert-list-status {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .cert-list-status.valid {
            background: #d1fae5;
            color: #065f46;
        }

        .cert-list-status.warning {
            background: #fef3c7;
            color: #92400e;
        }

        .cert-list-status.critical {
            background: #fee2e2;
            color: #991b1b;
        }

        .cert-list-status.expired {
            background: #f3f4f6;
            color: #374151;
        }

        .cert-list-expiry {
            color: #666;
            font-size: 13px;
        }

        .cert-list-days {
            color: #333;
            font-weight: 500;
            font-size: 13px;
        }

        .cert-list-actions {
            display: flex;
            gap: 8px;
        }

        .cert-list-actions .btn {
            padding: 8px 12px;
            font-size: 11px;
        }

        .cert-list-actions .btn svg {
            width: 12px;
            height: 12px;
        }

        @media (max-width: 1024px) {
            .cert-list-item {
                grid-template-columns: 2fr 1fr 1fr 120px;
                gap: 15px;
            }

            .cert-list-item .cert-list-expiry,
            .cert-list-item .cert-list-days {
                display: none;
            }
        }

        @media (max-width: 768px) {
            .cert-list-item {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .cert-list-item .cert-list-expiry,
            .cert-list-item .cert-list-days {
                display: block;
            }

            .cert-list-actions {
                margin-top: 10px;
            }
        }

        .cert-card {
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }

        .cert-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }

        .cert-card.status-valid {
            border-left: 4px solid #10b981;
        }

        .cert-card.status-warning {
            border-left: 4px solid #f59e0b;
        }

        .cert-card.status-critical {
            border-left: 4px solid #ef4444;
        }

        .cert-card.status-expired {
            border-left: 4px solid #6b7280;
        }

        .cert-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
        }

        .cert-domain {
            font-size: 18px;
            font-weight: 600;
            color: #333;
            word-break: break-all;
        }

        .cert-source {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .cert-source.letsencrypt {
            background: #e0f2fe;
            color: #0369a1;
        }

        .cert-source.nginx {
            background: #fef3c7;
            color: #92400e;
        }

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

        .status-valid {
            background: #d1fae5;
            color: #065f46;
        }

        .status-warning {
            background: #fef3c7;
            color: #92400e;
        }

        .status-critical {
            background: #fee2e2;
            color: #991b1b;
        }

        .status-expired {
            background: #f3f4f6;
            color: #374151;
        }

        .cert-info {
            margin: 15px 0;
        }

        .cert-info-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .cert-info-row:last-child {
            border-bottom: none;
        }

        .cert-info-label {
            color: #666;
            font-size: 13px;
        }

        .cert-info-value {
            color: #333;
            font-weight: 500;
            font-size: 13px;
        }

        .cert-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        .cert-actions .btn {
            flex: 1;
            justify-content: center;
            font-size: 12px;
            padding: 10px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 16px;
            padding: 30px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

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

        .modal-header h2 {
            color: #333;
            font-size: 22px;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #999;
            line-height: 1;
        }

        .modal-close:hover {
            color: #333;
        }

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

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

        .form-group input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #667eea;
        }

        .form-help {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            margin-top: 25px;
        }

        .modal-actions .btn {
            flex: 1;
        }

        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: white;
            border-radius: 10px;
            padding: 15px 20px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1001;
            display: none;
            align-items: center;
            gap: 10px;
            animation: slideInRight 0.3s ease;
        }

        .notification.active {
            display: flex;
        }

        .notification.success {
            border-left: 4px solid #10b981;
        }

        .notification.error {
            border-left: 4px solid #ef4444;
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(100px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .loading {
            display: none;
            text-align: center;
            padding: 40px;
        }

        .loading.active {
            display: block;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #f0f0f0;
            border-top: 4px solid #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #666;
        }

        .empty-state svg {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
            opacity: 0.5;
        }
